cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Kulp (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (CXF-3047) org.apache.cxf.interceptor.Fault: Unmarshalling Error: UndeclaredPrefix: Cannot resolve 's:string' as a QName: the prefix 's' is not declared.
Date Thu, 07 Oct 2010 16:03:32 GMT

     [ https://issues.apache.org/jira/browse/CXF-3047?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Daniel Kulp resolved CXF-3047.
------------------------------

       Resolution: Fixed
    Fix Version/s: 2.2.11
         Assignee: Daniel Kulp


Found a way to hack around this.   It really is a deficiency in the Stax spec and the Validator
API's that makes it impossible to do correctly, but the hack should work.

> org.apache.cxf.interceptor.Fault: Unmarshalling Error: UndeclaredPrefix: Cannot resolve
's:string' as a QName: the prefix 's' is not declared.
> ----------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CXF-3047
>                 URL: https://issues.apache.org/jira/browse/CXF-3047
>             Project: CXF
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.2.10
>            Reporter: Marc Giger
>            Assignee: Daniel Kulp
>             Fix For: 2.2.11
>
>         Attachments: cxf-test.tar.gz
>
>
> see also https://issues.apache.org/jira/browse/CXF-2340
> I've attached a sample project (stolen from CXF-2340 and modified) to show the problem.
> DefaultValidationEventHandler: [FATAL_ERROR]: UndeclaredPrefix: Cannot resolve 's:string'
as a QName: the prefix 's' is not declared. 
>      Location: line 4
> 07.10.2010 11:45:12 org.apache.cxf.phase.PhaseInterceptorChain doDefaultLogging
> WARNUNG: Interceptor for {http://server.type_substitution.fromjava/}SedansServicePorts#{http://server.type_substitution.fromjava/}GetSedansOperation
has thrown exception, unwinding now
> org.apache.cxf.interceptor.Fault: Unmarshalling Error: UndeclaredPrefix: Cannot resolve
's:string' as a QName: the prefix 's' is not declared. 
>         at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:773)
>         at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:624)
>         at org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:150)
>         at org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:198)
>         at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:244)
>         at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:110)
>         at org.apache.cxf.transport.servlet.ServletDestination.invoke(ServletDestination.java:98)
>         at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:423)
>         at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:178)
>         at org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCXFServlet.java:142)
>         at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:179)
>         at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:103)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
>         at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:159)
>         at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
>         at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
>         at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
>         at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
>         at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)
>         at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
>         at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)
>         at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
>         at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
>         at org.mortbay.jetty.Server.handle(Server.java:324)
>         at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
>         at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:843)
>         at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:648)
>         at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
>         at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
>         at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
>         at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488)
> Caused by: javax.xml.bind.UnmarshalException
>  - with linked exception:
> [org.xml.sax.SAXParseException: UndeclaredPrefix: Cannot resolve 's:string' as a QName:
the prefix 's' is not declared.]
>         at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.handleStreamException(UnmarshallerImpl.java:425)
>         at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:362)
>         at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:339)
>         at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:755)
>         ... 30 more
> Caused by: org.xml.sax.SAXParseException: UndeclaredPrefix: Cannot resolve 's:string'
as a QName: the prefix 's' is not declared.
>         at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195)
>         at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:131)
>         at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:384)
>         at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:318)
>         at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(XMLSchemaValidator.java:417)
>         at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.reportSchemaError(XMLSchemaValidator.java:3181)
>         at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.getAndCheckXsiType(XMLSchemaValidator.java:2463)
>         at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:1950)
>         at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:705)
>         at com.sun.org.apache.xerces.internal.jaxp.validation.ValidatorHandlerImpl.startElement(ValidatorHandlerImpl.java:549)
>         at com.sun.xml.bind.v2.runtime.unmarshaller.ValidatingUnmarshaller.startElement(ValidatingUnmarshaller.java:96)
>         at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.handleStartElement(StAXStreamConnector.java:242)
>         at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(StAXStreamConnector.java:176)
>         at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:360)
>         ... 32 more

-- 
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