camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Franz Forsthofer (JIRA)" <>
Subject [jira] [Updated] (CAMEL-7055) NullPointerException at FileInputStreamCache.<init>( in connection with DataFormat.marshal
Date Tue, 10 Dec 2013 07:40:07 GMT


Franz Forsthofer updated CAMEL-7055:

    Affects Version/s: 2.12.3

> NullPointerException at FileInputStreamCache.<init>(
in connection with DataFormat.marshal
> -----------------------------------------------------------------------------------------------------------------------
>                 Key: CAMEL-7055
>                 URL:
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.12.2, 2.12.3
>            Reporter: Franz Forsthofer
>            Priority: Critical
>             Fix For: 2.12.3
>         Attachments: 0001-bug-CachedOutputStream-close.patch
> Stack Trace:
> {code}
> Caused by: java.lang.NullPointerException
> 	at<init>(
> 	at
> 	at org.apache.camel.processor.MarshalProcessor.process(
> {code}
> Error occurs, if streamCache is true and the stream is put into the file system because
the spool threashold is reached. 
> The following is happening:
> The Marshall Processor handels over to the DataFroamat.marshal method a CachedOutputStream
instance. In the marschal method data are writtin into the output stream, when the spool threshold
is reached the data are streamed into the file system. Finally the output stream is closed
and the CachedOutputStream instance deletes the cached file during closing. The next processor
tries to read the FileInputStreamCache and gets the NullPointerException.
> Currently this problem can occur in the following DataFormat classes (because they close
the stream, which is actually correct):
> GzipDataFormat
> CryptoDataFormat
> PGPDataFormat
> SerializationDataFormat
> XMLSecurityDataFormat
> ZipDataFormat
> My proposal is not to delete the cached file during closing the output stream. The cached
file shall only be closed on the onCompletion event of the route. See attached patch.

This message was sent by Atlassian JIRA

View raw message