我们正在开展一个大项目,并且正在将 JBoss 安装迁移到使用 JDK7,当前它使用 JDK6 并且一切运行良好,但我们需要使用 JDK7,但不能使用 JBOSS 6 作为替代。
启动 JBOSS 时,如果启用了 jaxb 调试,我们会收到以下错误:
[java] 11:57:28,477 ERROR [STDERR] ????. 15, 2012 11:57:28 AM javax.xml.bind
[java] FINE: Trying to locate org/jboss/security/xacml/jaxb/jaxb.properties
[java] 11:57:28,480 ERROR [STDERR] ????. 15, 2012 11:57:28 AM javax.xml.bind
[java] FINE: not found
[java] 11:57:28,480 ERROR [STDERR] ????. 15, 2012 11:57:28 AM javax.xml.bind
[java] FINE: Checking system property javax.xml.bind.context.factory
[java] 11:57:28,481 ERROR [STDERR] ????. 15, 2012 11:57:28 AM javax.xml.bind
[java] FINE: not found
[java] 11:57:28,481 ERROR [STDERR] ????. 15, 2012 11:57:28 AM javax.xml.bind
[java] FINE: Checking system property javax.xml.bind.JAXBContext
[java] 11:57:28,481 ERROR [STDERR] ????. 15, 2012 11:57:28 AM javax.xml.bind
[java] FINE: not found
[java] 11:57:28,482 ERROR [STDERR] ????. 15, 2012 11:57:28 AM javax.xml.bind
[java] FINE: Unable to find from OSGi: javax.xml.bind.JAXBContext
[java] 11:57:28,482 ERROR [STDERR] ????. 15, 2012 11:57:28 AM javax.xml.bind
[java] FINE: Checking META-INF/services
[java] 11:57:28,482 ERROR [STDERR] ????. 15, 2012 11:57:28 AM javax.xml.bind
[java] FINE: Reading jar:file:/D:/Product/jboss-5.1.0.GA/lib/endorsed/jaxb-impl.jar!/META-INF/services/javax.xml.bind.JAXBContext
[java] 11:57:28,483 ERROR [STDERR] ????. 15, 2012 11:57:28 AM javax.xml.bind
[java] FINE: Trying to load com.sun.xml.bind.v2.ContextFactory
[java] 11:57:28,483 ERROR [STDERR] ????. 15, 2012 11:57:28 AM javax.xml.bind
[java] FINE: loaded com.sun.xml.bind.v2.ContextFactory from jar:file:/D:/Product/jboss-5.1.0.GA/lib/endorsed/jaxb-impl.jar!/com/sun/xml/bind/v2/ContextFactory.class
当 SOAP 请求在解组部分进行处理时,会发生此错误。
另外,SOAP 请求还会产生下一组错误:
[java] javax.xml.ws.WebServiceException: java.lang.IllegalArgumentException: prefix xs is not bound to a namespace
[java] at org.jboss.ws.core.jaxws.JAXBDeserializer.handleUnmarshallException(JAXBDeserializer.java:110)
[java] at org.jboss.ws.core.jaxws.JAXBDeserializer.deserialize(JAXBDeserializer.java:78)
[java] at org.jboss.ws.core.binding.DeserializerSupport.deserialize(DeserializerSupport.java:58)
[java] at org.jboss.ws.core.soap.XMLContent.unmarshallObjectContents(XMLContent.java:179)
[java] at org.jboss.ws.core.soap.XMLContent.transitionTo(XMLContent.java:96)
[java] at org.jboss.ws.core.soap.DOMContent.transitionTo(DOMContent.java:74)
[java] at org.jboss.ws.core.soap.SOAPContentElement.transitionTo(SOAPContentElement.java:140)
[java] at org.jboss.ws.core.soap.SOAPBodyElementDoc.transitionTo(SOAPBodyElementDoc.java:85)
[java] at org.jboss.ws.core.soap.SOAPContentElement.getObjectValue(SOAPContentElement.java:172)
[java] at org.jboss.ws.core.EndpointInvocation.transformPayloadValue(EndpointInvocation.java:261)
[java] at org.jboss.ws.core.EndpointInvocation.getRequestParamValue(EndpointInvocation.java:113)
[java] at org.jboss.ws.core.EndpointInvocation.getRequestPayload(EndpointInvocation.java:133)
[java] at org.jboss.ws.core.server.DelegatingInvocation.getArgs(DelegatingInvocation.java:80)
[java] at org.jboss.wsf.container.jboss50.invocation.InvocationHandlerEJB3.invoke(InvocationHandlerEJB3.java:93)
[java] at org.jboss.ws.core.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:222)
[java] at org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHandlerImpl.java:474)
[java] at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:295)
[java] at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:205)
[java] at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:131)
[java] at org.jboss.wsf.common.servlet.AbstractEndpointServlet.service(AbstractEndpointServlet.java:85)
[java] at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
[java] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
[java] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
[java] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
[java] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
[java] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
[java] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
[java] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
[java] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
[java] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
[java] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
[java] at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
[java] at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
[java] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
[java] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
[java] at org.jboss.web.rewrite.RewriteValve.invoke(RewriteValve.java:460)
[java] at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
[java] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
[java] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
[java] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
[java] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
[java] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
[java] at java.lang.Thread.run(Thread.java:722)
我们尝试用最新版本的 jaxws 2.2.7 替换客户端目录中的原始 JBoss 5.1.0 分布式库,因为其中一些库(例如 jaxb)出现了一些错误(忘记记录它们,抱歉)。
但 SOAP 仍然不起作用。
如果需要任何其他信息,请在下方评论。
谢谢。
答案1
不幸的是,JBoss 5.1 不支持在 JDK7 上运行,因此您遇到的部分可见问题,在生产环境中运行此配置可能会很危险。
看着与 JBoss EAP 5.1 兼容的配置(对于 GA - 社区版本应该相同)。在 jboss.org 论坛中,您可以找到有关不兼容。
为什么你真的需要升级到 JDK7?请记住,你可以在同一台服务器上拥有多个 JDK 版本,并选择使用哪个版本来运行 JBoss。