Weblogic 部署在windows和linux的问题总结
1 Weblogic 11在windows下部署SSH项目问题
1.1 报错:l节点配置有注释
1.1.1 报错原因:
这个l里面的    <param-value> 节点有注释多了这个    classpath*:/sso/*.xml -->注释
<context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>
            classpath:/l
            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: java.lang.IllegalStateException: applicaitonContext属性未注入, 请在l中定义SpringContextHolder..
java.lang.IllegalStateException: applicaitonContext属性未注入, 请在l中定义SpringContextHolder.
    at dules.utils.AssertUtils.state(AssertUtils.java:426)
    at dules.utils.spring.SpringContextHolder.assertContextInjected(SpringContextHolder.java:87)
    at dules.utils.Bean(SpringContextHolder.java:48)
    at com.augurit.ads.fw.listener.AdsFrameworkInitCheckListener.checkSysConfig(AdsFrameworkInitCheckListener.java:35)
    at com.augurit.ads.fw.tInitialized(AdsFrameworkInitCheckListener.java:27)
    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'.
weblogic.application.ModuleException:
    at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1510)
    at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:482)
    at weblogic.application.internal.flow.(ModuleStateDriver.java:425)
    at weblogic.application.State(StateMachineDriver.java:52)
    at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
    Truncated. see log file for complete stacktrace
Caused By: java.lang.IllegalStateException: applicaitonContext属性未注入, 请在l中定义SpringContextHolder.
    at dules.utils.AssertUtils.state(AssertUtils.java:426)
    at dules.utils.spring.SpringContextHolder.assertContextInjected(SpringContextHolder.java:87)
    at dules.utils.Bean(SpringContextHolder.java:48)
    at com.augurit.ads.fw.listener.AdsFrameworkInitCheckListener.checkSysConfig(AdsFrameworkInitCheckListener.java:35)
    at com.augurit.ads.fw.tInitialized(AdsFrameworkInitCheckListener.java:27)
    Truncated. see log file for complete stacktrace
>
1.1.3 解决办法:
这个问题是因为加载不了l文件:检查l文件,网上资料说部署在weblogic的项目不支持通配符的写法的,引入多少个配置文件就要写多少个。还有l引入配置文件的时候不要有空格跟换行,也不要有注释。上面这个问题就是注释引起的。本来我在l引入l文件是这样写的:
<context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>
            classpath:/l
            classpath*:/sso/*.xml -->
        </param-value>
    </context-param>
修改成下面这样问题就解决了(把中间的注释的代码去掉)
    <context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>
            classpath:/l
        </param-value>
spring framework组件    </context-param>
1.2 报错:包冲突
1.2.1 报错原因:
Weblogic的一些包跟Hibernate的一些包冲突了
1.2.2 报错现象:
2012-07-10 12:49:35,203 ERROR [org.t.ContextLoader] - <Context initialization failed>
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dozer' defined in class path resource [l]: Instantiatio
n of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.dozer.DozerBeanMapper]: Constructor threw exception; nested exception is java.lang.NoSuchMethodError: org.apachemons.Class(Ljava/lang/String;)Ljava/lang/Class;
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:997)
    at org.springframework.beans.factory.ateBeanInstance(AbstractAutowireCapableBeanFactory.java:943)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485)
    at org.springframework.beans.factory.ateBean(AbstractAutowireCapableBeanFactory.java:456)
    at org.springframework.beans.factory.support.Object(AbstractBeanFactory.java:294)
    at org.springframework.beans.factory.Singleton(DefaultSingletonBeanRegistry.java:225)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。