You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Laurent Pellegrino <la...@gmail.com> on 2012/04/13 15:45:06 UTC
Unmarshalling Error
Hi all,
I have deployed a Webservice with CXF and I am invoking several times
a method from this webservice with, always, the same payload. The
first requests are handled correctly some sometimes I get an
unmarshall exception. Any idea?
org.apache.cxf.phase.PhaseInterceptorChain doDefaultLogging
ATTENTION: Interceptor for
{http://services.webservices.eventcloud.inria.fr/}SubscriberServiceImplService#{http://docs.oasis-open.org/wsn/bw-2}Notify
has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: Unmarshalling Error: Unexpected
character '2' (code 50) (expected a name start character)
at [row,col {unknown-source}]: [1,514]
at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:822)
at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:643)
at org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:156)
at org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:201)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:123)
at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceRequest(JettyHTTPDestination.java:323)
at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:289)
at org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:72)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:943)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:879)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:250)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:110)
at org.eclipse.jetty.server.Server.handle(Server.java:345)
at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:441)
at org.eclipse.jetty.server.HttpConnection$RequestHandler.content(HttpConnection.java:936)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:801)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:224)
at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:51)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:586)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:44)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:598)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:533)
at java.lang.Thread.run(Thread.java:662)
Caused by: javax.xml.bind.UnmarshalException
- with linked exception:
[com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character
'2' (code 50) (expected a name start character)
at [row,col {unknown-source}]: [1,514]]
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.handleStreamException(UnmarshallerImpl.java:435)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:371)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:348)
at org.apache.cxf.jaxb.JAXBEncoderDecoder.doUnmarshal(JAXBEncoderDecoder.java:783)
at org.apache.cxf.jaxb.JAXBEncoderDecoder.access$100(JAXBEncoderDecoder.java:96)
at org.apache.cxf.jaxb.JAXBEncoderDecoder$1.run(JAXBEncoderDecoder.java:811)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:809)
... 24 more
Caused by: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected
character '2' (code 50) (expected a name start character)
at [row,col {unknown-source}]: [1,514]
at com.ctc.wstx.sr.StreamScanner.throwUnexpectedChar(StreamScanner.java:639)
at com.ctc.wstx.sr.StreamScanner.parseLocalName(StreamScanner.java:1798)
at com.ctc.wstx.sr.BasicStreamReader.handleNsAttrs(BasicStreamReader.java:2982)
at com.ctc.wstx.sr.BasicStreamReader.handleStartElem(BasicStreamReader.java:2926)
at com.ctc.wstx.sr.BasicStreamReader.nextFromTree(BasicStreamReader.java:2802)
at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1050)
at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(StAXStreamConnector.java:197)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:369)
... 30 more
org.apache.cxf.services.SubscriberServiceImplService.SubscriberServiceImplPort.NotificationConsumer
INFO: Inbound Message
----------------------------
ID: 301
Address: http://138.96.195.238:9002/subscriber
Encoding: UTF-8
Http-Method: POST
Content-Type: text/xml; charset=UTF-8
Headers: {Accept=[*/*], Cache-Control=[no-cache],
connection=[keep-alive], Content-Length=[2068],
content-type=[text/xml; charset=UTF-8], Host=[138.96.195.238:9002],
Pragma=[no-cache], SOAPAction=[""], User-Agent=[Apache CXF 2.5.2]}
Payload: <soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns2:Notify
xmlns="http://www.w3.org/2005/08/addressing"
xmlns:ns2="http://docs.oasis-open.org/wsn/b-2"
xmlns:ns3="http://docs.oasis-open.org/wsrf/bf-2"
xmlns:ns4="http://docs.oasis-open.org/wsrf/rp-2"
xmlns:ns5="http://docs.oasis-open.org/wsn/t-1"
xmlns:ns6="http://docs.oasis-open.org/wsn/br-2"
xmlns:ns7="http://docs.oasis-open.org/wsrf/r-2"><ns2:NotificationMessage><ns2:Topic
xmlns:s="http://events.event-processing.org/ids"
s:22d8784a-2a61-4ed7-9d46-1ea3af3aa9cb="http://events.event-processing.org/ids">s:22d8784a-2a61-4ed7-9d46-1ea3af3aa9cb</ns2:Topic><ns2:Message><mt:nativeMessage
xmlns:mt="http://www.event-processing.org/wsn/msgtype/"
mt:syntax="application/x-trig">@prefix :
<http://events.event-processing.org/types/> .
@prefix uctelco: <http://events.event-processing.org/uc/telco/> .
@prefix e: <http://events.event-processing.org/ids/> .
@prefix geo: <http://www.w3.org/2003/01/geo/wgs84_pos#> .
@prefix uccrisis: <http://www.mines-albi.fr/nuclearcrisisevent#> .
@prefix sioc: <http://rdfs.org/sioc/ns#> .
@prefix gn: <http://www.geonames.org/ontology#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix s: <http://streams.event-processing.org/ids/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix src: <http://sources.event-processing.org/ids/> .
@prefix types: <http://events.event-processing.org/types/> .
@prefix user: <http://graph.facebook.com/schema/user#> .
{
}
<http://events.event-processing.org/ids/Test> {
<http://events.event-processing.org/ids/Test>
<http://events.event-processing.org/types/stream>
<http://streams.event-processing.org/ids/default#stream> .
}
</mt:nativeMessage></ns2:Message></ns2:NotificationMessage></ns2:Notify></soap:Body></soap:Envelope>
Re: Unmarshalling Error
Posted by Shashikant Sarade <sh...@gmail.com>.
I am also getting same errors when i call a method which is having return
value.
Please someone help ....
On Fri, Apr 13, 2012 at 7:15 PM, Laurent Pellegrino <
laurent.pellegrino@gmail.com> wrote:
> Hi all,
>
> I have deployed a Webservice with CXF and I am invoking several times
> a method from this webservice with, always, the same payload. The
> first requests are handled correctly some sometimes I get an
> unmarshall exception. Any idea?
>
>
> org.apache.cxf.phase.PhaseInterceptorChain doDefaultLogging
> ATTENTION: Interceptor for
> {
> http://services.webservices.eventcloud.inria.fr/}SubscriberServiceImplService#{http://docs.oasis-open.org/wsn/bw-2}Notify
> has thrown exception, unwinding now
> org.apache.cxf.interceptor.Fault: Unmarshalling Error: Unexpected
> character '2' (code 50) (expected a name start character)
> at [row,col {unknown-source}]: [1,514]
> at
> org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:822)
> at
> org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:643)
> at
> org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:156)
> at
> org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:201)
> at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
> at
> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:123)
> at
> org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceRequest(JettyHTTPDestination.java:323)
> at
> org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:289)
> at
> org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:72)
> at
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:943)
> at
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:879)
> at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
> at
> org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:250)
> at
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:110)
> at org.eclipse.jetty.server.Server.handle(Server.java:345)
> at
> org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:441)
> at
> org.eclipse.jetty.server.HttpConnection$RequestHandler.content(HttpConnection.java:936)
> at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:801)
> at
> org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:224)
> at
> org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:51)
> at
> org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:586)
> at
> org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:44)
> at
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:598)
> at
> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:533)
> at java.lang.Thread.run(Thread.java:662)
> Caused by: javax.xml.bind.UnmarshalException
> - with linked exception:
> [com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character
> '2' (code 50) (expected a name start character)
> at [row,col {unknown-source}]: [1,514]]
> at
> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.handleStreamException(UnmarshallerImpl.java:435)
> at
> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:371)
> at
> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:348)
> at
> org.apache.cxf.jaxb.JAXBEncoderDecoder.doUnmarshal(JAXBEncoderDecoder.java:783)
> at
> org.apache.cxf.jaxb.JAXBEncoderDecoder.access$100(JAXBEncoderDecoder.java:96)
> at
> org.apache.cxf.jaxb.JAXBEncoderDecoder$1.run(JAXBEncoderDecoder.java:811)
> at java.security.AccessController.doPrivileged(Native Method)
> at
> org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:809)
> ... 24 more
> Caused by: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected
> character '2' (code 50) (expected a name start character)
> at [row,col {unknown-source}]: [1,514]
> at
> com.ctc.wstx.sr.StreamScanner.throwUnexpectedChar(StreamScanner.java:639)
> at
> com.ctc.wstx.sr.StreamScanner.parseLocalName(StreamScanner.java:1798)
> at
> com.ctc.wstx.sr.BasicStreamReader.handleNsAttrs(BasicStreamReader.java:2982)
> at
> com.ctc.wstx.sr.BasicStreamReader.handleStartElem(BasicStreamReader.java:2926)
> at
> com.ctc.wstx.sr.BasicStreamReader.nextFromTree(BasicStreamReader.java:2802)
> at
> com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1050)
> at
> com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(StAXStreamConnector.java:197)
> at
> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:369)
> ... 30 more
>
>
>
>
>
>
>
> org.apache.cxf.services.SubscriberServiceImplService.SubscriberServiceImplPort.NotificationConsumer
> INFO: Inbound Message
> ----------------------------
> ID: 301
> Address: http://138.96.195.238:9002/subscriber
> Encoding: UTF-8
> Http-Method: POST
> Content-Type: text/xml; charset=UTF-8
> Headers: {Accept=[*/*], Cache-Control=[no-cache],
> connection=[keep-alive], Content-Length=[2068],
> content-type=[text/xml; charset=UTF-8], Host=[138.96.195.238:9002],
> Pragma=[no-cache], SOAPAction=[""], User-Agent=[Apache CXF 2.5.2]}
> Payload: <soap:Envelope
> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/
> "><soap:Body><ns2:Notify
> xmlns="http://www.w3.org/2005/08/addressing"
> xmlns:ns2="http://docs.oasis-open.org/wsn/b-2"
> xmlns:ns3="http://docs.oasis-open.org/wsrf/bf-2"
> xmlns:ns4="http://docs.oasis-open.org/wsrf/rp-2"
> xmlns:ns5="http://docs.oasis-open.org/wsn/t-1"
> xmlns:ns6="http://docs.oasis-open.org/wsn/br-2"
> xmlns:ns7="http://docs.oasis-open.org/wsrf/r-2
> "><ns2:NotificationMessage><ns2:Topic
> xmlns:s="http://events.event-processing.org/ids"
> s:22d8784a-2a61-4ed7-9d46-1ea3af3aa9cb="
> http://events.event-processing.org/ids
> ">s:22d8784a-2a61-4ed7-9d46-1ea3af3aa9cb</ns2:Topic><ns2:Message><mt:nativeMessage
> xmlns:mt="http://www.event-processing.org/wsn/msgtype/"
> mt:syntax="application/x-trig">@prefix :
> <http://events.event-processing.org/types/> .
> @prefix uctelco: <http://events.event-processing.org/uc/telco/> .
> @prefix e: <http://events.event-processing.org/ids/> .
> @prefix geo: <http://www.w3.org/2003/01/geo/wgs84_pos#> .
> @prefix uccrisis: <http://www.mines-albi.fr/nuclearcrisisevent#> .
> @prefix sioc: <http://rdfs.org/sioc/ns#> .
> @prefix gn: <http://www.geonames.org/ontology#> .
> @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
> @prefix s: <http://streams.event-processing.org/ids/> .
> @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
> @prefix owl: <http://www.w3.org/2002/07/owl#> .
> @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
> @prefix src: <http://sources.event-processing.org/ids/> .
> @prefix types: <http://events.event-processing.org/types/> .
> @prefix user: <http://graph.facebook.com/schema/user#> .
> {
> }
>
> <http://events.event-processing.org/ids/Test> {
> <http://events.event-processing.org/ids/Test>
> <http://events.event-processing.org/types/stream>
>
> <http://streams.event-processing.org/ids/default#stream> .
>
> }
>
> </mt:nativeMessage></ns2:Message></ns2:NotificationMessage></ns2:Notify></soap:Body></soap:Envelope>
>
Re: Unmarshalling Error
Posted by Laurent Pellegrino <la...@gmail.com>.
Thanks for your answers.
On Sun, Apr 22, 2012 at 1:35 PM, Andrei Shakirin <as...@talend.com> wrote:
> Hi,
>
> the attribute seems to be the automatically generated UUID.
> That explains the fact why code sometimes works, sometimes does not:
> when UUID has a character in first place, it is not a problem for unmarshaller; when a number - there is a validation error.
>
> Regards,
> Andrei.
>
> -----Original Message-----
> From: Aki Yoshida [mailto:elakito@googlemail.com]
> Sent: 21 April 2012 23:13
> To: users@cxf.apache.org
> Subject: Re: Unmarshalling Error
>
> the error says the message is invalid. More specifically, it says that
> the attribute s:22d8... in the Topic element is invalid. (A numeric
> character is not allowed as the first character for the element or
> attribute names), as in
>
> <ns2:Topic
> xmlns:s="http://events.event-processing.org/ids"
> s:22d8784a-2a61-4ed7-9d46-1ea3af3aa9cb="http://events.event-processing.org/ids">
>
> but I don't know the background to this scenario and don't know how
> this attribute got into that element
>
> regards, aki
>
> 2012/4/13 Laurent Pellegrino <la...@gmail.com>:
>> Hi all,
>>
>> I have deployed a Webservice with CXF and I am invoking several times
>> a method from this webservice with, always, the same payload. The
>> first requests are handled correctly some sometimes I get an
>> unmarshall exception. Any idea?
>>
>>
>> org.apache.cxf.phase.PhaseInterceptorChain doDefaultLogging
>> ATTENTION: Interceptor for
>> {http://services.webservices.eventcloud.inria.fr/}SubscriberServiceImplService#{http://docs.oasis-open.org/wsn/bw-2}Notify
>> has thrown exception, unwinding now
>> org.apache.cxf.interceptor.Fault: Unmarshalling Error: Unexpected
>> character '2' (code 50) (expected a name start character)
>> at [row,col {unknown-source}]: [1,514]
>> at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:822)
>> at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:643)
>> at org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:156)
>> at org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:201)
>> at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
>> at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:123)
>> at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceRequest(JettyHTTPDestination.java:323)
>> at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:289)
>> at org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:72)
>> at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:943)
>> at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:879)
>> at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
>> at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:250)
>> at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:110)
>> at org.eclipse.jetty.server.Server.handle(Server.java:345)
>> at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:441)
>> at org.eclipse.jetty.server.HttpConnection$RequestHandler.content(HttpConnection.java:936)
>> at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:801)
>> at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:224)
>> at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:51)
>> at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:586)
>> at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:44)
>> at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:598)
>> at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:533)
>> at java.lang.Thread.run(Thread.java:662)
>> Caused by: javax.xml.bind.UnmarshalException
>> - with linked exception:
>> [com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character
>> '2' (code 50) (expected a name start character)
>> at [row,col {unknown-source}]: [1,514]]
>> at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.handleStreamException(UnmarshallerImpl.java:435)
>> at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:371)
>> at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:348)
>> at org.apache.cxf.jaxb.JAXBEncoderDecoder.doUnmarshal(JAXBEncoderDecoder.java:783)
>> at org.apache.cxf.jaxb.JAXBEncoderDecoder.access$100(JAXBEncoderDecoder.java:96)
>> at org.apache.cxf.jaxb.JAXBEncoderDecoder$1.run(JAXBEncoderDecoder.java:811)
>> at java.security.AccessController.doPrivileged(Native Method)
>> at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:809)
>> ... 24 more
>> Caused by: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected
>> character '2' (code 50) (expected a name start character)
>> at [row,col {unknown-source}]: [1,514]
>> at com.ctc.wstx.sr.StreamScanner.throwUnexpectedChar(StreamScanner.java:639)
>> at com.ctc.wstx.sr.StreamScanner.parseLocalName(StreamScanner.java:1798)
>> at com.ctc.wstx.sr.BasicStreamReader.handleNsAttrs(BasicStreamReader.java:2982)
>> at com.ctc.wstx.sr.BasicStreamReader.handleStartElem(BasicStreamReader.java:2926)
>> at com.ctc.wstx.sr.BasicStreamReader.nextFromTree(BasicStreamReader.java:2802)
>> at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1050)
>> at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(StAXStreamConnector.java:197)
>> at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:369)
>> ... 30 more
>>
>>
>>
>>
>>
>>
>> org.apache.cxf.services.SubscriberServiceImplService.SubscriberServiceImplPort.NotificationConsumer
>> INFO: Inbound Message
>> ----------------------------
>> ID: 301
>> Address: http://138.96.195.238:9002/subscriber
>> Encoding: UTF-8
>> Http-Method: POST
>> Content-Type: text/xml; charset=UTF-8
>> Headers: {Accept=[*/*], Cache-Control=[no-cache],
>> connection=[keep-alive], Content-Length=[2068],
>> content-type=[text/xml; charset=UTF-8], Host=[138.96.195.238:9002],
>> Pragma=[no-cache], SOAPAction=[""], User-Agent=[Apache CXF 2.5.2]}
>> Payload: <soap:Envelope
>> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns2:Notify
>> xmlns="http://www.w3.org/2005/08/addressing"
>> xmlns:ns2="http://docs.oasis-open.org/wsn/b-2"
>> xmlns:ns3="http://docs.oasis-open.org/wsrf/bf-2"
>> xmlns:ns4="http://docs.oasis-open.org/wsrf/rp-2"
>> xmlns:ns5="http://docs.oasis-open.org/wsn/t-1"
>> xmlns:ns6="http://docs.oasis-open.org/wsn/br-2"
>> xmlns:ns7="http://docs.oasis-open.org/wsrf/r-2"><ns2:NotificationMessage><ns2:Topic
>> xmlns:s="http://events.event-processing.org/ids"
>> s:22d8784a-2a61-4ed7-9d46-1ea3af3aa9cb="http://events.event-processing.org/ids">s:22d8784a-2a61-4ed7-9d46-1ea3af3aa9cb</ns2:Topic><ns2:Message><mt:nativeMessage
>> xmlns:mt="http://www.event-processing.org/wsn/msgtype/"
>> mt:syntax="application/x-trig">@prefix :
>> <http://events.event-processing.org/types/> .
>> @prefix uctelco: <http://events.event-processing.org/uc/telco/> .
>> @prefix e: <http://events.event-processing.org/ids/> .
>> @prefix geo: <http://www.w3.org/2003/01/geo/wgs84_pos#> .
>> @prefix uccrisis: <http://www.mines-albi.fr/nuclearcrisisevent#> .
>> @prefix sioc: <http://rdfs.org/sioc/ns#> .
>> @prefix gn: <http://www.geonames.org/ontology#> .
>> @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
>> @prefix s: <http://streams.event-processing.org/ids/> .
>> @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
>> @prefix owl: <http://www.w3.org/2002/07/owl#> .
>> @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
>> @prefix src: <http://sources.event-processing.org/ids/> .
>> @prefix types: <http://events.event-processing.org/types/> .
>> @prefix user: <http://graph.facebook.com/schema/user#> .
>> {
>> }
>>
>> <http://events.event-processing.org/ids/Test> {
>> <http://events.event-processing.org/ids/Test>
>> <http://events.event-processing.org/types/stream>
>>
>> <http://streams.event-processing.org/ids/default#stream> .
>>
>> }
>> </mt:nativeMessage></ns2:Message></ns2:NotificationMessage></ns2:Notify></soap:Body></soap:Envelope>
RE: Unmarshalling Error
Posted by Andrei Shakirin <as...@talend.com>.
Hi,
the attribute seems to be the automatically generated UUID.
That explains the fact why code sometimes works, sometimes does not:
when UUID has a character in first place, it is not a problem for unmarshaller; when a number - there is a validation error.
Regards,
Andrei.
-----Original Message-----
From: Aki Yoshida [mailto:elakito@googlemail.com]
Sent: 21 April 2012 23:13
To: users@cxf.apache.org
Subject: Re: Unmarshalling Error
the error says the message is invalid. More specifically, it says that
the attribute s:22d8... in the Topic element is invalid. (A numeric
character is not allowed as the first character for the element or
attribute names), as in
<ns2:Topic
xmlns:s="http://events.event-processing.org/ids"
s:22d8784a-2a61-4ed7-9d46-1ea3af3aa9cb="http://events.event-processing.org/ids">
but I don't know the background to this scenario and don't know how
this attribute got into that element
regards, aki
2012/4/13 Laurent Pellegrino <la...@gmail.com>:
> Hi all,
>
> I have deployed a Webservice with CXF and I am invoking several times
> a method from this webservice with, always, the same payload. The
> first requests are handled correctly some sometimes I get an
> unmarshall exception. Any idea?
>
>
> org.apache.cxf.phase.PhaseInterceptorChain doDefaultLogging
> ATTENTION: Interceptor for
> {http://services.webservices.eventcloud.inria.fr/}SubscriberServiceImplService#{http://docs.oasis-open.org/wsn/bw-2}Notify
> has thrown exception, unwinding now
> org.apache.cxf.interceptor.Fault: Unmarshalling Error: Unexpected
> character '2' (code 50) (expected a name start character)
> at [row,col {unknown-source}]: [1,514]
> at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:822)
> at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:643)
> at org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:156)
> at org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:201)
> at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
> at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:123)
> at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceRequest(JettyHTTPDestination.java:323)
> at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:289)
> at org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:72)
> at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:943)
> at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:879)
> at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
> at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:250)
> at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:110)
> at org.eclipse.jetty.server.Server.handle(Server.java:345)
> at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:441)
> at org.eclipse.jetty.server.HttpConnection$RequestHandler.content(HttpConnection.java:936)
> at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:801)
> at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:224)
> at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:51)
> at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:586)
> at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:44)
> at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:598)
> at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:533)
> at java.lang.Thread.run(Thread.java:662)
> Caused by: javax.xml.bind.UnmarshalException
> - with linked exception:
> [com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character
> '2' (code 50) (expected a name start character)
> at [row,col {unknown-source}]: [1,514]]
> at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.handleStreamException(UnmarshallerImpl.java:435)
> at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:371)
> at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:348)
> at org.apache.cxf.jaxb.JAXBEncoderDecoder.doUnmarshal(JAXBEncoderDecoder.java:783)
> at org.apache.cxf.jaxb.JAXBEncoderDecoder.access$100(JAXBEncoderDecoder.java:96)
> at org.apache.cxf.jaxb.JAXBEncoderDecoder$1.run(JAXBEncoderDecoder.java:811)
> at java.security.AccessController.doPrivileged(Native Method)
> at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:809)
> ... 24 more
> Caused by: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected
> character '2' (code 50) (expected a name start character)
> at [row,col {unknown-source}]: [1,514]
> at com.ctc.wstx.sr.StreamScanner.throwUnexpectedChar(StreamScanner.java:639)
> at com.ctc.wstx.sr.StreamScanner.parseLocalName(StreamScanner.java:1798)
> at com.ctc.wstx.sr.BasicStreamReader.handleNsAttrs(BasicStreamReader.java:2982)
> at com.ctc.wstx.sr.BasicStreamReader.handleStartElem(BasicStreamReader.java:2926)
> at com.ctc.wstx.sr.BasicStreamReader.nextFromTree(BasicStreamReader.java:2802)
> at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1050)
> at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(StAXStreamConnector.java:197)
> at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:369)
> ... 30 more
>
>
>
>
>
>
> org.apache.cxf.services.SubscriberServiceImplService.SubscriberServiceImplPort.NotificationConsumer
> INFO: Inbound Message
> ----------------------------
> ID: 301
> Address: http://138.96.195.238:9002/subscriber
> Encoding: UTF-8
> Http-Method: POST
> Content-Type: text/xml; charset=UTF-8
> Headers: {Accept=[*/*], Cache-Control=[no-cache],
> connection=[keep-alive], Content-Length=[2068],
> content-type=[text/xml; charset=UTF-8], Host=[138.96.195.238:9002],
> Pragma=[no-cache], SOAPAction=[""], User-Agent=[Apache CXF 2.5.2]}
> Payload: <soap:Envelope
> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns2:Notify
> xmlns="http://www.w3.org/2005/08/addressing"
> xmlns:ns2="http://docs.oasis-open.org/wsn/b-2"
> xmlns:ns3="http://docs.oasis-open.org/wsrf/bf-2"
> xmlns:ns4="http://docs.oasis-open.org/wsrf/rp-2"
> xmlns:ns5="http://docs.oasis-open.org/wsn/t-1"
> xmlns:ns6="http://docs.oasis-open.org/wsn/br-2"
> xmlns:ns7="http://docs.oasis-open.org/wsrf/r-2"><ns2:NotificationMessage><ns2:Topic
> xmlns:s="http://events.event-processing.org/ids"
> s:22d8784a-2a61-4ed7-9d46-1ea3af3aa9cb="http://events.event-processing.org/ids">s:22d8784a-2a61-4ed7-9d46-1ea3af3aa9cb</ns2:Topic><ns2:Message><mt:nativeMessage
> xmlns:mt="http://www.event-processing.org/wsn/msgtype/"
> mt:syntax="application/x-trig">@prefix :
> <http://events.event-processing.org/types/> .
> @prefix uctelco: <http://events.event-processing.org/uc/telco/> .
> @prefix e: <http://events.event-processing.org/ids/> .
> @prefix geo: <http://www.w3.org/2003/01/geo/wgs84_pos#> .
> @prefix uccrisis: <http://www.mines-albi.fr/nuclearcrisisevent#> .
> @prefix sioc: <http://rdfs.org/sioc/ns#> .
> @prefix gn: <http://www.geonames.org/ontology#> .
> @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
> @prefix s: <http://streams.event-processing.org/ids/> .
> @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
> @prefix owl: <http://www.w3.org/2002/07/owl#> .
> @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
> @prefix src: <http://sources.event-processing.org/ids/> .
> @prefix types: <http://events.event-processing.org/types/> .
> @prefix user: <http://graph.facebook.com/schema/user#> .
> {
> }
>
> <http://events.event-processing.org/ids/Test> {
> <http://events.event-processing.org/ids/Test>
> <http://events.event-processing.org/types/stream>
>
> <http://streams.event-processing.org/ids/default#stream> .
>
> }
> </mt:nativeMessage></ns2:Message></ns2:NotificationMessage></ns2:Notify></soap:Body></soap:Envelope>
Re: Unmarshalling Error
Posted by Aki Yoshida <el...@googlemail.com>.
the error says the message is invalid. More specifically, it says that
the attribute s:22d8... in the Topic element is invalid. (A numeric
character is not allowed as the first character for the element or
attribute names), as in
<ns2:Topic
xmlns:s="http://events.event-processing.org/ids"
s:22d8784a-2a61-4ed7-9d46-1ea3af3aa9cb="http://events.event-processing.org/ids">
but I don't know the background to this scenario and don't know how
this attribute got into that element
regards, aki
2012/4/13 Laurent Pellegrino <la...@gmail.com>:
> Hi all,
>
> I have deployed a Webservice with CXF and I am invoking several times
> a method from this webservice with, always, the same payload. The
> first requests are handled correctly some sometimes I get an
> unmarshall exception. Any idea?
>
>
> org.apache.cxf.phase.PhaseInterceptorChain doDefaultLogging
> ATTENTION: Interceptor for
> {http://services.webservices.eventcloud.inria.fr/}SubscriberServiceImplService#{http://docs.oasis-open.org/wsn/bw-2}Notify
> has thrown exception, unwinding now
> org.apache.cxf.interceptor.Fault: Unmarshalling Error: Unexpected
> character '2' (code 50) (expected a name start character)
> at [row,col {unknown-source}]: [1,514]
> at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:822)
> at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:643)
> at org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:156)
> at org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:201)
> at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
> at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:123)
> at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceRequest(JettyHTTPDestination.java:323)
> at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:289)
> at org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:72)
> at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:943)
> at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:879)
> at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
> at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:250)
> at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:110)
> at org.eclipse.jetty.server.Server.handle(Server.java:345)
> at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:441)
> at org.eclipse.jetty.server.HttpConnection$RequestHandler.content(HttpConnection.java:936)
> at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:801)
> at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:224)
> at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:51)
> at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:586)
> at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:44)
> at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:598)
> at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:533)
> at java.lang.Thread.run(Thread.java:662)
> Caused by: javax.xml.bind.UnmarshalException
> - with linked exception:
> [com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character
> '2' (code 50) (expected a name start character)
> at [row,col {unknown-source}]: [1,514]]
> at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.handleStreamException(UnmarshallerImpl.java:435)
> at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:371)
> at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:348)
> at org.apache.cxf.jaxb.JAXBEncoderDecoder.doUnmarshal(JAXBEncoderDecoder.java:783)
> at org.apache.cxf.jaxb.JAXBEncoderDecoder.access$100(JAXBEncoderDecoder.java:96)
> at org.apache.cxf.jaxb.JAXBEncoderDecoder$1.run(JAXBEncoderDecoder.java:811)
> at java.security.AccessController.doPrivileged(Native Method)
> at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:809)
> ... 24 more
> Caused by: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected
> character '2' (code 50) (expected a name start character)
> at [row,col {unknown-source}]: [1,514]
> at com.ctc.wstx.sr.StreamScanner.throwUnexpectedChar(StreamScanner.java:639)
> at com.ctc.wstx.sr.StreamScanner.parseLocalName(StreamScanner.java:1798)
> at com.ctc.wstx.sr.BasicStreamReader.handleNsAttrs(BasicStreamReader.java:2982)
> at com.ctc.wstx.sr.BasicStreamReader.handleStartElem(BasicStreamReader.java:2926)
> at com.ctc.wstx.sr.BasicStreamReader.nextFromTree(BasicStreamReader.java:2802)
> at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1050)
> at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(StAXStreamConnector.java:197)
> at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:369)
> ... 30 more
>
>
>
>
>
>
> org.apache.cxf.services.SubscriberServiceImplService.SubscriberServiceImplPort.NotificationConsumer
> INFO: Inbound Message
> ----------------------------
> ID: 301
> Address: http://138.96.195.238:9002/subscriber
> Encoding: UTF-8
> Http-Method: POST
> Content-Type: text/xml; charset=UTF-8
> Headers: {Accept=[*/*], Cache-Control=[no-cache],
> connection=[keep-alive], Content-Length=[2068],
> content-type=[text/xml; charset=UTF-8], Host=[138.96.195.238:9002],
> Pragma=[no-cache], SOAPAction=[""], User-Agent=[Apache CXF 2.5.2]}
> Payload: <soap:Envelope
> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns2:Notify
> xmlns="http://www.w3.org/2005/08/addressing"
> xmlns:ns2="http://docs.oasis-open.org/wsn/b-2"
> xmlns:ns3="http://docs.oasis-open.org/wsrf/bf-2"
> xmlns:ns4="http://docs.oasis-open.org/wsrf/rp-2"
> xmlns:ns5="http://docs.oasis-open.org/wsn/t-1"
> xmlns:ns6="http://docs.oasis-open.org/wsn/br-2"
> xmlns:ns7="http://docs.oasis-open.org/wsrf/r-2"><ns2:NotificationMessage><ns2:Topic
> xmlns:s="http://events.event-processing.org/ids"
> s:22d8784a-2a61-4ed7-9d46-1ea3af3aa9cb="http://events.event-processing.org/ids">s:22d8784a-2a61-4ed7-9d46-1ea3af3aa9cb</ns2:Topic><ns2:Message><mt:nativeMessage
> xmlns:mt="http://www.event-processing.org/wsn/msgtype/"
> mt:syntax="application/x-trig">@prefix :
> <http://events.event-processing.org/types/> .
> @prefix uctelco: <http://events.event-processing.org/uc/telco/> .
> @prefix e: <http://events.event-processing.org/ids/> .
> @prefix geo: <http://www.w3.org/2003/01/geo/wgs84_pos#> .
> @prefix uccrisis: <http://www.mines-albi.fr/nuclearcrisisevent#> .
> @prefix sioc: <http://rdfs.org/sioc/ns#> .
> @prefix gn: <http://www.geonames.org/ontology#> .
> @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
> @prefix s: <http://streams.event-processing.org/ids/> .
> @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
> @prefix owl: <http://www.w3.org/2002/07/owl#> .
> @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
> @prefix src: <http://sources.event-processing.org/ids/> .
> @prefix types: <http://events.event-processing.org/types/> .
> @prefix user: <http://graph.facebook.com/schema/user#> .
> {
> }
>
> <http://events.event-processing.org/ids/Test> {
> <http://events.event-processing.org/ids/Test>
> <http://events.event-processing.org/types/stream>
>
> <http://streams.event-processing.org/ids/default#stream> .
>
> }
> </mt:nativeMessage></ns2:Message></ns2:NotificationMessage></ns2:Notify></soap:Body></soap:Envelope>