环境:Linux+WebLogic10.3.0.0
在项目的WEB-INF目录下,有如下weblogic.xml文件
在linux下启动weblogic的时候,出现以下异常:
包冲 突,加载了两个版本:xercesImpl.jar,xercesImpl-2.7.1.jar来解析xml文件,删除xercesImpl.jar重新启动就ok了。
在项目的WEB-INF目录下,有如下weblogic.xml文件
<?xml version="1.0" encoding="UTF-8"?>
<weblogic-web-app
xmlns="http://www.bea.com/ns/weblogic/weblogic-web-app"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd">
<container-descriptor>
<prefer-web-inf-classes>true</prefer-web-inf-classes>
</container-descriptor>
</weblogic-web-app>
在linux下启动weblogic的时候,出现以下异常:
<2016-3-29 下午04时54分40秒 CST> <Warning> <HTTP> <BEA-101162> <User defined listener org.springframework.web.context.ContextLoaderListener failed: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.cxf.transport.servlet.ServletTransportFactory' defined in class path resource [META-INF/cxf/cxf-servlet.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (2) are:
PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'bus' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in file [/opt/bea/user_projects/domains/domain7006/CEACCSVR/WEB-INF/classes/applicationContext-hibernate.xml]: Invocation of init method failed; nested exception is com.sun.org.apache.xerces.internal.parsers.ObjectFactory$ConfigurationError: Provider com.sun.org.apache.xerces.internal.parsers.XIncludeAwareParserConfiguration could not be instantiated: com.sun.org.apache.xerces.internal.impl.dv.DVFactoryException: DTD factory class com.sun.org.apache.xerces.internal.impl.dv.dtd.DTDDVFactoryImpl does not extend from DTDDVFactory.
PropertyAccessException 2: org.springframework.beans.MethodInvocationException: Property 'transportIds' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in file [/opt/bea/user_projects/domains/domain7006/CEACCSVR/WEB-INF/classes/applicationContext-hibernate.xml]: Invocation of init method failed; nested exception is com.sun.org.apache.xerces.internal.parsers.ObjectFactory$ConfigurationError: Provider com.sun.org.apache.xerces.internal.parsers.XIncludeAwareParserConfiguration could not be instantiated: com.sun.org.apache.xerces.internal.impl.dv.DVFactoryException: DTD factory class com.sun.org.apache.xerces.internal.impl.dv.dtd.DTDDVFactoryImpl does not extend from DTDDVFactory..
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.cxf.transport.servlet.ServletTransportFactory' defined in class path resource [META-INF/cxf/cxf-servlet.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (2) are:
PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'bus' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in file [/opt/bea/user_projects/domains/domain7006/CEACCSVR/WEB-INF/classes/applicationContext-hibernate.xml]: Invocation of init method failed; nested exception is com.sun.org.apache.xerces.internal.parsers.ObjectFactory$ConfigurationError: Provider com.sun.org.apache.xerces.internal.parsers.XIncludeAwareParserConfiguration could not be instantiated: com.sun.org.apache.xerces.internal.impl.dv.DVFactoryException: DTD factory class com.sun.org.apache.xerces.internal.impl.dv.dtd.DTDDVFactoryImpl does not extend from DTDDVFactory.
PropertyAccessException 2: org.springframework.beans.MethodInvocationException: Property 'transportIds' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in file [/opt/bea/user_projects/domains/domain7006/CEACCSVR/WEB-INF/classes/applicationContext-hibernate.xml]: Invocation of init method failed; nested exception is com.sun.org.apache.xerces.internal.parsers.ObjectFactory$ConfigurationError: Provider com.sun.org.apache.xerces.internal.parsers.XIncludeAwareParserConfiguration could not be instantiated: com.sun.org.apache.xerces.internal.impl.dv.DVFactoryException: DTD factory class com.sun.org.apache.xerces.internal.impl.dv.dtd.DTDDVFactoryImpl does not extend from DTDDVFactory.
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1279)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
at java.security.AccessController.doPrivileged(Native Method)
Truncated. see log file for complete stacktrace
包冲 突,加载了两个版本:xercesImpl.jar,xercesImpl-2.7.1.jar来解析xml文件,删除xercesImpl.jar重新启动就ok了。