Weblogic 类加载器似乎更喜欢系统库而不是我战争中的WEB-INF/lib/
.
我尝试在 中设置以下内容WEB-INF/weblogic.xml
,但没有成功:
<weblogic-web-app>
<container-descriptor>
<prefer-web-inf-classes>true</prefer-web-inf-classes>
</container-descriptor>
</weblogic-web-app>
这只是给了我很多VerifyErrors:
exception is java.lang.VerifyError: (class: org/apache/xerces/parsers/AbstractSAXParser, method: parse signature: (Lorg/xml/sax/InputSource;)V) Incompatible object argument for function call
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:730)
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:196)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1003)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:907)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485)
Truncated. see log file for complete stacktrace
(我试图避免将 WAR 打包到 EAR 中。)