Announcement Announcement Module
Collapse
No announcement yet.
Couldn't get a SAX parser while constructing a envelope Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Couldn't get a SAX parser while constructing a envelope

    Hi,

    We are using a Spring WebServiceTemplate class in out application to access a WebService that is developed using Spring 1.5. The Client application is running on WebSphere App Server 6.1 and the Client also uses Spring-WS 1.5.

    The client application worked fine until few weeks before and one fine day after we started the App Server from RAD and trying to communicate with WebService, it started throwing the following exception

    [11/25/09 11:04:04:500 PST] 0000002c SystemErr R org.springframework.ws.soap.saaj.SaajSoapEnvelopeE xception: Could not access envelope: Couldn't get a SAX parser while constructing a envelope; nested exception is com.sun.xml.messaging.saaj.SOAPExceptionImpl: Couldn't get a SAX parser while constructing a envelope
    [11/25/09 11:04:04:500 PST] 0000002c SystemErr R at org.springframework.ws.soap.saaj.SaajSoapMessage.g etEnvelope(SaajSoapMessage.java:91)
    [11/25/09 11:04:04:500 PST] 0000002c SystemErr R at org.springframework.ws.soap.AbstractSoapMessage.ge tSoapBody(AbstractSoapMessage.java:36)
    [11/25/09 11:04:04:500 PST] 0000002c SystemErr R at org.springframework.ws.soap.AbstractSoapMessage.ha sFault(AbstractSoapMessage.java:56)
    [11/25/09 11:04:04:500 PST] 0000002c SystemErr R at org.springframework.ws.client.core.WebServiceTempl ate.hasFault(WebServiceTemplate.java:675)
    [11/25/09 11:04:04:500 PST] 0000002c SystemErr R at org.springframework.ws.client.core.WebServiceTempl ate.doSendAndReceive(WebServiceTemplate.java:557)
    [11/25/09 11:04:04:500 PST] 0000002c SystemErr R at org.springframework.ws.client.core.WebServiceTempl ate.sendAndReceive(WebServiceTemplate.java:501)
    [11/25/09 11:04:04:500 PST] 0000002c SystemErr R at org.springframework.ws.client.core.WebServiceTempl ate.marshalSendAndReceive(WebServiceTemplate.java: 350)
    [11/25/09 11:04:04:500 PST] 0000002c SystemErr R at org.springframework.ws.client.core.WebServiceTempl ate.marshalSendAndReceive(WebServiceTemplate.java: 344)
    [11/25/09 11:04:04:500 PST] 0000002c SystemErr R at org.springframework.ws.client.core.WebServiceTempl ate.marshalSendAndReceive(WebServiceTemplate.java: 336)


    I read in the spring forums that this error occurs because the InputStream is closed before the Request is completely written. And I also read that this bug is fixed in after 1.0, but I still see this exception.

    Any help is greatly appreciated.

    Thanks,
    JP

  • #2
    This is also giving us a hard time where we are using following environment

    1. Spring: 3.1.1.RELEASE
    2. Spring WS: 2.1.0.RELEASE
    3. Java: jdk1.7.0_11
    4. Server: GlassFish 3.1.2

    Could any body figure out a possible cause and/or solution please, I am providing my version of error log here.

    Thanks in advance.

    org.springframework.integration.MessageHandlingExc eption: org.springframework.ws.soap.saaj.SaajSoapEnvelopeE xception: Could not access envelope: Couldn't get a SAX parser while constructing a envelope; nested exception is com.sun.xml.messaging.saaj.SOAPExceptionImpl: Couldn't get a SAX parser while constructing a envelope
    at org.springframework.integration.handler.MethodInvo kingMessageProcessor.processMessage(MethodInvoking MessageProcessor.java:76)
    at org.springframework.integration.handler.ServiceAct ivatingHandler.handleRequestMessage(ServiceActivat ingHandler.java:64)
    at org.springframework.integration.handler.AbstractRe plyProducingMessageHandler.handleMessageInternal(A bstractReplyProducingMessageHandler.java:97)
    at org.springframework.integration.handler.AbstractMe ssageHandler.handleMessage(AbstractMessageHandler. java:73)
    at org.springframework.integration.handler.MessageHan dlerChain$1.send(MessageHandlerChain.java:154)
    at org.springframework.integration.core.MessagingTemp late.doSend(MessagingTemplate.java:288)
    at org.springframework.integration.core.MessagingTemp late.send(MessagingTemplate.java:149)
    at org.springframework.integration.handler.AbstractRe plyProducingMessageHandler.sendMessage(AbstractRep lyProducingMessageHandler.java:175)
    at org.springframework.integration.handler.AbstractRe plyProducingMessageHandler.sendReplyMessage(Abstra ctReplyProducingMessageHandler.java:159)
    at org.springframework.integration.handler.AbstractRe plyProducingMessageHandler.produceReply(AbstractRe plyProducingMessageHandler.java:124)
    at org.springframework.integration.handler.AbstractRe plyProducingMessageHandler.handleResult(AbstractRe plyProducingMessageHandler.java:118)
    at org.springframework.integration.handler.AbstractRe plyProducingMessageHandler.handleMessageInternal(A bstractReplyProducingMessageHandler.java:100)
    at org.springframework.integration.handler.AbstractMe ssageHandler.handleMessage(AbstractMessageHandler. java:73)
    .
    .
    .
    .
    .
    .
    .
    .
    .
    at $Proxy222.adjustLineQuantity(Unknown Source)
    at com.digipos.controllers.AssociateSaleBasketItemCon troller.adjustBasketItemQuantity(AssociateSaleBask etItemController.java:83)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.springframework.web.method.support.InvocableHa ndlerMethod.invoke(InvocableHandlerMethod.java:213 )
    at org.springframework.web.method.support.InvocableHa ndlerMethod.invokeForRequest(InvocableHandlerMetho d.java:126)
    at org.springframework.web.servlet.mvc.method.annotat ion.ServletInvocableHandlerMethod.invokeAndHandle( ServletInvocableHandlerMethod.java:96)
    at org.springframework.web.servlet.mvc.method.annotat ion.RequestMappingHandlerAdapter.invokeHandlerMeth od(RequestMappingHandlerAdapter.java:617)
    at org.springframework.web.servlet.mvc.method.annotat ion.RequestMappingHandlerAdapter.handleInternal(Re questMappingHandlerAdapter.java:578)
    at org.springframework.web.servlet.mvc.method.Abstrac tHandlerMethodAdapter.handle(AbstractHandlerMethod Adapter.java:80)
    at org.springframework.web.servlet.DispatcherServlet. doDispatch(DispatcherServlet.java:923)
    at org|#]

    [#|2013-03-11T09:58:45.671+0000|INFO|glassfish3.1.2|javax.ent erprise.system.std.com.sun.enterprise.server.loggi ng|_ThreadID=186;_ThreadName=Thread-2;|.springframework.web.servlet.DispatcherServlet. doService(DispatcherServlet.java:852)
    at org.springframework.web.servlet.FrameworkServlet.p rocessRequest(FrameworkServlet.java:882)
    at org.springframework.web.servlet.FrameworkServlet.d oPost(FrameworkServlet.java:789)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:688)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:770)
    at org.apache.catalina.core.StandardWrapper.service(S tandardWrapper.java:1550)
    at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:343)
    at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:217)
    .
    .
    .
    .
    .
    .
    .
    .
    at com.sun.grizzly.util.AbstractThreadPool$Worker.doW ork(AbstractThreadPool.java:532)
    at com.sun.grizzly.util.AbstractThreadPool$Worker.run (AbstractThreadPool.java:513)
    at java.lang.Thread.run(Thread.java:722)
    Caused by: org.springframework.ws.soap.saaj.SaajSoapEnvelopeE xception: Could not access envelope: Couldn't get a SAX parser while constructing a envelope; nested exception is com.sun.xml.messaging.saaj.SOAPExceptionImpl: Couldn't get a SAX parser while constructing a envelope
    at org.springframework.ws.soap.saaj.SaajSoapMessage.g etSaajVersion(SaajSoapMessage.java:260)
    at org.springframework.ws.soap.saaj.SaajSoapMessage.g etImplementation(SaajSoapMessage.java:342)
    at org.springframework.ws.soap.saaj.SaajSoapMessage.< init>(SaajSoapMessage.java:117)
    at org.springframework.ws.soap.saaj.SaajSoapMessageFa ctory.createWebServiceMessage(SaajSoapMessageFacto ry.java:186)
    at org.springframework.ws.soap.saaj.SaajSoapMessageFa ctory.createWebServiceMessage(SaajSoapMessageFacto ry.java:60)
    at org.springframework.ws.transport.AbstractWebServic eConnection.receive(AbstractWebServiceConnection.j ava:90)
    at org.springframework.ws.client.core.WebServiceTempl ate.doSendAndReceive(WebServiceTemplate.java:589)
    at org.springframework.ws.client.core.WebServiceTempl ate.sendAndReceive(WebServiceTemplate.java:537)
    at org.springframework.ws.client.core.WebServiceTempl ate.marshalSendAndReceive(WebServiceTemplate.java: 384)
    at org.springframework.ws.client.core.WebServiceTempl ate.marshalSendAndReceive(WebServiceTemplate.java: 378)
    at com.digipos.service.clarity.POSRTIService.lineItem Adjust(POSRTIService.java:115)
    at com.digipos.service.sales.operator.V5BasketOperati onService.performPOSRTIOperation(V5BasketOperation Service.java:88)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.springframework.expression.spel.support.Reflec tiveMethodExecutor.execute(ReflectiveMethodExecuto r.java:69)
    at org.springframework.expression.spel.ast.MethodRefe rence.getValueInternal(MethodReference.java:84)
    at org.springframework.expression.spel.ast.CompoundEx pression.getValueInternal(CompoundExpression.java: 57)
    at org.springframework.expression.spel.ast.SpelNodeIm pl.getTypedValue(SpelNodeImpl.java:102)
    at org.springframework.expression.spel.standard.SpelE xpression.getValue(SpelExpression.java:102)
    at org.springframework.integration.util.AbstractExpre ssionEvaluator.evaluateExpression(AbstractExpressi onEvaluator.java:126)
    at org.springframework.integration.util.MessagingMeth odInvokerHelper.processInternal(MessagingMethodInv okerHelper.java:225)
    at org.springframework.integration.util.MessagingMeth odInvokerHelper.process(MessagingMethodInvokerHelp er.java:125)
    at org.springframework.integration.handler.MethodInvo ki|#]

    [#|2013-03-11T09:58:45.671+0000|INFO|glassfish3.1.2|javax.ent erprise.system.std.com.sun.enterprise.server.loggi ng|_ThreadID=186;_ThreadName=Thread-2;|ngMessageProcessor.processMessage(MethodInvokin gMessageProcessor.java:73)
    ... 125 more
    Caused by: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Couldn't get a SAX parser while constructing a envelope
    at com.sun.xml.messaging.saaj.soap.EnvelopeFactory.cr eateEnvelope(EnvelopeFactory.java:94)
    at com.sun.xml.messaging.saaj.soap.ver1_1.SOAPPart1_1 Impl.createEnvelopeFromSource(SOAPPart1_1Impl.java :83)
    at com.sun.xml.messaging.saaj.soap.SOAPPartImpl.getEn velope(SOAPPartImpl.java:143)
    at org.springframework.ws.soap.saaj.support.SaajUtils .getSaajVersion(SaajUtils.java:155)
    at org.springframework.ws.soap.saaj.SaajSoapMessage.g etSaajVersion(SaajSoapMessage.java:257)
    ... 149 more
    Caused by: org.xml.sax.SAXException
    java.lang.InterruptedException
    at com.sun.xml.messaging.saaj.util.ParserPool.get(Par serPool.java:88)
    at com.sun.xml.messaging.saaj.soap.EnvelopeFactory.cr eateEnvelope(EnvelopeFactory.java:91)
    ... 153 more
    Caused by: java.lang.InterruptedException
    at java.util.concurrent.locks.AbstractQueuedSynchroni zer.acquireInterruptibly(AbstractQueuedSynchronize r.java:1219)
    at java.util.concurrent.locks.ReentrantLock.lockInter ruptibly(ReentrantLock.java:340)
    at java.util.concurrent.ArrayBlockingQueue.take(Array BlockingQueue.java:371)
    at com.sun.xml.messaging.saaj.util.ParserPool.get(Par serPool.java:86)
    ... 154 more

    Comment

    Working...
    X