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] Commented: (CXF-2492) NPE in DatatypeConverter after updating to 2.2.4
Date Mon, 26 Oct 2009 15:38:59 GMT

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

Daniel Kulp commented on CXF-2492:
----------------------------------


Actually, this is probably a JAXB issue, but a change in CXF is exposing it.  

Previously, whenever JAXB encountered any parsing issues, it normally would just set the field
to "null" and continue.     We then would get all kinds of "why is my parameter null?" type
support questions.   With 2.2.4, we now set an even handler with JAXB to tell it to not ignore
parsing errors.    

Most likely, the above was occurring in JAXB with CXF 2.2.3 as well, but JAXB was ignoring
it and just setting the field to null.   Mostly just coincidence that that is exactly what
it was SUPPOSED to do in that case.     Anyway, you can restore the 2.2.3 behavior by setting
a property on the endpoint of:
"set-jaxb-validation-event-handler", "false"

That said, can you create a small reproducible test case?  I can then distill it down into
something I can log with JAXB and hopefully get it fixed in a future version of JAXB.


> NPE in DatatypeConverter after updating to 2.2.4
> ------------------------------------------------
>
>                 Key: CXF-2492
>                 URL: https://issues.apache.org/jira/browse/CXF-2492
>             Project: CXF
>          Issue Type: Bug
>          Components: JAXB Databinding
>    Affects Versions: 2.2.4
>         Environment: Java 1.5
>            Reporter: Dennis Kieselhorst
>            Priority: Blocker
>
> Updated from 2.2.3 to 2.2.4. Now a NullPointer occurs if a nil date is in the soap response:
> 	<java:DeactivationDate xsi:nil="true" xmlns:java="java:de.testing"/>
> Caused by: org.apache.cxf.interceptor.Fault: Unmarshalling Error: java.lang.NullPointerException
>         at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:661)
>         at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:533)
>         at org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:128)
>         at org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:99)
>         at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236)
>         at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:664)
>         at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:2160)
>         at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:2040)
>         at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1965)
>         at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
>         at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:627)
>         at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
>         at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236)
>         at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:478)
>         at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:308)
>         at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:260)
>         at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
>         at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)
>         ... 79 more
> Caused by: javax.xml.bind.UnmarshalException
>  - with linked exception:
> [javax.xml.bind.UnmarshalException: java.lang.NullPointerException
>  - with linked exception:
> [com.sun.xml.bind.api.AccessorException: java.lang.NullPointerException]]
>         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:646)
>         ... 96 more
> Caused by: javax.xml.bind.UnmarshalException: java.lang.NullPointerException
>  - with linked exception:
> [com.sun.xml.bind.api.AccessorException: java.lang.NullPointerException]
>         at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleEvent(UnmarshallingContext.java:642)
>         at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java:254)
>         at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.handleGenericException(Loader.java:241)
>         at com.sun.xml.bind.v2.runtime.unmarshaller.XsiNilLoader$Single.onNil(XsiNilLoader.java:111)
>         at com.sun.xml.bind.v2.runtime.unmarshaller.XsiNilLoader.selectLoader(XsiNilLoader.java:69)
>         at com.sun.xml.bind.v2.runtime.unmarshaller.ProxyLoader.startElement(ProxyLoader.java:53)
>         at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext._startElement(UnmarshallingContext.java:481)
>         at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.startElement(UnmarshallingContext.java:459)
>         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)
>         ... 98 more
> Caused by: javax.xml.bind.UnmarshalException: java.lang.NullPointerException
>  - with linked exception:
> [com.sun.xml.bind.api.AccessorException: java.lang.NullPointerException]
>         ... 109 more
> Caused by: com.sun.xml.bind.api.AccessorException: java.lang.NullPointerException
>         at com.sun.xml.bind.v2.runtime.reflect.AdaptedAccessor.set(AdaptedAccessor.java:83)
>         at com.sun.xml.bind.v2.runtime.unmarshaller.XsiNilLoader$Single.onNil(XsiNilLoader.java:108)
>         ... 105 more
> Caused by: java.lang.NullPointerException
>         at javax.xml.bind.WhiteSpaceProcessor.trim(WhiteSpaceProcessor.java:63)
>         at javax.xml.bind.DatatypeConverterImpl._parseDateTime(DatatypeConverterImpl.java:310)
>         at javax.xml.bind.DatatypeConverterImpl.parseDateTime(DatatypeConverterImpl.java:306)
>         at javax.xml.bind.DatatypeConverter.parseDateTime(DatatypeConverter.java:282)
>         at de.ewetel.easynet.core.dao.easytel.soap.stub.manageaccountlink.Adapter1.unmarshal(Adapter1.java:13)
>         at de.ewetel.easynet.core.dao.easytel.soap.stub.manageaccountlink.Adapter1.unmarshal(Adapter1.java:7)
>         at com.sun.xml.bind.v2.runtime.reflect.AdaptedAccessor.set(AdaptedAccessor.java:81)
>         ... 106 more
> Binding config:
> <jxb:javaType name="java.util.Calendar"
> 	xmlType="xs:dateTime"
> 	parseMethod="javax.xml.bind.DatatypeConverter.parseDateTime"
> 	printMethod="javax.xml.bind.DatatypeConverter.printDateTime" />
> Since the jaxb dependencies didn't change, I assume that this is a cxf issue.

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