Hi,
Probably the stream got corrupted for some reason (e.g.,
non-replayable reader/stream was already consumed). But it's hard to
tell if this problem has already been solved by some of the patches in
the past, since your CXF version is way too old, Could you try it with
a more recent version such as 2.5.x or 2.6.x?

regards, aki

2012/12/10 javinott <[email protected]>:
> Hello,
>
> I am working on a project in which we have separate modules called:
>
> CORE: business layer which expose webservices via CXF.
> ADMIN, PRIV, PUB: struts2 modules that access core services
>
> At the beginning of the project we thought that each module may run in
> different application servers so that we apply this design. Nowadays, all
> modules are running on the same application server and
> we are finding ways to optimize response times.
>
> I have read about coloc feature and I think it can fits us very well, as it
> is supposed to detect if the service is locally or remotely invoked and acts
> in consequence avoiding marshalling and unmarshalling processes.
>
> I have enabled coloc by adding the following lines on my client and server
> cxf spring configuration files:
>
> <cxf:bus>
>                 <cxf:features>
>                         <coloc:enableColoc/>
>                 </cxf:features>
> </cxf:bus>
>
> We are using cxf 2.2.10, spring 3.0.4 and jdk 1.5. We are using simple
> client frontend and Aegis databinding, with MTOM enabled in some services
>
> When coloc is disabled, the communication between client and server works
> properly, but if I enable it, I'll get the following exception:
>
>  org.apache.cxf.binding.soap.SoapFault: Error reading XMLStreamReader.
>         at
> org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:230)
>         at
> org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:60)
>         at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:244)
>         at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:729)
>         at
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:2261)
>         at
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:2134)
>         at
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1988)
>         at 
> org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
>         at 
> org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:639)
>         at
> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
>         at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:244)
>         at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:516)
>         at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:313)
>         at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:265)
>         at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
>         at org.apache.cxf.frontend.ClientProxy.invoke(ClientProxy.java:68)
>         at $Proxy44.getAllConfigurations(Unknown Source)
>         at
> es.aragon.ccsv.admin.integration.admin.ConfigurationXML.saveConfiguration(ConfigurationXML.java:78)
>         at
> es.aragon.ccsv.admin.integration.admin.ConfigurationXML.<init>(ConfigurationXML.java:37)
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native 
> Method)
>         at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>         at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>         at java.lang.reflect.Constructor.newInstance(Constructor.java:501)
>         at 
> org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:126)
>         at
> org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:74)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:958)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:911)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
>         at
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:281)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
>         at
> org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580)
>         at
> org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
>         at
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
>         at
> org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
>         at
> org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
>         at
> org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
>         at
> org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3764)
>         at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4216)
>         at 
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
>         at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
>         at 
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
>         at 
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
>         at 
> org.apache.catalina.core.StandardService.start(StandardService.java:448)
>         at 
> org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
>         at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:592)
>         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
>         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
> 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:686)
>         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:122)
>         ... 55 more
> I have run the project in debug mode and the request is processed properly
> in the server side
> but the exception is thrown in the way back from the server to the client,
> in the ReadHeadersInterceptor in the following line:
>
>  if (xmlReader.nextTag() == XMLStreamConstants.START_ELEMENT)
>
> Do you have any clue about where the problem is?
> Is there any additional configuration task we should take into account?
>
> I have launched core and client modules in different tomcat instances in
> order to try that the services work as usual.
> If I solve the problem, I will try if coloc feature works properly in the
> same application server.
>
> Thanks in advance
>
>
>
>
>
>
>
> --
> View this message in context: 
> http://cxf.547215.n5.nabble.com/EOF-in-prolog-with-coloc-feature-enabled-tp5719947.html
> Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to