Announcement Announcement Module
Collapse
No announcement yet.
Thread safety issue with requests to WSDL Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Thread safety issue with requests to WSDL

    I have a test client for a WS that runs over multiple threads. When I start my server app and then the test client, I sometimes get an exception on the first request (but not always). If the exception occurs, all client requests give an exception.

    If I start the test client with a single thread the exception never occurs. I can then start the client again with as many threads as I want, I never get an exception.

    In other words, looks like there is a race condition / thread safety issue on some initialization code.


    Here is an exception thrown on the server. I've seen other variations, but always thrown by xerces during the WsdlDefinitionHandlerAdapter.handle() call.

    23-Oct-2012 3:07:56 PM org.apache.catalina.core.StandardWrapperValve invoke
    SEVERE: Servlet.service() for servlet distributionsystem-ws threw exception
    java.lang.NullPointerException
    at com.sun.org.apache.xerces.internal.dom.DeferredAtt rNSImpl.synchronizeData(DeferredAttrNSImpl.java:97 )
    at com.sun.org.apache.xerces.internal.dom.AttrImpl.ge tNodeName(AttrImpl.java:266)
    at com.sun.org.apache.xerces.internal.dom.AttributeMa p.setNamedItem(AttributeMap.java:105)
    at com.sun.org.apache.xerces.internal.dom.DeferredEle mentNSImpl.synchronizeData(DeferredElementNSImpl.j ava:122)
    at com.sun.org.apache.xerces.internal.dom.ElementNSIm pl.getNamespaceURI(ElementNSImpl.java:246)
    at org.apache.xml.serializer.TreeWalker.startNode(Tre eWalker.java:312)
    at org.apache.xml.serializer.TreeWalker.traverse(Tree Walker.java:145)
    at org.apache.xalan.transformer.TransformerIdentityIm pl.transform(TransformerIdentityImpl.java:390)
    at org.springframework.ws.transport.http.WsdlDefiniti onHandlerAdapter.handle(WsdlDefinitionHandlerAdapt er.java:125)
    at org.springframework.ws.transport.http.MessageDispa tcherServlet.doService(MessageDispatcherServlet.ja va:222)
    at org.springframework.web.servlet.FrameworkServlet.p rocessRequest(FrameworkServlet.java:882)
    at org.springframework.web.servlet.FrameworkServlet.d oGet(FrameworkServlet.java:778)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:617)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:717)
    at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:206)
    at com.yammer.metrics.web.WebappMetricsFilter.doFilte r(WebappMetricsFilter.java:76)
    at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:206)
    at com.microsigns.common.spring.mvc.HttpServletRespon seInScopeFilter.doFilter(HttpServletResponseInScop eFilter.java:35)
    at org.springframework.web.filter.DelegatingFilterPro xy.invokeDelegate(DelegatingFilterProxy.java:346)
    at org.springframework.web.filter.DelegatingFilterPro xy.doFilter(DelegatingFilterProxy.java:259)
    at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:206)
    at com.microsigns.common.spring.mvc.AuditLogServletFi lter.doFilter(AuditLogServletFilter.java:96)
    at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:206)
    at org.springframework.web.filter.CharacterEncodingFi lter.doFilterInternal(CharacterEncodingFilter.java :88)
    at org.springframework.web.filter.OncePerRequestFilte r.doFilter(OncePerRequestFilter.java:76)
    at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:206)
    at org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 330)
    at org.springframework.security.web.access.intercept. FilterSecurityInterceptor.invoke(FilterSecurityInt erceptor.java:118)
    at org.springframework.security.web.access.intercept. FilterSecurityInterceptor.doFilter(FilterSecurityI nterceptor.java:84)
    at org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 342)
    at org.springframework.security.web.access.ExceptionT ranslationFilter.doFilter(ExceptionTranslationFilt er.java:113)
    at org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 342)
    at org.springframework.security.web.session.SessionMa nagementFilter.doFilter(SessionManagementFilter.ja va:103)
    at org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 342)
    at org.springframework.security.web.authentication.An onymousAuthenticationFilter.doFilter(AnonymousAuth enticationFilter.java:113)
    at org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 342)
    at org.springframework.security.web.authentication.re memberme.RememberMeAuthenticationFilter.doFilter(R ememberMeAuthenticationFilter.java:139)
    at org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 342)
    at org.springframework.security.web.servletapi.Securi tyContextHolderAwareRequestFilter.doFilter(Securit yContextHolderAwareRequestFilter.java:54)
    at org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 342)
    at org.springframework.security.web.savedrequest.Requ estCacheAwareFilter.doFilter(RequestCacheAwareFilt er.java:45)
    at org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 342)
    at org.springframework.security.web.authentication.http://www.BasicAuthenticationFilter...lter.java:150)
    at org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 342)
    at org.springframework.security.web.authentication.Ab stractAuthenticationProcessingFilter.doFilter(Abst ractAuthenticationProcessingFilter.java:183)
    at org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 342)
    at org.springframework.security.web.authentication.lo gout.LogoutFilter.doFilter(LogoutFilter.java:105)
    at org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 342)
    at org.springframework.security.web.context.SecurityC ontextPersistenceFilter.doFilter(SecurityContextPe rsistenceFilter.java:87)
    at org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 342)
    at org.springframework.security.web.access.channel.Ch annelProcessingFilter.doFilter(ChannelProcessingFi lter.java:144)
    at org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 342)
    at org.springframework.security.web.FilterChainProxy. doFilterInternal(FilterChainProxy.java:192)
    at org.springframework.security.web.FilterChainProxy. doFilter(FilterChainProxy.java:160)
    at org.springframework.web.filter.DelegatingFilterPro xy.invokeDelegate(DelegatingFilterProxy.java:346)
    at org.springframework.web.filter.DelegatingFilterPro xy.doFilter(DelegatingFilterProxy.java:259)
    at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:206)
    at com.microsigns.common.spring.test.WatchUtilServlet Filter.doFilter(WatchUtilServletFilter.java:51)
    at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperValve.java:233)
    at org.apache.catalina.core.StandardContextValve.invo ke(StandardContextValve.java:191)
    at org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:102)
    at org.apache.catalina.core.StandardEngineValve.invok e(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.servic e(CoyoteAdapter.java:293)
    at org.apache.coyote.http11.Http11Processor.process(H ttp11Processor.java:859)
    at org.apache.coyote.http11.Http11Protocol$Http11Conn ectionHandler.process(Http11Protocol.java:602)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run( JIoEndpoint.java:489)
    at java.lang.Thread.run(Thread.java:662)


    If this exception occurs, then all client calls will throw
    javax.xml.ws.WebServiceException: {http://www.mycorp.com/ws/scs_v1_1_0}myService is not a valid service. Valid services are: myService


    We're running Spring 3.1.3 and Spring WS 1.5.10 on Tomcat 6.0.35 on Java 1.6.0_37, but we have been having this issue for a long time, probably dating back to spring 2.5.

    Any pointers would be appreciated
    Marc

  • #2
    This issue looks similar but was never solved
    https://jira.springsource.org/browse/SWS-200

    Comment

    Working...
    X