我正在尝试部署一个具有CMIS连接器的GWT应用程序到Websphere 8.5.5。在Classic Dev Mode(在Jetty上)或在Tomcat服务器上运行它时都没有问题 - 两者都使用Oracle 7 JDK。
在部署到Websphere(使用IBM JDK)期间,我遇到了这个:
com.ibm.ws.webcontainer.webapp.WebApp notifyServletContextCreated SRVE0283E: Exception caught while initializing context: {0}
java.lang.VerifyError
at com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl.<clinit>(RuntimeBuiltinLeafInfoImpl.java:224)
at com.sun.xml.bind.v2.model.impl.RuntimeTypeInfoSetImpl.<init>(RuntimeTypeInfoSetImpl.java:61)
at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.createTypeInfoSet(RuntimeModelBuilder.java:129)
at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.createTypeInfoSet(RuntimeModelBuilder.java:81)
at com.sun.xml.bind.v2.model.impl.ModelBuilder.<init>(ModelBuilder.java:152)
at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.<init>(RuntimeModelBuilder.java:89)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:431)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:288)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl$JAXBContextBuilder.build(JAXBContextImpl.java:1111)
at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:154)
at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:121)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
at java.lang.reflect.Method.invoke(Method.java:508)
at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:211)
at javax.xml.bind.ContextFinder.find(ContextFinder.java:372)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:574)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:522)
at my.package.core.server.xml.impl.XmlDataBindingServiceJAXBImpl.getJaxbContext(XmlDataBindingServiceJAXBImpl.java:245)
at my.package.core.server.xml.impl.XmlDataBindingServiceJAXBImpl$1.makeObject(XmlDataBindingServiceJAXBImpl.java:72)
at org.apache.commons.pool.impl.GenericKeyedObjectPool.borrowObject(GenericKeyedObjectPool.java:1220)
at my.package.core.server.xml.impl.XmlDataBindingServiceJAXBImpl.parse(XmlDataBindingServiceJAXBImpl.java:158)
at my.package.core.server.xml.impl.XmlDataBindingServiceJAXBImpl.parse(XmlDataBindingServiceJAXBImpl.java:128)
at my.package.core.server.license.LicenseProvider.readFromXml(LicenseProvider.java:155)
at my.package.core.server.license.LicenseProvider.get(LicenseProvider.java:123)
at my.package.core.server.license.LicenseProvider.get(LicenseProvider.java:50)
at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:81)
at com.google.inject.internal.BoundProviderFactory.provision(BoundProviderFactory.java:72)
at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:61)
at com.google.inject.internal.BoundProviderFactory.get(BoundProviderFactory.java:62)
at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1016)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092)
at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1012)
at my.package.core.server.services.i18n.I18NConfigurationServiceImpl.getLanguages(I18NConfigurationServiceImpl.java:53)
at my.package.core.server.schema.SchemaLoaderImpl.scanPackage(SchemaLoaderImpl.java:150)
at my.package.core.server.schema.SchemaLoaderImpl.loadSchema(SchemaLoaderImpl.java:204)
at my.package.core.server.schema.SchemaLoaderImpl.loadSchema(SchemaLoaderImpl.java:195)
at my.package.core.server.schema.CustomSchemaLoaderImpl.loadSchema(CustomSchemaLoaderImpl.java:71)
at my.package.core.server.services.SchemaServiceImpl.getSchema(SchemaServiceImpl.java:144)
at my.package.core.server.SchemaDBInitialize.start(SchemaDBInitialize.java:91)
at com.google.inject.persist.jpa.JpaLocalTxnInterceptor.invoke(JpaLocalTxnInterceptor.java:70)
at my.package.core.server.LsServer.start(LsServer.java:161)
at my.package.core.server.AppInitializer.contextInitialized(AppInitializer.java:210)
这不是完整的堆栈跟踪 - 我只是包含了websphere内容停止的部分。这一行my.package.core.server.xml.impl.XmlDataBindingServiceJAXBImpl.getJaxbContext(XmlDataBindingServiceJAXBImpl.java:245)
只是从javax.xml.bind
调用JAXBContext。这一直持续到com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl,它来自jaxb-impl
依赖,它是对chemistry-opencmis-client-impl
的瞬态依赖。
这些是我的POM文件中的依赖声明:
<dependency>
<groupId>org.apache.chemistry.opencmis</groupId>
<artifactId>chemistry-opencmis-client-impl</artifactId>
<version>0.8.0</version>
<exclusions>
<exclusion>
<artifactId>chemistry-opencmis-client-bindings</artifactId>
<groupId>org.apache.chemistry.opencmis</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.chemistry.opencmis</groupId>
<artifactId>chemistry-opencmis-client-bindings-websphere</artifactId>
<version>0.8.0</version>
</dependency>
我尝试使用IBM JDK编译项目。
我想我可能在运行时遗漏了一些库,但我不确定哪些库,当然为什么(如前所述,在部署到Tomcat时我没有这个问题)。我会感激任何帮助或暗示,因为我一直在努力解决这个问题。
答案 0 :(得分:0)
@FlorianMüller的建议与(在评论中提到)将Axis2升级到1.7.5一起工作。然后,在部署冲突的jaxb库时,我们有很多VerifyErrors。删除所有xml解析依赖项(将它们放入WebSphere概要文件的提供范围) - 在我们的例子中,这些是geronimo-stax-api,xercesImpl,xml-apis,xml-beans,激活 - 最终解决了这个问题。