Re: Stream closed while unzipping in a container
Sure, issue is created: https://issues.apache.org/jira/browse/CAMEL-20080 Raymond On Sat, Nov 4, 2023 at 10:17 AM Andrea Cosentino wrote: > Il ven 3 nov 2023, 09:33 ski n ha scritto: > > > Sorry, I forgot to mention. This was tested with Camel 3.20.7 (JDK 11). > > > > btw: I'm also in the progress to upgrade to 4, but that has some > caveats. > > This is not because of Camel, but more of other things like Junit5, > > Jakarta, ActiveMQ, Java17+.etc. that also needs to upgrade. > > > > btw 2: The migration guide of Camel is excellent. Compliments to the team > > for that. The only feedback I can give here is that I missed the removal > of > > “context.getExtensions(...)” for example for ManagedCamelContext. > > Otherwise, it was fairly complete. For removed/add/changed methods it may > > be clearer to put them in a table, with one column (add / removed > > /changed), a column with old syntax and a column with the new syntax (if > > applicable). It's OK to know if something was removed/deprecated, but > even > > better what to use as an alternative (same counts for Javadoc). > > > > Can you open an issue for this? It's important to improve the migration > path and make it complete. > > > > Raymond > > > > > > > > > > > > On Fri, Nov 3, 2023 at 9:14 AM Claus Ibsen > wrote: > > > > > Hi > > > > > > Which Camel version, and have you tried with latest releases. > > > > > > On Thu, Nov 2, 2023 at 9:00 PM ski n wrote: > > > > > > > I have a route where I want to unzip zipfile (containing 1 or more > > > files). > > > > This is the route: > > > > > > > > ZipFileDataFormat zipFile = new ZipFileDataFormat(); > > > > zipFile.setUsingIterator(true); > > > > > > > > > > > > > > > > > > from("file:src/test/resources/org/apache/camel/dataformat/zipfile/?delay=1000=true") > > > > .unmarshal(zipFile) > > > > .split(bodyAs(Iterator.class)).streaming() > > > > .process(new UnZippedMessageProcessor()) > > > > .end(); > > > > > > > > When I tested this locally on my Windows machine everything goes > well, > > > > but when I pack in into a container (Alpine) > > > > > > > > and run it on a server (Ubuntu) I get the following error: > > > > > > > > org.apache.camel.StreamCacheException: Error during type conversion > > > > from type: org.apache.camel.dataformat.zipfile.ZipInputStreamWrapper > > > > to the required type: org.apache.camel.StreamCache with value > > > > org.apache.camel.dataformat.zipfile.ZipInputStreamWrapper@10538c67 > > > > due to org.apache.camel.TypeConversionException: Error during type > > > > conversion from type: > > > > org.apache.camel.dataformat.zipfile.ZipInputStreamWrapper > > > > to the required type: org.apache.camel.StreamCache with value > > > > org.apache.camel.dataformat.zipfile.ZipInputStreamWrapper@10538c67 > due > > > > to java.io.IOException: Stream closed > > > > > > > > Based on the error message I'm unsure, is this really a conversion > > > > error or more a permission problem to the spooldirectory or is this > > > > something else? > > > > > > > > Raymond > > > > > > > > > > > > > -- > > > Claus Ibsen > > > - > > > @davsclaus > > > Camel in Action 2: https://www.manning.com/ibsen2 > > > > > >
Re: Stream closed while unzipping in a container
Il ven 3 nov 2023, 09:33 ski n ha scritto: > Sorry, I forgot to mention. This was tested with Camel 3.20.7 (JDK 11). > > btw: I'm also in the progress to upgrade to 4, but that has some caveats. > This is not because of Camel, but more of other things like Junit5, > Jakarta, ActiveMQ, Java17+.etc. that also needs to upgrade. > > btw 2: The migration guide of Camel is excellent. Compliments to the team > for that. The only feedback I can give here is that I missed the removal of > “context.getExtensions(...)” for example for ManagedCamelContext. > Otherwise, it was fairly complete. For removed/add/changed methods it may > be clearer to put them in a table, with one column (add / removed > /changed), a column with old syntax and a column with the new syntax (if > applicable). It's OK to know if something was removed/deprecated, but even > better what to use as an alternative (same counts for Javadoc). > Can you open an issue for this? It's important to improve the migration path and make it complete. > Raymond > > > > > > On Fri, Nov 3, 2023 at 9:14 AM Claus Ibsen wrote: > > > Hi > > > > Which Camel version, and have you tried with latest releases. > > > > On Thu, Nov 2, 2023 at 9:00 PM ski n wrote: > > > > > I have a route where I want to unzip zipfile (containing 1 or more > > files). > > > This is the route: > > > > > > ZipFileDataFormat zipFile = new ZipFileDataFormat(); > > > zipFile.setUsingIterator(true); > > > > > > > > > > > > from("file:src/test/resources/org/apache/camel/dataformat/zipfile/?delay=1000=true") > > > .unmarshal(zipFile) > > > .split(bodyAs(Iterator.class)).streaming() > > > .process(new UnZippedMessageProcessor()) > > > .end(); > > > > > > When I tested this locally on my Windows machine everything goes well, > > > but when I pack in into a container (Alpine) > > > > > > and run it on a server (Ubuntu) I get the following error: > > > > > > org.apache.camel.StreamCacheException: Error during type conversion > > > from type: org.apache.camel.dataformat.zipfile.ZipInputStreamWrapper > > > to the required type: org.apache.camel.StreamCache with value > > > org.apache.camel.dataformat.zipfile.ZipInputStreamWrapper@10538c67 > > > due to org.apache.camel.TypeConversionException: Error during type > > > conversion from type: > > > org.apache.camel.dataformat.zipfile.ZipInputStreamWrapper > > > to the required type: org.apache.camel.StreamCache with value > > > org.apache.camel.dataformat.zipfile.ZipInputStreamWrapper@10538c67 due > > > to java.io.IOException: Stream closed > > > > > > Based on the error message I'm unsure, is this really a conversion > > > error or more a permission problem to the spooldirectory or is this > > > something else? > > > > > > Raymond > > > > > > > > > -- > > Claus Ibsen > > - > > @davsclaus > > Camel in Action 2: https://www.manning.com/ibsen2 > > >
Re: Stream closed while unzipping in a container
OK, thanks for the notice. I can test a patch for example for 3.20.9 when needed. On Sat, Nov 4, 2023 at 10:07 AM Otavio Rodolfo Piske wrote: > Hi, > > I think this might be this issue or related to it: > https://issues.apache.org/jira/browse/CAMEL-19849. > > It needs to be investigated further. > > Kind regards > > > > > On Fri, Nov 3, 2023 at 9:33 AM ski n wrote: > > > Sorry, I forgot to mention. This was tested with Camel 3.20.7 (JDK 11). > > > > btw: I'm also in the progress to upgrade to 4, but that has some > caveats. > > This is not because of Camel, but more of other things like Junit5, > > Jakarta, ActiveMQ, Java17+.etc. that also needs to upgrade. > > > > btw 2: The migration guide of Camel is excellent. Compliments to the team > > for that. The only feedback I can give here is that I missed the removal > of > > “context.getExtensions(...)” for example for ManagedCamelContext. > > Otherwise, it was fairly complete. For removed/add/changed methods it may > > be clearer to put them in a table, with one column (add / removed > > /changed), a column with old syntax and a column with the new syntax (if > > applicable). It's OK to know if something was removed/deprecated, but > even > > better what to use as an alternative (same counts for Javadoc). > > > > Raymond > > > > > > > > > > > > On Fri, Nov 3, 2023 at 9:14 AM Claus Ibsen > wrote: > > > > > Hi > > > > > > Which Camel version, and have you tried with latest releases. > > > > > > On Thu, Nov 2, 2023 at 9:00 PM ski n wrote: > > > > > > > I have a route where I want to unzip zipfile (containing 1 or more > > > files). > > > > This is the route: > > > > > > > > ZipFileDataFormat zipFile = new ZipFileDataFormat(); > > > > zipFile.setUsingIterator(true); > > > > > > > > > > > > > > > > > > from("file:src/test/resources/org/apache/camel/dataformat/zipfile/?delay=1000=true") > > > > .unmarshal(zipFile) > > > > .split(bodyAs(Iterator.class)).streaming() > > > > .process(new UnZippedMessageProcessor()) > > > > .end(); > > > > > > > > When I tested this locally on my Windows machine everything goes > well, > > > > but when I pack in into a container (Alpine) > > > > > > > > and run it on a server (Ubuntu) I get the following error: > > > > > > > > org.apache.camel.StreamCacheException: Error during type conversion > > > > from type: org.apache.camel.dataformat.zipfile.ZipInputStreamWrapper > > > > to the required type: org.apache.camel.StreamCache with value > > > > org.apache.camel.dataformat.zipfile.ZipInputStreamWrapper@10538c67 > > > > due to org.apache.camel.TypeConversionException: Error during type > > > > conversion from type: > > > > org.apache.camel.dataformat.zipfile.ZipInputStreamWrapper > > > > to the required type: org.apache.camel.StreamCache with value > > > > org.apache.camel.dataformat.zipfile.ZipInputStreamWrapper@10538c67 > due > > > > to java.io.IOException: Stream closed > > > > > > > > Based on the error message I'm unsure, is this really a conversion > > > > error or more a permission problem to the spooldirectory or is this > > > > something else? > > > > > > > > Raymond > > > > > > > > > > > > > -- > > > Claus Ibsen > > > - > > > @davsclaus > > > Camel in Action 2: https://www.manning.com/ibsen2 > > > > > > > > -- > Otavio R. Piske > http://orpiske.net >
Re: Stream closed while unzipping in a container
Hi, I think this might be this issue or related to it: https://issues.apache.org/jira/browse/CAMEL-19849. It needs to be investigated further. Kind regards On Fri, Nov 3, 2023 at 9:33 AM ski n wrote: > Sorry, I forgot to mention. This was tested with Camel 3.20.7 (JDK 11). > > btw: I'm also in the progress to upgrade to 4, but that has some caveats. > This is not because of Camel, but more of other things like Junit5, > Jakarta, ActiveMQ, Java17+.etc. that also needs to upgrade. > > btw 2: The migration guide of Camel is excellent. Compliments to the team > for that. The only feedback I can give here is that I missed the removal of > “context.getExtensions(...)” for example for ManagedCamelContext. > Otherwise, it was fairly complete. For removed/add/changed methods it may > be clearer to put them in a table, with one column (add / removed > /changed), a column with old syntax and a column with the new syntax (if > applicable). It's OK to know if something was removed/deprecated, but even > better what to use as an alternative (same counts for Javadoc). > > Raymond > > > > > > On Fri, Nov 3, 2023 at 9:14 AM Claus Ibsen wrote: > > > Hi > > > > Which Camel version, and have you tried with latest releases. > > > > On Thu, Nov 2, 2023 at 9:00 PM ski n wrote: > > > > > I have a route where I want to unzip zipfile (containing 1 or more > > files). > > > This is the route: > > > > > > ZipFileDataFormat zipFile = new ZipFileDataFormat(); > > > zipFile.setUsingIterator(true); > > > > > > > > > > > > from("file:src/test/resources/org/apache/camel/dataformat/zipfile/?delay=1000=true") > > > .unmarshal(zipFile) > > > .split(bodyAs(Iterator.class)).streaming() > > > .process(new UnZippedMessageProcessor()) > > > .end(); > > > > > > When I tested this locally on my Windows machine everything goes well, > > > but when I pack in into a container (Alpine) > > > > > > and run it on a server (Ubuntu) I get the following error: > > > > > > org.apache.camel.StreamCacheException: Error during type conversion > > > from type: org.apache.camel.dataformat.zipfile.ZipInputStreamWrapper > > > to the required type: org.apache.camel.StreamCache with value > > > org.apache.camel.dataformat.zipfile.ZipInputStreamWrapper@10538c67 > > > due to org.apache.camel.TypeConversionException: Error during type > > > conversion from type: > > > org.apache.camel.dataformat.zipfile.ZipInputStreamWrapper > > > to the required type: org.apache.camel.StreamCache with value > > > org.apache.camel.dataformat.zipfile.ZipInputStreamWrapper@10538c67 due > > > to java.io.IOException: Stream closed > > > > > > Based on the error message I'm unsure, is this really a conversion > > > error or more a permission problem to the spooldirectory or is this > > > something else? > > > > > > Raymond > > > > > > > > > -- > > Claus Ibsen > > - > > @davsclaus > > Camel in Action 2: https://www.manning.com/ibsen2 > > > -- Otavio R. Piske http://orpiske.net
Re: Stream closed while unzipping in a container
Sorry, I forgot to mention. This was tested with Camel 3.20.7 (JDK 11). btw: I'm also in the progress to upgrade to 4, but that has some caveats. This is not because of Camel, but more of other things like Junit5, Jakarta, ActiveMQ, Java17+.etc. that also needs to upgrade. btw 2: The migration guide of Camel is excellent. Compliments to the team for that. The only feedback I can give here is that I missed the removal of “context.getExtensions(...)” for example for ManagedCamelContext. Otherwise, it was fairly complete. For removed/add/changed methods it may be clearer to put them in a table, with one column (add / removed /changed), a column with old syntax and a column with the new syntax (if applicable). It's OK to know if something was removed/deprecated, but even better what to use as an alternative (same counts for Javadoc). Raymond On Fri, Nov 3, 2023 at 9:14 AM Claus Ibsen wrote: > Hi > > Which Camel version, and have you tried with latest releases. > > On Thu, Nov 2, 2023 at 9:00 PM ski n wrote: > > > I have a route where I want to unzip zipfile (containing 1 or more > files). > > This is the route: > > > > ZipFileDataFormat zipFile = new ZipFileDataFormat(); > > zipFile.setUsingIterator(true); > > > > > > > from("file:src/test/resources/org/apache/camel/dataformat/zipfile/?delay=1000=true") > > .unmarshal(zipFile) > > .split(bodyAs(Iterator.class)).streaming() > > .process(new UnZippedMessageProcessor()) > > .end(); > > > > When I tested this locally on my Windows machine everything goes well, > > but when I pack in into a container (Alpine) > > > > and run it on a server (Ubuntu) I get the following error: > > > > org.apache.camel.StreamCacheException: Error during type conversion > > from type: org.apache.camel.dataformat.zipfile.ZipInputStreamWrapper > > to the required type: org.apache.camel.StreamCache with value > > org.apache.camel.dataformat.zipfile.ZipInputStreamWrapper@10538c67 > > due to org.apache.camel.TypeConversionException: Error during type > > conversion from type: > > org.apache.camel.dataformat.zipfile.ZipInputStreamWrapper > > to the required type: org.apache.camel.StreamCache with value > > org.apache.camel.dataformat.zipfile.ZipInputStreamWrapper@10538c67 due > > to java.io.IOException: Stream closed > > > > Based on the error message I'm unsure, is this really a conversion > > error or more a permission problem to the spooldirectory or is this > > something else? > > > > Raymond > > > > > -- > Claus Ibsen > - > @davsclaus > Camel in Action 2: https://www.manning.com/ibsen2 >
Re: Stream closed while unzipping in a container
Hi Which Camel version, and have you tried with latest releases. On Thu, Nov 2, 2023 at 9:00 PM ski n wrote: > I have a route where I want to unzip zipfile (containing 1 or more files). > This is the route: > > ZipFileDataFormat zipFile = new ZipFileDataFormat(); > zipFile.setUsingIterator(true); > > > from("file:src/test/resources/org/apache/camel/dataformat/zipfile/?delay=1000=true") > .unmarshal(zipFile) > .split(bodyAs(Iterator.class)).streaming() > .process(new UnZippedMessageProcessor()) > .end(); > > When I tested this locally on my Windows machine everything goes well, > but when I pack in into a container (Alpine) > > and run it on a server (Ubuntu) I get the following error: > > org.apache.camel.StreamCacheException: Error during type conversion > from type: org.apache.camel.dataformat.zipfile.ZipInputStreamWrapper > to the required type: org.apache.camel.StreamCache with value > org.apache.camel.dataformat.zipfile.ZipInputStreamWrapper@10538c67 > due to org.apache.camel.TypeConversionException: Error during type > conversion from type: > org.apache.camel.dataformat.zipfile.ZipInputStreamWrapper > to the required type: org.apache.camel.StreamCache with value > org.apache.camel.dataformat.zipfile.ZipInputStreamWrapper@10538c67 due > to java.io.IOException: Stream closed > > Based on the error message I'm unsure, is this really a conversion > error or more a permission problem to the spooldirectory or is this > something else? > > Raymond > -- Claus Ibsen - @davsclaus Camel in Action 2: https://www.manning.com/ibsen2
Stream closed while unzipping in a container
I have a route where I want to unzip zipfile (containing 1 or more files). This is the route: ZipFileDataFormat zipFile = new ZipFileDataFormat(); zipFile.setUsingIterator(true); from("file:src/test/resources/org/apache/camel/dataformat/zipfile/?delay=1000=true") .unmarshal(zipFile) .split(bodyAs(Iterator.class)).streaming() .process(new UnZippedMessageProcessor()) .end(); When I tested this locally on my Windows machine everything goes well, but when I pack in into a container (Alpine) and run it on a server (Ubuntu) I get the following error: org.apache.camel.StreamCacheException: Error during type conversion from type: org.apache.camel.dataformat.zipfile.ZipInputStreamWrapper to the required type: org.apache.camel.StreamCache with value org.apache.camel.dataformat.zipfile.ZipInputStreamWrapper@10538c67 due to org.apache.camel.TypeConversionException: Error during type conversion from type: org.apache.camel.dataformat.zipfile.ZipInputStreamWrapper to the required type: org.apache.camel.StreamCache with value org.apache.camel.dataformat.zipfile.ZipInputStreamWrapper@10538c67 due to java.io.IOException: Stream closed Based on the error message I'm unsure, is this really a conversion error or more a permission problem to the spooldirectory or is this something else? Raymond