cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Natan (JIRA)" <j...@apache.org>
Subject [jira] Commented: (CXF-1648) org.apache.cxf.binding.soap.SoapFault: Error reading XMLStreamReader.
Date Mon, 22 Sep 2008 09:10:44 GMT

    [ https://issues.apache.org/jira/browse/CXF-1648?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12633184#action_12633184
] 

Natan commented on CXF-1648:
----------------------------

Hello, 

i get Could not create XMLStreamReader as well but only in particular cases.
I will try to describe the case and what tests done.


I am using CXF 2.1.2 with Jboss JBoss-4.3 
The simple HellowWorld example working me fine.

The simple reuqest working fine from client client.getMessages(); forking fine.
Event i put in loop client requets with Sleep(1000) between requets then everything works
fine for a long time.
If i put sleep between requests to 7-10 seconds then i get exception on server side in parsing
of the request.

See below log file (Request at 11:33:30 is ok and request at 11:33:40 failed.
It looks like some data from socket not read correct.
I put all cxf libs to the myproject.war file and not to the jboss/server/lib this did not
help

What can be reason?


I do the same test with Jetty (Here is project: http://www.jroller.com/brodkin/entry/a_maven_project_for_willie)
and there is no such problem



11:33:30,484 ERROR [STDERR] Sep 22, 2008 11:33:30 AM org.apache.cxf.interceptor.LoggingInInterceptor
logging
INFO: Inbound Message
----------------------------
Encoding: UTF-8
Headers: {connection=[keep-alive], host=[supportspace.com], user-agent=[Java/1.5.0_11], SOAPAction=[""],
transfer-encoding=[chunked], pragma=[no-cache], content-type=[text/xml; charset=UTF-8], accept=[*],
Cache-Control=[no-cache]}
Messages: 
Message:

Payload: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns1:getMessages
xmlns:ns1="http://contactus/" /></soap:Body></soap:Envelope>
--------------------------------------
11:33:30,484 ERROR [STDERR] Sep 22, 2008 11:33:30 AM org.apache.cxf.interceptor.LoggingOutInterceptor$LoggingCallback
onClose
INFO: Outbound Message
---------------------------
Encoding: UTF-8
Headers: {}
Messages: 
Payload: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns1:getMessagesResponse
xmlns:ns1="http://localhost:8080/support/webservices/contactus?wsdl"><return><ns2:Message
xmlns:ns2="http://service.stargate.supportspace.com"><ns2:email>anatolyg@supportspace.com.com</ns2:email><ns2:firstName>Anatoly</ns2:firstName><ns2:lastName>Gutnick</ns2:lastName><ns2:text>working
fine</ns2:text></ns2:Message><ns2:Message xmlns:ns2="http://service.stargate.supportspace.com"><ns2:email>danis@supportspace.com.com</ns2:email><ns2:firstName>Dani</ns2:firstName><ns2:lastName>Shaul</ns2:lastName><ns2:text>Please,
my money back</ns2:text></ns2:Message></return></ns1:getMessagesResponse></soap:Body></soap:Envelope>
--------------------------------------
11:33:40,515 ERROR [STDERR] Sep 22, 2008 11:33:40 AM org.apache.cxf.interceptor.LoggingInInterceptor
logging
INFO: Inbound Message
----------------------------
Encoding: UTF-8
Headers: {connection=[keep-alive], host=[supportspace.com], user-agent=[Java/1.5.0_11], SOAPAction=[""],
transfer-encoding=[chunked], pragma=[no-cache], content-type=[text/xml; charset=UTF-8], accept=[*],
Cache-Control=[no-cache]}
Messages: 
Message:

Payload: ˆ*&*^^&@#^@##@22

--------------------------------------
11:33:40,531 ERROR [STDERR] Sep 22, 2008 11:33:40 AM org.apache.cxf.phase.PhaseInterceptorChain
doIntercept
INFO: Interceptor has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: Could not create XMLStreamReader (input was of encoding
UTF-8).
	at org.apache.cxf.interceptor.StaxInInterceptor.handleMessage(StaxInInterceptor.java:83)
	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:220)
	at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:78)
	at org.apache.cxf.transport.servlet.ServletDestination.invoke(ServletDestination.java:92)
	at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:283)
	at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:166)
	at org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCXFServlet.java:174)
	at org.apache.cxf.transport.servlet.AbstractCXFServlet.doPost(AbstractCXFServlet.java:152)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:265)
	at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107)
	at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72)
	at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
	at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:110)
	at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
	at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
	at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
	at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:135)
	at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
	at org.acegisecurity.wrapper.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:81)
	at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
	at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:229)
	at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
	at com.supportspace.stargate.webapp.filter.LoginTrackingFilter.doFilter(LoginTrackingFilter.java:43)
	at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
	at org.acegisecurity.ui.logout.LogoutFilter.doFilter(LogoutFilter.java:106)
	at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
	at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:286)
	at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
	at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:149)
	at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at com.supportspace.stargate.webapp.filter.DisableUrlSessionFilter.doFilter(DisableUrlSessionFilter.java:54)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
	at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
	at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
	at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
	at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:437)
	at org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(AjpProtocol.java:381)
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
	at java.lang.Thread.run(Thread.java:595)
