Weblogic热部署的问题。。。或者是weblogic工程项目配置的问题
急!!!!!!
weblogic部署成功,感谢老紫竹!!!
调试的时候又出新问题,第一次怎么都没事,每当修改一个java文件Eclipse编译成class文件并自动放到部署目录中的时候,总会报下面的错误。。。。。弄了两天了啊!!
java.lang.IllegalStateException: BeanFactory not initialized or already closed - call 'refresh' before accessing beans via the ApplicationContext
at org.springframework.context.support.AbstractRefreshableApplicationContext.getBeanFactory(AbstractRefreshableApplicationContext.java:121)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:733)
at com.cdc.ms.filter.MSSessionFilter.getManagerCompanies(MSSessionFilter.java:192)
at com.cdc.ms.filter.MSSessionFilter.doFilter(MSSessionFilter.java:93)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3212)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:1983)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1890)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1344)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
个人猜想是web.xml配置问题,附:(这样配置有问题吗?)
<listener>
<listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
</listener>
<!-- Spring listener -->
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<servlet>
<servlet-name>UP-Dispatcher</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/classes/resources/ms/spring-ms.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>UP-Dispatcher</servlet-name>
<url-pattern>/service/ms/*</url-pattern>
</servlet-mapping>
<!-- video dispatcher mapping-->
<servlet-mapping>
<servlet-name>UP-Dispatcher</servlet-name>
<url-pattern>/ms/video/*</url-pattern>
</servlet-mapping>
[解决办法]
不懂了!org.springframework.web
这个东东没用过!
[解决办法]
感觉这个配置文件怪怪的
<servlet>
<servlet-name>UP-Dispatcher </servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet </servlet-class>
<init-param>
<param-name>contextConfigLocation </param-name>
<param-value>/WEB-INF/classes/resources/ms/spring-ms.xml </param-value>
</init-param>
<load-on-startup>1 </load-on-startup>
</servlet>
红色部分拿出来这样写
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
/WEB-INF/classes/resources/ms/spring-ms.xml
</param-value>
</param-name>
</context-param>
[解决办法]
<description>Spring servlet class</description>
<servlet>
<servlet-name>context</servlet-name>
<servlet-class>org.springframework.web.context.ContextLoaderServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/classes/applicationContext.xml</param-value>
</context-param>
<servlet>
<load-on-startup>1</load-on-startup>
</servlet>
这样试试