tomcat 迁移到weblogic 问题
问题1:
Caused by: java.lang.UnsupportedClassVersionError:
com/audaque/datadiscovery/soap/service/impl/JobManagerWSImpl :
unsupported classversion 52.0
原因:
jdk1.8版本不兼容 ,weblogic 11g 只支持jdk1.6
解决:使用jdk 1.6编译
问题2:
weblogic中使用commons-lang包报java.lang.NoSuchMethodErro
原因:weblogic先加载自带的commons-lang包
解决:
web-inf/weblogic.xml 下
<container-descriptor>
<prefer-web-inf-classes>true</prefer-web-inf-classes>
</container-descriptor>
问题3:
<2018-1-10 下午12时26分05秒 CST>
<Warning> <HTTP> <BEA-101162> <User defined listener com.audaque.datadiscovery.web.listener.DbTypeListener failed: java.lang.NoSuchMethodError: org/w3c/dom/Node.getTextContent()Ljava/lang/String;.
java.lang.NoSuchMethodError: org/w3c/dom/Node.getTextContent()Ljava/lang/String;
at com.audaque.lib.base.common.utils.XMLParser.parse(XMLParser.java:78)
at com.audaque.lib.base.common.utils.XMLParser.parse(XMLParser.java:31)
at com.audaque.datadiscovery.common.DbTypeUtils.inittype(DbTypeUtils.java:27)
at com.audaque.datadiscovery.web.listener.DbTypeListener.contextInitialized(DbTypeListener.java:32)
at weblogic.servlet.internal.EventsManager$FireContextListenerAction.run(EventsManager.java:481)
Truncated. see log file for complete stacktrace
原因:项目xml-apis.jar 与 weblogic 包冲突
解决:maven pom中 排除 ,IDEA使用maven helper 插件查看依赖
<exclusions>
<exclusion>
<artifactId>xml-apis</artifactId>
<groupId>xml-apis</groupId>
</exclusion>
</exclusions>
问题4:
Caused By: java.lang.NoClassDefFoundError: javax/xml/namespace/QName at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:630)
at java.lang.ClassLoader.defineClass(ClassLoader.java:614)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at weblogic.utils.classloaders.GenericClassLoader.defineClass(GenericClassLoader.java:343)
Truncated. see log file for complete stacktrace
http://www.cnblogs.com/davenkin/p/advanced-maven-resolve-dependencies-conflicts.html
原因:jar包冲突
解决:maven pom中 排除 stax-api
问题5:
<2018-1-11 上午10时56分14秒 CST> <Error> <Deployer> <BEA-149231> <Unable to set the activation state to true for the application
'DataDiscoveryWeb_war_exploded'.
weblogic.application.ModuleException: [HTTP:101216]Servlet: "com.audaque.datadiscovery.soap.service.impl.JobManagerWSImpl" failed
to preload on startup in Web application: "DataDiscoveryWeb-2.0.0-SNAPSHOT"
java.lang.IllegalArgumentException: Argument(s) "type" can't be null.
at com.sun.xml.bind.api.TypeReference.<init>(TypeReference.java:89)
at com.sun.xml.ws.model.RuntimeModeler.processDocWrappedMethod(RuntimeModeler.java:758)
at com.sun.xml.ws.model.RuntimeModeler.processMethod(RuntimeModeler.java:678)
at com.sun.xml.ws.model.RuntimeModeler.processClass(RuntimeModeler.java:428)
at com.sun.xml.ws.model.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:277)
at com.sun.xml.ws.server.EndpointFactory.createSEIModel(EndpointFactory.java:363)
at com.sun.xml.ws.server.EndpointFactory.createEndpoint(EndpointFactory.java:202)
at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:496)
at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:539)
at weblogic.wsee.jaxws.JAXWSDeployedServlet.getEndpoint(JAXWSDeployedServlet.java:183)
at weblogic.wsee.jaxws.JAXWSServlet.registerEndpoint(JAXWSServlet.java:135)
at weblogic.wsee.jaxws.JAXWSServlet.init(JAXWSServlet.java:64)
at weblogic.wsee.jaxws.JAXWSDeployedServlet.init(JAXWSDeployedServlet.java:55)
at javax.servlet.GenericServlet.init(GenericServlet.java:242)
原因: http://elvis4139.iteye.com/blog/2170370 jar包不兼容问题
解决:maven中 排除jaxb-api-2.2.3-2.5.2.jar、jaxb-impl-2.2.4-1-2.5.2.jar、jaxb-xjc-2.2.4-1-2.5.2.jar
问题6
问题:Caused By: java.lang.NoClassDefFoundError: com/audaque/lib/db/datasource/DataSourceFactory
原因:多个版本 jar包
解决:删除components-dbconnpool 1.3版本