Caused by: com.ctc.wstx.exc.WstxIOException: Invalid UTF-8 start byte 0x88 (at char #1, byte
#-1)
	at com.ctc.wstx.stax.WstxInputFactory.doCreateSR(WstxInputFactory.java:548)
	at com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java:604)
	at com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java:629)
	at com.ctc.wstx.stax.WstxInputFactory.createXMLStreamReader(WstxInputFactory.java:324)
	at org.apache.cxf.interceptor.StaxInInterceptor.handleMessage(StaxInInterceptor.java:81)
	... 58 more
Caused by: java.io.CharConversionException: Invalid UTF-8 start byte 0x88 (at char #1, byte
#-1)
	at com.ctc.wstx.io.UTF8Reader.reportInvalidInitial(UTF8Reader.java:302)
	at com.ctc.wstx.io.UTF8Reader.loadMore(UTF8Reader.java:396)
	at com.ctc.wstx.io.UTF8Reader.read(UTF8Reader.java:110)
	at com.ctc.wstx.io.ReaderBootstrapper.initialLoad(ReaderBootstrapper.java:245)
	at com.ctc.wstx.io.ReaderBootstrapper.bootstrapInput(ReaderBootstrapper.java:132)
	at com.ctc.wstx.stax.WstxInputFactory.doCreateSR(WstxInputFactory.java:543)
	... 62 more
11:33:40,531 ERROR [STDERR] Sep 22, 2008 11:33:40 AM org.apache.cxf.interceptor.LoggingOutInterceptor$LoggingCallback
onClose
INFO: Outbound Message
---------------------------
Encoding: UTF-8
Headers: {}
Messages: 
Payload: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><soap:Fault><faultcode>soap:Server</faultcode><faultstring>Could
not create XMLStreamReader (input was of encoding UTF-8).</faultstring></soap:Fault></soap:Body></soap:Envelope>
--------------------------------------

Details:

Here is configuration i do: http://wheelersoftware.com/articles/spring-cxf-web-services-3.html
Here is project: http://www.jroller.com/brodkin/entry/a_maven_project_for_willie

Here is client code:

public class ContactUsServiceIntegrationTest extends TestCase {

          public void testGetMessage() {

              //lookup client
	    ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(new String[]
        {"spring-test.xml"});
	    ContactUsService client = (ContactUsService)context.getBean("contactUsServiceClient");

        for( int ic = 0; ic <= 50; ic++)
        {
            System.out.println("--------------------------  testGetMessage number:" + ic);
            List<Message> messages = client.getMessages();
            System.out.println("messages.size()=" + messages.size());

            System.out.println("getFirstName messages.get(0).getFirstName():" + messages.get(0).getFirstName());
            System.out.println("getFirstName messages.get(0).getEmail():" + messages.get(0).getEmail());

            System.out.println("getFirstName messages.get(1).getFirstName():" + messages.get(1).getFirstName());
            System.out.println("getFirstName messages.get(1).getEmail():" + messages.get(1).getEmail());

           try {
                Thread.currentThread().sleep(10000);//sleep for 1000 ms
            } catch (InterruptedException e) {
                e.printStackTrace();  //To change body of catch statement use File | Settings
| File Templates.
            }
        }
    }









> org.apache.cxf.binding.soap.SoapFault: Error reading XMLStreamReader.
> ---------------------------------------------------------------------
>
>                 Key: CXF-1648
>                 URL: https://issues.apache.org/jira/browse/CXF-1648
>             Project: CXF
>          Issue Type: Sub-task
>    Affects Versions: 2.1
>         Environment: Windows XP, JBoss 4.0.5 GA, cxf 2.1
>            Reporter: victor escutia
>            Priority: Critical
>         Attachments: docuStampCXF.rar, docuStampCXFClient.rar, lista_libs.rar
>
>
> Hi all,
> i'm building the HelloWorld sample, with spring. I did everything for building the sample
in server side and in client side, the webservice deploy successfully in JBoss, even accessing
from the browser, i see the wsdl generated, but the problem is in the client, i configured
the spring xml and access the webservice in this form;:
>         ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(new
String[] {"META-INF/client-beans.xml"});
>         
> 	    HelloWorld client = (HelloWorld)context.getBean("client");
> 	    String response = client.sayHi("Joe");
> 	    System.out.println("Response: " + response);
> but, i got the following error in the line of invoking the remote method .sayHi("Joe"),
i think is nothing with the server because i test with tomcat 5.5 and is the same result.
> This is the client side exception:
> Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: Error reading XMLStreamReader.
> 	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:218)
> 	at $Proxy35.sayHi(Unknown Source)
> 	at clientCXF.conectar(clientCXF.java:17)
> 	at clientCXF.main(clientCXF.java:10)
> Caused by: org.apache.cxf.binding.soap.SoapFault: Error reading XMLStreamReader.
> 	at org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleMessage(Soap11FaultInInterceptor.java:70)
> 	at org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleMessage(Soap11FaultInInterceptor.java:35)
> 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:221)
> 	at org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:96)
> 	at org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessage(CheckFaultInterceptor.java:65)
> 	at org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessage(CheckFaultInterceptor.java:34)
> 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:221)
> 	at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:429)
> This is the server side exception:
> 12/06/2008 04:27:25 PM org.apache.cxf.phase.PhaseInterceptorChain doIntercept
> INFO: Interceptor has thrown exception, unwinding now
> org.apache.cxf.binding.soap.SoapFault: Error reading XMLStreamReader.
>         at org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:183)
>         at org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:54)
>         at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:221)
>         at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:78)
>         at org.apache.cxf.transport.servlet.ServletDestination.invoke(ServletDestination.java:92)
>         at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:214)
>         at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:151)
>         at org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCXFServlet.java:170)
>         at org.apache.cxf.transport.servlet.AbstractCXFServlet.doPost(AbstractCXFServlet.java:148)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
>         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
>         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
>         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
>         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
>         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
>         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
>         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
>         at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
>         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
>         at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
>         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
>         at java.lang.Thread.run(Thread.java:595)
> Caused by: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
>  at [row,col {unknown-source}]: [1,0]
>         at com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOF(StreamScanner.java:661)
>         at com.ctc.wstx.sr.BasicStreamReader.handleEOF(BasicStreamReader.java:2134)
>         at com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:2040)
>         at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1069)
>         at com.ctc.wstx.sr.BasicStreamReader.nextTag(BasicStreamReader.java:1095)
>         at org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:83)
> Any help will be appreciated!!!

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message