CXF
  1. CXF
  2. CXF-3477

NPE while unmarshalling attachments

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.3.4
    • Fix Version/s: 2.4.1
    • Component/s: None
    • Labels:
      None

      Description

      Unfortunately, I cannot provide the message that generates this exception. It worked with 2.2.2, but after updating to 2.2.12 to get past another issue, it was similarly affected by CXF-3383. 2.3.4 just moves the exception to here:

      DefaultValidationEventHandler: [ERROR]: null
      Location: line 1
      org.apache.cxf.interceptor.Fault: Unmarshalling Error: null
      at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:787)
      at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:628)
      at org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:133)
      at org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:109)
      at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:243)
      at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:755)
      at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:2404)
      at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:2274)
      at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:2119)
      at org.apache.cxf.io.CacheAndWriteOutputStream.postClose(CacheAndWriteOutputStream.java:47)
      at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:188)
      at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
      at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:695)
      at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
      at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:243)
      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.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)
      [...]
      Caused by: javax.xml.bind.UnmarshalException

      • with linked exception:
        [javax.xml.bind.UnmarshalException
      • with linked exception:
        [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:764)
        ... 125 more
        Caused by: javax.xml.bind.UnmarshalException
      • with linked exception:
        [java.lang.NullPointerException]
        at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleEvent(UnmarshallingContext.java:642)
        at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleError(UnmarshallingContext.java:671)
        at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleError(UnmarshallingContext.java:667)
        at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.handleParseConversionException(Loader.java:267)
        at com.sun.xml.bind.v2.runtime.unmarshaller.LeafPropertyLoader.text(LeafPropertyLoader.java:65)
        at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.text(UnmarshallingContext.java:494)
        at com.sun.xml.bind.v2.runtime.unmarshaller.MTOMDecorator.startElement(MTOMDecorator.java:103)
        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)
        ... 127 more
        Caused by: javax.xml.bind.UnmarshalException
      • with linked exception:
        [java.lang.NullPointerException]
        ... 137 more
        Caused by: java.lang.NullPointerException
        at org.apache.cxf.attachment.LazyDataSource.getInputStream(LazyDataSource.java:67)
        at com.sun.xml.bind.v2.runtime.unmarshaller.Base64Data.get(Base64Data.java:188)
        at com.sun.xml.bind.v2.runtime.unmarshaller.Base64Data.getExact(Base64Data.java:154)
        at com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl.decodeBase64(RuntimeBuiltinLeafInfoImpl.java:877)
        at com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl.access$100(RuntimeBuiltinLeafInfoImpl.java:111)
        at com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl$14.parse(RuntimeBuiltinLeafInfoImpl.java:678)
        at com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl$14.parse(RuntimeBuiltinLeafInfoImpl.java:681)
        at com.sun.xml.bind.v2.runtime.reflect.TransducedAccessor$CompositeTransducedAccessorImpl.parse(TransducedAccessor.java:243)
        at com.sun.xml.bind.v2.runtime.unmarshaller.LeafPropertyLoader.text(LeafPropertyLoader.java:61)
        ... 132 more
        Caused by: javax.xml.bind.UnmarshalException
      • with linked exception:
        [javax.xml.bind.UnmarshalException
      • with linked exception:
        [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:764)
        at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:628)
        at org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:133)
        at org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:109)
        at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:243)
        at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:755)
        at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:2404)
        at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:2274)
        at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:2119)
        at org.apache.cxf.io.CacheAndWriteOutputStream.postClose(CacheAndWriteOutputStream.java:47)
        at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:188)
        at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
        at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:695)
        at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
        at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:243)
        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.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)
        ... 106 more
        Caused by: javax.xml.bind.UnmarshalException
      • with linked exception:
        [java.lang.NullPointerException]
        at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleEvent(UnmarshallingContext.java:642)
        at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleError(UnmarshallingContext.java:671)
        at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleError(UnmarshallingContext.java:667)
        at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.handleParseConversionException(Loader.java:267)
        at com.sun.xml.bind.v2.runtime.unmarshaller.LeafPropertyLoader.text(LeafPropertyLoader.java:65)
        at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.text(UnmarshallingContext.java:494)
        at com.sun.xml.bind.v2.runtime.unmarshaller.MTOMDecorator.startElement(MTOMDecorator.java:103)
        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)
        ... 127 more
        Caused by: javax.xml.bind.UnmarshalException
      • with linked exception:
        [java.lang.NullPointerException]
        ... 137 more
        Caused by: java.lang.NullPointerException
        at org.apache.cxf.attachment.LazyDataSource.getInputStream(LazyDataSource.java:67)
        at com.sun.xml.bind.v2.runtime.unmarshaller.Base64Data.get(Base64Data.java:188)
        at com.sun.xml.bind.v2.runtime.unmarshaller.Base64Data.getExact(Base64Data.java:154)
        at com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl.decodeBase64(RuntimeBuiltinLeafInfoImpl.java:877)
        at com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl.access$100(RuntimeBuiltinLeafInfoImpl.java:111)
        at com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl$14.parse(RuntimeBuiltinLeafInfoImpl.java:678)
        at com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl$14.parse(RuntimeBuiltinLeafInfoImpl.java:681)
        at com.sun.xml.bind.v2.runtime.reflect.TransducedAccessor$CompositeTransducedAccessorImpl.parse(TransducedAccessor.java:243)
        at com.sun.xml.bind.v2.runtime.unmarshaller.LeafPropertyLoader.text(LeafPropertyLoader.java:61)
        ... 132 more

        Activity

        Christopher G. Stach II created issue -
        Christopher G. Stach II made changes -
        Field Original Value New Value
        Description Unfortunately, I cannot provide the message that generates this exception. After updating to 2.2.12 to get past another issue, it was similarly affected by CXF-3383.

        DefaultValidationEventHandler: [ERROR]: null
             Location: line 1
        org.apache.cxf.interceptor.Fault: Unmarshalling Error: null
                at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:787)
                at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:628)
                at org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:133)
                at org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:109)
                at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:243)
                at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:755)
                at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:2404)
                at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:2274)
                at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:2119)
                at org.apache.cxf.io.CacheAndWriteOutputStream.postClose(CacheAndWriteOutputStream.java:47)
                at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:188)
                at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
                at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:695)
                at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
                at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:243)
                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.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)
        [...]
        Caused by: javax.xml.bind.UnmarshalException
         - with linked exception:
        [javax.xml.bind.UnmarshalException
         - with linked exception:
        [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:764)
                ... 125 more
        Caused by: javax.xml.bind.UnmarshalException
         - with linked exception:
        [java.lang.NullPointerException]
                at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleEvent(UnmarshallingContext.java:642)
                at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleError(UnmarshallingContext.java:671)
                at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleError(UnmarshallingContext.java:667)
                at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.handleParseConversionException(Loader.java:267)
                at com.sun.xml.bind.v2.runtime.unmarshaller.LeafPropertyLoader.text(LeafPropertyLoader.java:65)
                at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.text(UnmarshallingContext.java:494)
                at com.sun.xml.bind.v2.runtime.unmarshaller.MTOMDecorator.startElement(MTOMDecorator.java:103)
                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)
                ... 127 more
        Caused by: javax.xml.bind.UnmarshalException
         - with linked exception:
        [java.lang.NullPointerException]
                ... 137 more
        Caused by: java.lang.NullPointerException
                at org.apache.cxf.attachment.LazyDataSource.getInputStream(LazyDataSource.java:67)
                at com.sun.xml.bind.v2.runtime.unmarshaller.Base64Data.get(Base64Data.java:188)
                at com.sun.xml.bind.v2.runtime.unmarshaller.Base64Data.getExact(Base64Data.java:154)
                at com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl.decodeBase64(RuntimeBuiltinLeafInfoImpl.java:877)
                at com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl.access$100(RuntimeBuiltinLeafInfoImpl.java:111)
                at com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl$14.parse(RuntimeBuiltinLeafInfoImpl.java:678)
                at com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl$14.parse(RuntimeBuiltinLeafInfoImpl.java:681)
                at com.sun.xml.bind.v2.runtime.reflect.TransducedAccessor$CompositeTransducedAccessorImpl.parse(TransducedAccessor.java:243)
                at com.sun.xml.bind.v2.runtime.unmarshaller.LeafPropertyLoader.text(LeafPropertyLoader.java:61)
                ... 132 more
        Caused by: javax.xml.bind.UnmarshalException
         - with linked exception:
        [javax.xml.bind.UnmarshalException
         - with linked exception:
        [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:764)
                at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:628)
                at org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:133)
                at org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:109)
                at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:243)
                at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:755)
                at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:2404)
                at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:2274)
                at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:2119)
                at org.apache.cxf.io.CacheAndWriteOutputStream.postClose(CacheAndWriteOutputStream.java:47)
                at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:188)
                at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
                at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:695)
                at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
                at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:243)
                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.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)
                ... 106 more
        Caused by: javax.xml.bind.UnmarshalException
         - with linked exception:
        [java.lang.NullPointerException]
                at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleEvent(UnmarshallingContext.java:642)
                at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleError(UnmarshallingContext.java:671)
                at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleError(UnmarshallingContext.java:667)
                at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.handleParseConversionException(Loader.java:267)
                at com.sun.xml.bind.v2.runtime.unmarshaller.LeafPropertyLoader.text(LeafPropertyLoader.java:65)
                at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.text(UnmarshallingContext.java:494)
                at com.sun.xml.bind.v2.runtime.unmarshaller.MTOMDecorator.startElement(MTOMDecorator.java:103)
                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)
                ... 127 more
        Caused by: javax.xml.bind.UnmarshalException
         - with linked exception:
        [java.lang.NullPointerException]
                ... 137 more
        Caused by: java.lang.NullPointerException
                at org.apache.cxf.attachment.LazyDataSource.getInputStream(LazyDataSource.java:67)
                at com.sun.xml.bind.v2.runtime.unmarshaller.Base64Data.get(Base64Data.java:188)
                at com.sun.xml.bind.v2.runtime.unmarshaller.Base64Data.getExact(Base64Data.java:154)
                at com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl.decodeBase64(RuntimeBuiltinLeafInfoImpl.java:877)
                at com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl.access$100(RuntimeBuiltinLeafInfoImpl.java:111)
                at com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl$14.parse(RuntimeBuiltinLeafInfoImpl.java:678)
                at com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl$14.parse(RuntimeBuiltinLeafInfoImpl.java:681)
                at com.sun.xml.bind.v2.runtime.reflect.TransducedAccessor$CompositeTransducedAccessorImpl.parse(TransducedAccessor.java:243)
                at com.sun.xml.bind.v2.runtime.unmarshaller.LeafPropertyLoader.text(LeafPropertyLoader.java:61)
                ... 132 more
        Unfortunately, I cannot provide the message that generates this exception. It worked with 2.2.2, but after updating to 2.2.12 to get past another issue, it was similarly affected by CXF-3383. 2.3.4 just moves the exception to here:

        DefaultValidationEventHandler: [ERROR]: null
             Location: line 1
        org.apache.cxf.interceptor.Fault: Unmarshalling Error: null
                at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:787)
                at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:628)
                at org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:133)
                at org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:109)
                at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:243)
                at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:755)
                at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:2404)
                at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:2274)
                at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:2119)
                at org.apache.cxf.io.CacheAndWriteOutputStream.postClose(CacheAndWriteOutputStream.java:47)
                at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:188)
                at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
                at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:695)
                at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
                at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:243)
                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.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)
        [...]
        Caused by: javax.xml.bind.UnmarshalException
         - with linked exception:
        [javax.xml.bind.UnmarshalException
         - with linked exception:
        [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:764)
                ... 125 more
        Caused by: javax.xml.bind.UnmarshalException
         - with linked exception:
        [java.lang.NullPointerException]
                at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleEvent(UnmarshallingContext.java:642)
                at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleError(UnmarshallingContext.java:671)
                at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleError(UnmarshallingContext.java:667)
                at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.handleParseConversionException(Loader.java:267)
                at com.sun.xml.bind.v2.runtime.unmarshaller.LeafPropertyLoader.text(LeafPropertyLoader.java:65)
                at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.text(UnmarshallingContext.java:494)
                at com.sun.xml.bind.v2.runtime.unmarshaller.MTOMDecorator.startElement(MTOMDecorator.java:103)
                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)
                ... 127 more
        Caused by: javax.xml.bind.UnmarshalException
         - with linked exception:
        [java.lang.NullPointerException]
                ... 137 more
        Caused by: java.lang.NullPointerException
                at org.apache.cxf.attachment.LazyDataSource.getInputStream(LazyDataSource.java:67)
                at com.sun.xml.bind.v2.runtime.unmarshaller.Base64Data.get(Base64Data.java:188)
                at com.sun.xml.bind.v2.runtime.unmarshaller.Base64Data.getExact(Base64Data.java:154)
                at com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl.decodeBase64(RuntimeBuiltinLeafInfoImpl.java:877)
                at com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl.access$100(RuntimeBuiltinLeafInfoImpl.java:111)
                at com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl$14.parse(RuntimeBuiltinLeafInfoImpl.java:678)
                at com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl$14.parse(RuntimeBuiltinLeafInfoImpl.java:681)
                at com.sun.xml.bind.v2.runtime.reflect.TransducedAccessor$CompositeTransducedAccessorImpl.parse(TransducedAccessor.java:243)
                at com.sun.xml.bind.v2.runtime.unmarshaller.LeafPropertyLoader.text(LeafPropertyLoader.java:61)
                ... 132 more
        Caused by: javax.xml.bind.UnmarshalException
         - with linked exception:
        [javax.xml.bind.UnmarshalException
         - with linked exception:
        [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:764)
                at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:628)
                at org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:133)
                at org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:109)
                at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:243)
                at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:755)
                at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:2404)
                at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:2274)
                at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:2119)
                at org.apache.cxf.io.CacheAndWriteOutputStream.postClose(CacheAndWriteOutputStream.java:47)
                at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:188)
                at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
                at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:695)
                at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
                at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:243)
                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.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)
                ... 106 more
        Caused by: javax.xml.bind.UnmarshalException
         - with linked exception:
        [java.lang.NullPointerException]
                at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleEvent(UnmarshallingContext.java:642)
                at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleError(UnmarshallingContext.java:671)
                at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleError(UnmarshallingContext.java:667)
                at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.handleParseConversionException(Loader.java:267)
                at com.sun.xml.bind.v2.runtime.unmarshaller.LeafPropertyLoader.text(LeafPropertyLoader.java:65)
                at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.text(UnmarshallingContext.java:494)
                at com.sun.xml.bind.v2.runtime.unmarshaller.MTOMDecorator.startElement(MTOMDecorator.java:103)
                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)
                ... 127 more
        Caused by: javax.xml.bind.UnmarshalException
         - with linked exception:
        [java.lang.NullPointerException]
                ... 137 more
        Caused by: java.lang.NullPointerException
                at org.apache.cxf.attachment.LazyDataSource.getInputStream(LazyDataSource.java:67)
                at com.sun.xml.bind.v2.runtime.unmarshaller.Base64Data.get(Base64Data.java:188)
                at com.sun.xml.bind.v2.runtime.unmarshaller.Base64Data.getExact(Base64Data.java:154)
                at com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl.decodeBase64(RuntimeBuiltinLeafInfoImpl.java:877)
                at com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl.access$100(RuntimeBuiltinLeafInfoImpl.java:111)
                at com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl$14.parse(RuntimeBuiltinLeafInfoImpl.java:678)
                at com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl$14.parse(RuntimeBuiltinLeafInfoImpl.java:681)
                at com.sun.xml.bind.v2.runtime.reflect.TransducedAccessor$CompositeTransducedAccessorImpl.parse(TransducedAccessor.java:243)
                at com.sun.xml.bind.v2.runtime.unmarshaller.LeafPropertyLoader.text(LeafPropertyLoader.java:61)
                ... 132 more
        J. Daniel Kulp <dkulp@apache.org> committed 2c81965cfe31529b2364326facca5703a423199d (1 file)
        Reviews: none

        [CXF-3477] Stick a better error message in (rather than an NPE) if an attachment couldn't be found.
        git-svn-id: https://svn.apache.org/repos/asf/cxf/trunk@1129987 13f79535-47bb-0310-9956-ffa450edef68

        Hide
        Daniel Kulp added a comment -

        Without the messages and/or a testcase, there likely isn't much we can do. I did add additional exception information from the LazyDataSource instead of getting an NPE.

        Show
        Daniel Kulp added a comment - Without the messages and/or a testcase, there likely isn't much we can do. I did add additional exception information from the LazyDataSource instead of getting an NPE.
        Daniel Kulp made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Daniel Kulp [ dkulp ]
        Fix Version/s 2.4.1 [ 12316354 ]
        Resolution Fixed [ 1 ]
        Daniel Kulp made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Daniel Kulp
            Reporter:
            Christopher G. Stach II
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development