org.apache.cxf.interceptor.Fault: Unmarshalling Error : unexpected element (uri:"", local:"starttime "). Expected elements are (none)

Apache's JIRA Issue Tracker | Andreas Bucksteeg | 10 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Right now our in CXF implemented service is throwing the following exception: Unmarshalling Error : unexpected element (uri:"", local:"starttime"). Expected elements are (none) I checked our code & configuration but I couldnt find a bug in it, right now I think that an exception occurs, when the value should be converted into a Calendar object, but I have no clue, who to solve the problem. I hope someone where has an idea. Below you can see the related part of the WSDL, which clearly includes an element starttime. WSDL <wsdl:message name="autocometSetStart"> <wsdl:part name="sessionId" type="xsd:string"/> <wsdl:part name="id" type="xsd:int"/> <wsdl:part name="starttime" type="xsd:dateTime"/> <wsdl:part name="status" type="xsd:int"/> <wsdl:part name="client" type="xsd:string"/> </wsdl:message> The service interface includes this element also: ================================================= @WebMethod @WebResult(name = "autocometSetStartReturn") public AutocometSetStartResult autocometSetStart( @WebParam(name = "sessionId") String sessionId, @WebParam(name = "id") int id, @WebParam(name = "starttime") Calendar starttime, @WebParam(name = "status") int status, @WebParam(name = "client") String client ); The soap request send by an other client looks like (and triggers the exception): ================================================================================= Host: 127.0.0.1:9003 User-Agent: gSOAP/2.7 Content-Type: text/xml; charset=utf-8 Content-Length: 679 Connection: keep-alive SOAPAction: "autocometSetStart" <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:cometxsd="http://werk-ii.de/soap/comet/Schema" xmlns:comet="http://werk-ii.de/soap/comet"> <SOAP-ENV:Body SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <comet:autocometSetStart> <sessionId>s6460748655808</sessionId> <id>5</id> <starttime>2007-10-18T14:46:31+02:00</starttime> <status>1002</status> <client>HYTEST1</client> </comet:autocometSetStart> </SOAP-ENV:Body> </SOAP-ENV:Envelope> The response caused by the exception: ===================================== HTTP/1.1 500 Internal Server Error Server: Apache-Coyote/1.1 Content-Type: text/xml;charset=utf-8 Content-Length: 294 Date: Thu, 18 Oct 2007 12:46:30 GMT Connection: close <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <soap:Fault> <faultcode>soap:Server</faultcode> <faultstring>Unmarshalling Error : unexpected element (uri:"", local:"starttime"). Expected elements are (none) </faultstring> </soap:Fault> </soap:Body></soap:Envelope> And the stacktrace from the Tomcat log: ======================================= INFO: Interceptor has thrown exception, unwinding now org.apache.cxf.interceptor.Fault: Unmarshalling Error : unexpected element (uri:"", local:"starttime "). Expected elements are (none) at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:368) at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:274) at org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:40) at org.apache.cxf.binding.soap.interceptor.RPCInInterceptor.handleMessage(RPCInInterceptor.j ava:120) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:207) at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:7 3) at org.apache.cxf.transport.servlet.ServletDestination.doMessage(ServletDestination.java:78) at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.ja va:231) at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:139) at org.apache.cxf.transport.servlet.CXFServlet.invoke(CXFServlet.java:271) at org.apache.cxf.transport.servlet.CXFServlet.doPost(CXFServlet.java:249) 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.j ava:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:563) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.ja va:584) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:619) Caused by: javax.xml.bind.UnmarshalException - with linked exception: [javax.xml.bind.UnmarshalException: unexpected element (uri:"", local:"starttime"). Expected element s are (none)] at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.handleStreamException(Unmarshal lerImpl.java:395) at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.jav a:334) at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java :304) at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:354) ... 25 more Caused by: javax.xml.bind.UnmarshalException: unexpected element (uri:"", local:"starttime"). Expect ed elements are (none) at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleEvent(UnmarshallingCo ntext.java:523) at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java:199) at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java:194) at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportUnexpectedChildElement(Loader.java: 71) at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext$DefaultRootLoader.childElem ent(UnmarshallingContext.java:920) at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext._startElement(Unmarshalling Context.java:366) at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.startElement(UnmarshallingC ontext.java:347) at com.sun.xml.bind.v2.runtime.unmarshaller.InterningXmlVisitor.startElement(InterningXmlVis itor.java:35) at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.handleStartElement(StAXStrea mConnector.java:201) at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(StAXStreamConnector.j ava:135) at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.jav a:332) ... 27 more

    Apache's JIRA Issue Tracker | 10 years ago | Andreas Bucksteeg
    org.apache.cxf.interceptor.Fault: Unmarshalling Error : unexpected element (uri:"", local:"starttime "). Expected elements are (none)
  2. 0

    Right now our in CXF implemented service is throwing the following exception: Unmarshalling Error : unexpected element (uri:"", local:"starttime"). Expected elements are (none) I checked our code & configuration but I couldnt find a bug in it, right now I think that an exception occurs, when the value should be converted into a Calendar object, but I have no clue, who to solve the problem. I hope someone where has an idea. Below you can see the related part of the WSDL, which clearly includes an element starttime. WSDL <wsdl:message name="autocometSetStart"> <wsdl:part name="sessionId" type="xsd:string"/> <wsdl:part name="id" type="xsd:int"/> <wsdl:part name="starttime" type="xsd:dateTime"/> <wsdl:part name="status" type="xsd:int"/> <wsdl:part name="client" type="xsd:string"/> </wsdl:message> The service interface includes this element also: ================================================= @WebMethod @WebResult(name = "autocometSetStartReturn") public AutocometSetStartResult autocometSetStart( @WebParam(name = "sessionId") String sessionId, @WebParam(name = "id") int id, @WebParam(name = "starttime") Calendar starttime, @WebParam(name = "status") int status, @WebParam(name = "client") String client ); The soap request send by an other client looks like (and triggers the exception): ================================================================================= Host: 127.0.0.1:9003 User-Agent: gSOAP/2.7 Content-Type: text/xml; charset=utf-8 Content-Length: 679 Connection: keep-alive SOAPAction: "autocometSetStart" <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:cometxsd="http://werk-ii.de/soap/comet/Schema" xmlns:comet="http://werk-ii.de/soap/comet"> <SOAP-ENV:Body SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <comet:autocometSetStart> <sessionId>s6460748655808</sessionId> <id>5</id> <starttime>2007-10-18T14:46:31+02:00</starttime> <status>1002</status> <client>HYTEST1</client> </comet:autocometSetStart> </SOAP-ENV:Body> </SOAP-ENV:Envelope> The response caused by the exception: ===================================== HTTP/1.1 500 Internal Server Error Server: Apache-Coyote/1.1 Content-Type: text/xml;charset=utf-8 Content-Length: 294 Date: Thu, 18 Oct 2007 12:46:30 GMT Connection: close <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <soap:Fault> <faultcode>soap:Server</faultcode> <faultstring>Unmarshalling Error : unexpected element (uri:"", local:"starttime"). Expected elements are (none) </faultstring> </soap:Fault> </soap:Body></soap:Envelope> And the stacktrace from the Tomcat log: ======================================= INFO: Interceptor has thrown exception, unwinding now org.apache.cxf.interceptor.Fault: Unmarshalling Error : unexpected element (uri:"", local:"starttime "). Expected elements are (none) at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:368) at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:274) at org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:40) at org.apache.cxf.binding.soap.interceptor.RPCInInterceptor.handleMessage(RPCInInterceptor.j ava:120) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:207) at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:7 3) at org.apache.cxf.transport.servlet.ServletDestination.doMessage(ServletDestination.java:78) at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.ja va:231) at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:139) at org.apache.cxf.transport.servlet.CXFServlet.invoke(CXFServlet.java:271) at org.apache.cxf.transport.servlet.CXFServlet.doPost(CXFServlet.java:249) 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.j ava:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:563) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.ja va:584) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:619) Caused by: javax.xml.bind.UnmarshalException - with linked exception: [javax.xml.bind.UnmarshalException: unexpected element (uri:"", local:"starttime"). Expected element s are (none)] at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.handleStreamException(Unmarshal lerImpl.java:395) at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.jav a:334) at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java :304) at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:354) ... 25 more Caused by: javax.xml.bind.UnmarshalException: unexpected element (uri:"", local:"starttime"). Expect ed elements are (none) at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleEvent(UnmarshallingCo ntext.java:523) at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java:199) at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java:194) at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportUnexpectedChildElement(Loader.java: 71) at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext$DefaultRootLoader.childElem ent(UnmarshallingContext.java:920) at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext._startElement(Unmarshalling Context.java:366) at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.startElement(UnmarshallingC ontext.java:347) at com.sun.xml.bind.v2.runtime.unmarshaller.InterningXmlVisitor.startElement(InterningXmlVis itor.java:35) at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.handleStartElement(StAXStrea mConnector.java:201) at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(StAXStreamConnector.j ava:135) at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.jav a:332) ... 27 more

    Apache's JIRA Issue Tracker | 10 years ago | Andreas Bucksteeg
    org.apache.cxf.interceptor.Fault: Unmarshalling Error : unexpected element (uri:"", local:"starttime "). Expected elements are (none)
  3. 0

    [CXF-1119] Request fails with Unmarshalling Error : unexpected element for an element which is part of the WSDL - ASF JIRA

    apache.org | 1 year ago
    org.apache.cxf.interceptor.Fault: Unmarshalling Error : unexpected element (uri:"", local:"starttime "). Expected elements are (none)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    How to configure CXF for a single JAXBContext and for an automatic JAXBElement conversion?

    apache.org | 1 year ago
    org.apache.cxf.interceptor.Fault: Unmarshalling Error: unrecognized type name: {http://test/}b. Did you mean b? at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:881) at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:702)

    5 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. org.apache.cxf.interceptor.Fault

      Unmarshalling Error : unexpected element (uri:"", local:"starttime "). Expected elements are (none)

      at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall()
    2. Apache CXF Runtime JAXB DataBinding
      DataReaderImpl.read
      1. org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:368)
      2. org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:274)
      3. org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:40)
      3 frames
    3. Apache CXF Runtime SOAP Binding
      RPCInInterceptor.handleMessage
      1. org.apache.cxf.binding.soap.interceptor.RPCInInterceptor.handleMessage(RPCInInterceptor.java:120)
      1 frame
    4. Apache CXF Core
      ChainInitiationObserver.onMessage
      1. org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:207)
      2. org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:73)
      2 frames
    5. Apache CXF Runtime HTTP Transport
      CXFServlet.doPost
      1. org.apache.cxf.transport.servlet.ServletDestination.doMessage(ServletDestination.java:78)
      2. org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:231)
      3. org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:139)
      4. org.apache.cxf.transport.servlet.CXFServlet.invoke(CXFServlet.java:271)
      5. org.apache.cxf.transport.servlet.CXFServlet.doPost(CXFServlet.java:249)
      5 frames
    6. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
      2. javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      2 frames
    7. Glassfish Core
      CoyoteAdapter.service
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      3. org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
      4. org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
      5. org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
      6. org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      7. org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      8. org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:563)
      9. org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
      9 frames
    8. Grizzly HTTP
      JIoEndpoint$Worker.run
      1. org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
      2. org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
      3. org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
      3 frames
    9. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:619)
      1 frame