title: Couldn't create SOAP message due to exception: Unable to create StAX reader or writer at com.sun.xml.internal.ws.encoding.SOAPBindingCodec.decode
body: <p>my application currently facing below error on production environment. My java version on production is java version "1.7.0_51"
  OpenJDK Runtime Environment (rhel-2.4.4.1.el6_5-x86_64 u51-b02)
  OpenJDK 64-Bit Server VM (build 24.45-b08, mixed mode)</p>
  
  <p>Can someone help me?</p>
  
  <p>The error is: </p>
  
  <pre><code>com.sun.xml.internal.ws.protocol.soap.MessageCreationException: Couldn't create SOAP message due to exception: Unable to create StAX reader or writer
      com.sun.xml.internal.ws.protocol.soap.MessageCreationException: Couldn't create SOAP message due to exception: Unable to create StAX reader or writer
              at com.sun.xml.internal.ws.encoding.SOAPBindingCodec.decode(SOAPBindingCodec.java:348) ~[na:1.7.0_51]
              at com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.createResponsePacket(HttpTransportPipe.java:254) ~[na:1.7.0_51]
              at com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.process(HttpTransportPipe.java:203) ~[na:1.7.0_51]
              at com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.processRequest(HttpTransportPipe.java:122) ~[na:1.7.0_51]
              at com.sun.xml.internal.ws.transport.DeferredTransportPipe.processRequest(DeferredTransportPipe.java:95) ~[na:1.7.0_51]
              at com.sun.xml.internal.ws.api.pipe.Fiber.__doRun(Fiber.java:626) ~[na:1.7.0_51]
              at com.sun.xml.internal.ws.api.pipe.Fiber._doRun(Fiber.java:585) ~[na:1.7.0_51]
              at com.sun.xml.internal.ws.api.pipe.Fiber.doRun(Fiber.java:570) ~[na:1.7.0_51]
              at com.sun.xml.internal.ws.api.pipe.Fiber.runSync(Fiber.java:467) ~[na:1.7.0_51]
              at com.sun.xml.internal.ws.client.Stub.process(Stub.java:308) ~[na:1.7.0_51]
              at com.sun.xml.internal.ws.client.sei.SEIStub.doProcess(SEIStub.java:163) ~[na:1.7.0_51]
              at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:98) ~[na:1.7.0_51]
              at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:78) ~[na:1.7.0_51]
              at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(SEIStub.java:135) ~[na:1.7.0_51]
              at com.sun.proxy.$Proxy77.searchAssets(Unknown Source) ~[na:na]
              at com.ericsson.media.aggregator.client.MediaQueryWSClient.getAssetDetails(MediaQueryWSClient.java:76) ~[MediaQueryWSClient.class:na]
              at com.ericsson.media.aggregator.dao.MediaAggregatorDAO.callIndexerToBuildAssetMeta(MediaAggregatorDAO.java:393) [MediaAggregatorDAO.class:na]
              at com.ericsson.media.aggregator.dao.MediaAggregatorDAO.getlists(MediaAggregatorDAO.java:200) [MediaAggregatorDAO.class:na]
              at com.ericsson.media.aggregator.rest.MediaAggregatorService.getlists(MediaAggregatorService.java:68) [MediaAggregatorService.class:na]
              at sun.reflect.GeneratedMethodAccessor37.invoke(Unknown Source) ~[na:na]
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_51]
              at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_51]
              at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:140) [resteasy-jaxrs-2.2.1.GA.jar:na]
              at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:255) [resteasy-jaxrs-2.2.1.GA.jar:na]
              at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:220) [resteasy-jaxrs-2.2.1.GA.jar:na]
              at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:209) [resteasy-jaxrs-2.2.1.GA.jar:na]
              at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:519) [resteasy-jaxrs-2.2.1.GA.jar:na]
              at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:496) [resteasy-jaxrs-2.2.1.GA.jar:na]
              at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:119) [resteasy-jaxrs-2.2.1.GA.jar:na]
              at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208) [resteasy-jaxrs-2.2.1.GA.jar:na]
      at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55) [resteasy-jaxrs-2.2.1.GA.jar:na]
              at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50) [resteasy-jaxrs-2.2.1.GA.jar:na]
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) [servlet-api.jar:na]
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) [catalina.jar:7.0.53]
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) [catalina.jar:7.0.53]
              at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) [tomcat7-websocket.jar:7.0.53]
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) [catalina.jar:7.0.53]
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) [catalina.jar:7.0.53]
              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220) [catalina.jar:7.0.53]
              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122) [catalina.jar:7.0.53]
              at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501) [catalina.jar:7.0.53]
              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170) [catalina.jar:7.0.53]
              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98) [catalina.jar:7.0.53]
              at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950) [catalina.jar:7.0.53]
              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) [catalina.jar:7.0.53]
              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) [catalina.jar:7.0.53]
              at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040) [tomcat-coyote.jar:7.0.53]
              at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607) [tomcat-coyote.jar:7.0.53]
              at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:313) [tomcat-coyote.jar:7.0.53]
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_51]
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_51]
              at java.lang.Thread.run(Thread.java:744) [na:1.7.0_51]
      Caused by: com.sun.xml.internal.ws.streaming.XMLReaderException: Unable to create StAX reader or writer
              at com.sun.xml.internal.ws.api.streaming.XMLStreamReaderFactory$Default.doCreate(XMLStreamReaderFactory.java:367) ~[na:1.7.0_51]
              at com.sun.xml.internal.ws.api.streaming.XMLStreamReaderFactory.doCreate(XMLStreamReaderFactory.java:193) ~[na:1.7.0_51]
              at com.sun.xml.internal.ws.api.streaming.XMLStreamReaderFactory.create(XMLStreamReaderFactory.java:143) ~[na:1.7.0_51]
              at com.sun.xml.internal.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:290) ~[na:1.7.0_51]
              at com.sun.xml.internal.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:118) ~[na:1.7.0_51]
       at com.sun.xml.internal.ws.encoding.SOAPBindingCodec.decode(SOAPBindingCodec.java:343) ~[na:1.7.0_51]
              ... 51 common frames omitted
      Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,1]
      Message: JAXP00010001: The parser has encountered more than "64000" entity expansions in this document; this is the limit imposed by the JDK.
  </code></pre>