我们正在将 Java EE 系统的 Java 版本从 1.6 升级到 1.7。我们广泛使用spring webservice(服务器端为1.5.8,客户端为2.0.4)。
初始测试(使用 java7)显示 Web 服务调用出现间歇性问题,如下所示(我们在客户端和服务器上都使用 GlassFish 3.1.2.2,最近升级了)
- 失败1(下面的服务器端日志)
服务器端间歇性故障(服务器 springws-1.5.8 和客户端 spring-ws-2.0.4 - Java 从 1.6 升级到 1.7)
java.lang.IllegalStateException: Could not find SAAJ on the classpath
at org.springframework.ws.soap.saaj.SaajSoapMessage.getImplementation(SaajSoapMessage.java:261)
at org.springframework.ws.soap.saaj.SaajSoapMessage.<init>(SaajSoapMessage.java:84)
at org.springframework.ws.soap.saaj.SaajSoapMessage.<init>(SaajSoapMessage.java:70)
at org.springframework.ws.soap.saaj.SaajSoapMessageFactory.createWebServiceMessage(SaajSoapMessageFactory.java:168)
at org.springframework.ws.transport.AbstractWebServiceConnection.receive(AbstractWebServiceConnection.java:86)
at org.springframework.ws.transport.support.WebServiceMessageReceiverObjectSupport.handleConnection(WebServiceMessageReceiverObjectSupport.java:86)
at org.springframework.ws.transport.http.WebServiceMessageReceiverHandlerAdapter.handle(WebServiceMessageReceiverHandlerAdapter.java:57)
根据我的分析,上述问题似乎是由于 spring ws 1.5.8 版的已知问题引起的 - https://jira.springsource.org/browse/SWS-750已在 2.0.4 中修复。但是在做版本升级之前,我想确定一下spring ws 是否正式支持Java7。任何想法?无论如何,如果我们将客户端的 java 版本恢复到 1.6,这个问题似乎得到了解决——怀疑这与 jdk7 中打包的 xerces/xalan 版本有关
- 失败2(下面的服务器端日志)
我们在另一个子系统上有类似的错误,其中服务器是 springws-2.0.4,客户端是 spring-ws-1.5.8 - Java 从 1.6 升级到 1.7。
org.springframework.ws.transport.http.MessageDispatcherServlet: Could not complete request
org.springframework.ws.soap.saaj.SaajSoapEnvelopeException: Could not access envelope: Unable to create envelope from given source: ; nested exception is com.sun.xml.messaging.saaj.SOAPExceptionImpl: Unable to create envelope from given source:
at org.springframework.ws.soap.saaj.SaajSoapMessage.getSaajVersion(SaajSoapMessage.java:260)
at org.springframework.ws.soap.saaj.SaajSoapMessage.getImplementation(SaajSoapMessage.java:342)
at org.springframework.ws.soap.saaj.SaajSoapMessage.<init>(SaajSoapMessage.java:117)
at org.springframework.ws.soap.saaj.SaajSoapMessageFactory.createWebServiceMessage(SaajSoapMessageFactory.java:184)
at org.springframework.ws.soap.saaj.SaajSoapMessageFactory.createWebServiceMessage(SaajSoapMessageFactory.java:58)
at org.springframework.ws.transport.AbstractWebServiceConnection.receive(AbstractWebServiceConnection.java:90)
任何帮助,将不胜感激。