Weblogic 部署在windows和linux的问题总结
1 Weblogic 11在windows下部署SSH项目
问题
1.1 报错:web.xml节点配置有注释
1.1.1 报错原因:
这个web.xml里面的 <param-value> 节点有注释多了这个 <!-- classpath*:/sso/*.xml -->注释
<context-param>
<param-name>contextConfigLocation</param-name> <param-value> classpath:/applicationContext.xml <!-- classpath*:/sso/*.xml --> </param-value> </context-param>
1.1.2 报错现象:
正在加载 ADS Framework 初始化配置,请稍候 ......
<2012-7-10 下午12时06分47秒 CST> <Warning> <HTTP> <BEA-101162> <User defined listener com.augurit.ads.fw.listener.AdsFrameworkInitCheckListener failed: : applicaitonContext属性未注入, 请在applicationContext.xml中定义SpringContextHolder.. : applicaitonContext属性未注入, 请在applicationContext.xml中定义SpringContextHolder.
at org.springside.modules.utils.AssertUtils.state()
at
org.springside.modules.utils.spring.SpringContextHolder.assertContextInjected()
at
org.springside.modules.utils.spring.SpringContextHolder.getBean() at
com.augurit.ads.fw.listener.AdsFrameworkInitCheckListener.checkSysConfig(
)
at
com.augurit.ads.fw.listener.AdsFrameworkInitCheckListener.contextInitialized()
Truncated. see log file for complete stacktrace
>
<2012-7-10 下午12时06分47秒 CST> <Error> <Deployer> <BEA-149231> <Unable to set the activation state to true for the application _appsdir_rmls_dir. :
at weblogic.servlet.internal.WebAppModule.startContexts() at weblogic.servlet.internal.WebAppModule.start()
at
weblogic.application.internal.flow.ModuleStateDriver$3.next() at weblogic.application.utils.StateMachineDriver.nextState() at weblogic.application.internal.flow.ModuleStateDriver.start() Truncated. see log file for complete stacktrace
Caused By: : applicaitonContext属性未注入, 请在applicationContext.xml中定义SpringContextHolder.
at org.springside.modules.utils.AssertUtils.state()
at
org.springside.modules.utils.spring.SpringContextHolder.assertContextInjected()

at
org.springside.modules.utils.spring.SpringContextHolder.getBean() at
com.augurit.ads.fw.listener.AdsFrameworkInitCheckListener.checkSysConfig()
at
com.augurit.ads.fw.listener.AdsFrameworkInitCheckListener.contextInitialized()
Truncated. see log file for complete stacktrace
>
1.1.3 解决办法:
这个问题是因为加载不了applicaitonContext.xml文件:检查web.xml文件,网上资料说部署在weblogic的项目不支持通配符的写法的,引入多少个配置文件就要写多少个。weblogic部署项目还有web.xml引入配置文件的时候不要有空格跟换行,也不要有注释。上面这个问题就是注释引起的。本来我在web.xml引入applicationContext.xml文件是这样写的:
<context-param>
<param-name>contextConfigLocation</param-name> <param-value> classpath:/applicationContext.xml <!-- classpath*:/sso/*.xml -->
</param-value> </context-param>
修改成下面这样问题就解决了(把中间的注释的代码去掉)
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
</param-value>
</context-param>
1.2 报错:包冲突
1.2.1 报错原因:
Weblogic的一些包跟Hibernate的一些包冲突了
1.2.2 报错现象:
2012-07-10 12:49:35,203 ERROR [org.springframework.web.context.ContextLoader] - <Context initialization failed> : Error creating bean with name dozer defined in class path resource [mapper/applicationContext-mapper.xml]: Instantiation of bean failed; nested exception is : Could not instantiate bean class [org.dozer.DozerBeanMapper]: Constructor threw exception; nested exception is java.lang.NoSuchMethodError: org.apache.commons.lang.ClassUtils.getClass(Ljava/lang/String;)Ljava/lang/Class;
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean()
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance()
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean()
at

org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean()
at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject()
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton()
at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean()
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean()
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons()
at
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization()
at
org.springframework.context.support.AbstractApplicationContext.refresh()
at
org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext()
at
org.springframework.web.context.ContextLoader.initWebApplicationContext()
at
org.springframework.web.context.ContextLoaderListener.contextInitialized()
at
weblogic.servlet.internal.EventsManager$FireContextListenerAction.run()
at weblogic.security.acl.internal.AuthenticatedSubject.doAs() at weblogic.security.service.SecurityManager.runAs()
at
weblogic.servlet.internal.EventsManager.notifyContextCreatedEvent() at
weblogic.servlet.internal.WebAppServletContext.preloadResources()
at weblogic.servlet.internal.WebAppServletContext.start() at weblogic.servlet.internal.WebAppModule.startContexts() at weblogic.servlet.internal.WebAppModule.start()
at
weblogic.application.internal.flow.ModuleStateDriver$3.next()
本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/jisuanjixue/article-29388-1.html
多行不义必自毙
我们的海军和空军以及二炮部队可以现在举办南海实弹军事联合演习