You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Jörg Jansen <Jo...@inform-software.com> on 2022/02/03 15:55:49 UTC
reading mail attachments
Hi all,
I've recognized a strange behavior, where I need some help.
Running my pure camel route, to read mail attachments, everything works as expected.
When running the same within my karaf distribution, the attachments could not be resolved.
My route looks like this:
from("pop3://mypop3server?username=myuser &password=mypassword&unseen=true&delay=20000")
.routeId("mail-test-route")
.split().method(SplitAttachmentsExpression.class)
.log(LoggingLevel.INFO, "Received Attachment: ${body}")
.to("file:out")
.end()
;
Instead of my attachments, I now receive the plain text with the Base64 encoded attachments.
I'm using camel 3.14.1 and karaf 4.3.6.
To reproduce this scenario you just need the following steps:
- start karaf
- repo-add camel
- feature:install camel-blueprint camel-mail
- deploy the attache camel-route indo deploy folder
Route to deploy:
<?xml version="1.0" encoding="UTF-8"?>
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
http://camel.apache.org/schema/blueprint http://camel.apache.org/schema/blueprint/camel-blueprint.xsd">
<camelContext id="mail-test" xmlns="http://camel.apache.org/schema/blueprint" trace="false" logMask="true" useBreadcrumb="true" streamCache="false">
<route id="mail-test-route">
<from uri="pop3:// mypop3server?username= myuser &password= mypassword &unseen=true&delay=20000"/>
<split>
<method beanType="org.apache.camel.component.mail.SplitAttachmentsExpression" />
<log message="Me Got ${body}" loggingLevel="INFO" />
<to uri="file:mail/out" />
</split>
</route>
</camelContext>
</blueprint>
Any advice would be great,
Joerg
Re: reading mail attachments
Posted by John Taylor <jt...@gmail.com>.
Hi Joerg and JB,
Great, I'm glad you got it working, but I want to point out i was wrong
about what I said
>> That pulls in the com.sun.activation/jakarta.activation bundle I believe
and that doesn't seem to work with the camel attachments processing
That's not correct because lib/jdk9plus has
org.apache.servicemix.specs.activation-api-1.2.1-1.2.1_3.jar
apache-karaf-4.3.6/lib/jdk9plus:
istack-commons-runtime-3.0.10.jar
jakarta.xml.bind-api-2.3.3.jar
javax.annotation-api-1.3.2.jar
jaxb-runtime-2.3.3.jar
org.apache.servicemix.specs.activation-api-1.2.1-1.2.1_3.jar
txw2-2.3.3.jar
So what that means is that in a base install with jre.properties including
the export of javax/activation that the same servicemix package is supposed
to be providing those classes for the boot context (I believe that's the
right way to put it, the boot classpath) and that means that it *is* likely
something to do with classloading in camel.
@JB
>>In Karaf, we add a activation spec feature (already done) in specs
features repo with activation capability
That must be what I was thinking about when I said
com.sun.activation/jakarta.activation because that feature uses that.
I believe I *tried* that feature and it didn't work, but it might have been
while javax/activation was still being exported into boot.
karaf@root()> feature:info activation
Feature activation 1.2.2
Feature contains followed bundles:
mvn:com.sun.activation/jakarta.activation/1.2.2 start-level=10
-John
On Fri, Feb 4, 2022 at 2:48 AM Jean-Baptiste Onofré <jb...@nanthrax.net> wrote:
> Hi Joerg,
>
> Maybe you can do the following:
>
> - in Karaf by default, we remove activation from jre-9 jre.properties
> - in Karaf, we add a activation spec feature (already done) in specs
> features repo with activation capability
> - in Camel, you define the requirement to the activation capability
>
> Regards
> JB
>
> On 04/02/2022 08:26, Jörg Jansen wrote:
> > Hi John,
> >
> > you made my day 😊.
> >
> > Removing the javax.activation from jre properties solved the problem.
> >
> > @Jean-Baptiste Onofre <ma...@nanthrax.net>: Nevertheless, there
> > might be a bug within the camel-mail integration.
> >
> > Should I create a Bug-Report for this behvior?
> >
> > Kind regards,
> >
> > Joerg
>
Re: reading mail attachments
Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Joerg,
Maybe you can do the following:
- in Karaf by default, we remove activation from jre-9 jre.properties
- in Karaf, we add a activation spec feature (already done) in specs
features repo with activation capability
- in Camel, you define the requirement to the activation capability
Regards
JB
On 04/02/2022 08:26, Jörg Jansen wrote:
> Hi John,
>
> you made my day 😊.
>
> Removing the javax.activation from jre properties solved the problem.
>
> @Jean-Baptiste Onofre <ma...@nanthrax.net>: Nevertheless, there
> might be a bug within the camel-mail integration.
>
> Should I create a Bug-Report for this behvior?
>
> Kind regards,
>
> Joerg
>
> *From:*Jörg Jansen <Jo...@inform-software.com>
> *Sent:* Donnerstag, 3. Februar 2022 20:09
> *To:* user@karaf.apache.org; Jean-Baptiste Onofre <jb...@nanthrax.net>
> *Subject:* RE: reading mail attachments
>
> Hi John,
>
> thanks for your suggestion.
>
> I will give it a try and let you know.
>
> @Jean-Baptiste Onofre <ma...@nanthrax.net>: yes, exactly the same
> setup, only karaf updates. 4.3.2 works 4.3.5, 4.3.6 don’t work.
>
> Rgds,
> Joerg
>
> *From:*John Taylor <jtt77777@gmail.com <ma...@gmail.com>>
> *Sent:* Donnerstag, 3. Februar 2022 19:13
> *To:* user@karaf.apache.org <ma...@karaf.apache.org>
> *Subject:* Re: reading mail attachments
>
>
>
> Sie erhalten nicht oft E-Mail von "jtt77777@gmail.com
> <ma...@gmail.com>". Weitere Informationen, warum dies wichtig
> ist <http://aka.ms/LearnAboutSenderIdentification>
>
>
>
> Hi Joerg,
>
> I ran into the same problem.
>
> With either 4.3.5 or 4.3.6 I believe javax.activation was included in
> the jre-9 export in jre.properties
>
> That pulls in the com.sun.activation/jakarta.activation bundle I believe
> and that doesn't seem to work with the camel attachments processing.
>
> What I did to resolve it is comment that out in jre.properties and pull
> in the servicemix activation package.
>
> jre.properties
> jre-9= \
> ${jre-base}, \
> javax.accessibility, \
> javax.activity, \
> javax.annotation;version="1.3", \
> javax.annotation.processing;version="1.0", \
> #javax.activation;version="1.2.1", \
> javax.crypto, \
> . . .
>
> install -s
> mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.activation-api-1.2.1/1.2.1_3
>
> That worked for me.
>
> Hope that helps.
>
> -John
>
> On Thu, Feb 3, 2022, 11:21 AM Jean-Baptiste Onofré <jb@nanthrax.net
> <ma...@nanthrax.net>> wrote:
>
> With same Camel version ?
>
> Regards
> JB
>
> On 03/02/2022 17:15, Jörg Jansen wrote:
> > One more observation, the same setup with karaf-4.3.1 works fine.
> >
> > -----Original Message-----
> > From: Jörg Jansen <Joerg.Jansen@inform-software.com
> <ma...@inform-software.com>>
> > Sent: Donnerstag, 3. Februar 2022 16:56
> > To: user@karaf.apache.org <ma...@karaf.apache.org>
> > Subject: reading mail attachments
> >
> > [Sie erhalten nicht oft E-Mail von
> "joerg.jansen@inform-software.com
> <ma...@inform-software.com>". Weitere Informationen,
> warum dies wichtig ist, finden Sie unter
> "http://aka.ms/LearnAboutSenderIdentification
> <http://aka.ms/LearnAboutSenderIdentification>".]
> >
> > Hi all,
> >
> > I've recognized a strange behavior, where I need some help.
> >
> > Running my pure camel route, to read mail attachments, everything
> works as expected.
> > When running the same within my karaf distribution, the
> attachments could not be resolved.
> >
> > My route looks like this:
> > from("pop3://mypop3server?username=myuser
> &password=mypassword&unseen=true&delay=20000")
> > .routeId("mail-test-route")
> > .split().method(SplitAttachmentsExpression.class)
> > .log(LoggingLevel.INFO, "Received Attachment: ${body}")
> > .to("file:out")
> > .end()
> > ;
> >
> > Instead of my attachments, I now receive the plain text with the
> Base64 encoded attachments.
> >
> > I'm using camel 3.14.1 and karaf 4.3.6.
> >
> > To reproduce this scenario you just need the following steps:
> > - start karaf
> > - repo-add camel
> > - feature:install camel-blueprint camel-mail
> > - deploy the attache camel-route indo deploy folder
> >
> > Route to deploy:
> > <?xml version="1.0" encoding="UTF-8"?>
> > <blueprint
> xmlns="https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.osgi.org%2Fxmlns%2Fblueprint%2Fv1.0.0&data=04%7C01%7CJoerg.Jansen%40inform-software.com%7Cb99d8bb4e48f4b305e0d08d9e72dc48b%7C36c737afe6e84ba685f855440ef5fd6c%7C0%7C0%7C637795006675481216%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=OEdeLDYJAlvrmWlm%2BjH2XpBEL2nvtVN4aPyyvtTVdKU%3D&reserved=0
> <https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.osgi.org%2Fxmlns%2Fblueprint%2Fv1.0.0&data=04%7C01%7CJoerg.Jansen%40inform-software.com%7C5d88a68202954f3ad3a708d9e7489d2d%7C36c737afe6e84ba685f855440ef5fd6c%7C0%7C0%7C637795123103600218%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=1oR%2FHHUAaxGXrqPkMucILHlcjMIFotn%2BcVet8Saiej8%3D&reserved=0>"
> >
> xmlns:xsi="https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema-instance&data=04%7C01%7CJoerg.Jansen%40inform-software.com%7Cb99d8bb4e48f4b305e0d08d9e72dc48b%7C36c737afe6e84ba685f855440ef5fd6c%7C0%7C0%7C637795006675481216%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=iKcG6LdtRMhOHzUzNAe5AKOXuDSZoyrQBp9YG33FKHg%3D&reserved=0 <https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema-instance&data=04%7C01%7CJoerg.Jansen%40inform-software.com%7C5d88a68202954f3ad3a708d9e7489d2d%7C36c737afe6e84ba685f855440ef5fd6c%7C0%7C0%7C637795123103600218%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=NFtT5ywLrs%2FM%2FmozRRQ9jwOyxZJhpsq0HQ7EuBAh1Rc%3D&reserved=0>"
> >
> xsi:schemaLocation="https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.osgi.org%2Fxmlns%2Fblueprint%2Fv1.0.0&data=04%7C01%7CJoerg.Jansen%40inform-software.com%7Cb99d8bb4e48f4b305e0d08d9e72dc48b%7C36c737afe6e84ba685f855440ef5fd6c%7C0%7C0%7C637795006675481216%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=OEdeLDYJAlvrmWlm%2BjH2XpBEL2nvtVN4aPyyvtTVdKU%3D&reserved=0 <https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.osgi.org%2Fxmlns%2Fblueprint%2Fv1.0.0&data=04%7C01%7CJoerg.Jansen%40inform-software.com%7C5d88a68202954f3ad3a708d9e7489d2d%7C36c737afe6e84ba685f855440ef5fd6c%7C0%7C0%7C637795123103600218%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=1oR%2FHHUAaxGXrqPkMucILHlcjMIFotn%2BcVet8Saiej8%3D&reserved=0> https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.osgi.org%2Fxmlns%2Fblueprint%2Fv1.0.0%2Fblueprint.xsd&data=04%7C01%7CJoerg.Jansen%40inform-software.com%7Cb99d8bb4e48f4b305e0d08d9e72dc48b%7C36c737afe6e84ba685f855440ef5fd6c%7C0%7C0%7C637795006675481216%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=Eo%2B6Nd24M4cWlIYuJjuxIpugJzFKP3j5V6yWiKgzvxk%3D&reserved=0 <https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.osgi.org%2Fxmlns%2Fblueprint%2Fv1.0.0%2Fblueprint.xsd&data=04%7C01%7CJoerg.Jansen%40inform-software.com%7C5d88a68202954f3ad3a708d9e7489d2d%7C36c737afe6e84ba685f855440ef5fd6c%7C0%7C0%7C637795123103600218%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=AxFUEPDAlR%2BcVcMxvJUvVAwjMS0%2FWqWio6xROKjlkgg%3D&reserved=0>
> >
> https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcamel.apache.org%2Fschema%2Fblueprint&data=04%7C01%7CJoerg.Jansen%40inform-software.com%7Cb99d8bb4e48f4b305e0d08d9e72dc48b%7C36c737afe6e84ba685f855440ef5fd6c%7C0%7C0%7C637795006675481216%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=SgFYfVlGew2eyX8fmu0mPzkuDeixRJL%2Bv8tu%2BRiTpqM%3D&reserved=0
> <https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcamel.apache.org%2Fschema%2Fblueprint&data=04%7C01%7CJoerg.Jansen%40inform-software.com%7C5d88a68202954f3ad3a708d9e7489d2d%7C36c737afe6e84ba685f855440ef5fd6c%7C0%7C0%7C637795123103600218%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=UmsAvF%2FgReq6NVpD4HgEFCxRupY9KMf%2BrZwK5DGILAQ%3D&reserved=0>
> https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcamel.apache.org%2Fschema%2Fblueprint%2Fcamel-blueprint.xsd&data=04%7C01%7CJoerg.Jansen%40inform-software.com%7Cb99d8bb4e48f4b305e0d08d9e72dc48b%7C36c737afe6e84ba685f855440ef5fd6c%7C0%7C0%7C637795006675481216%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=qdlthfjqeZVnPGcnzzfS8tPC2UeTDbgsX%2F%2BsEY4cYfE%3D&reserved=0
> <https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcamel.apache.org%2Fschema%2Fblueprint%2Fcamel-blueprint.xsd&data=04%7C01%7CJoerg.Jansen%40inform-software.com%7C5d88a68202954f3ad3a708d9e7489d2d%7C36c737afe6e84ba685f855440ef5fd6c%7C0%7C0%7C637795123103600218%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=KDyOjq7UPm5S9e0PR7Qyk4JNdWZqT10tnyCLw0gfpF0%3D&reserved=0>">
> >
> > <camelContext id="mail-test"
> xmlns="https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcamel.apache.org%2Fschema%2Fblueprint&data=04%7C01%7CJoerg.Jansen%40inform-software.com%7Cb99d8bb4e48f4b305e0d08d9e72dc48b%7C36c737afe6e84ba685f855440ef5fd6c%7C0%7C0%7C637795006675481216%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=SgFYfVlGew2eyX8fmu0mPzkuDeixRJL%2Bv8tu%2BRiTpqM%3D&reserved=0
> <https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcamel.apache.org%2Fschema%2Fblueprint&data=04%7C01%7CJoerg.Jansen%40inform-software.com%7C5d88a68202954f3ad3a708d9e7489d2d%7C36c737afe6e84ba685f855440ef5fd6c%7C0%7C0%7C637795123103600218%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=UmsAvF%2FgReq6NVpD4HgEFCxRupY9KMf%2BrZwK5DGILAQ%3D&reserved=0>"
> trace="false" logMask="true" useBreadcrumb="true" streamCache="false">
> > <route id="mail-test-route">
> > <from uri="pop3:// mypop3server?username= myuser
> &password= mypassword &unseen=true&delay=20000"/>
> > <split>
> > <method
> beanType="org.apache.camel.component.mail.SplitAttachmentsExpression" />
> > <log message="Me Got ${body}" loggingLevel="INFO" />
> > <to uri="file:mail/out" />
> > </split>
> > </route>
> > </camelContext>
> > </blueprint>
> >
> > Any advice would be great,
> > Joerg
>
RE: reading mail attachments
Posted by Jörg Jansen <Jo...@inform-software.com>.
Hi John,
you made my day 😊.
Removing the javax.activation from jre properties solved the problem.
@Jean-Baptiste Onofre<ma...@nanthrax.net>: Nevertheless, there might be a bug within the camel-mail integration.
Should I create a Bug-Report for this behvior?
Kind regards,
Joerg
From: Jörg Jansen <Jo...@inform-software.com>
Sent: Donnerstag, 3. Februar 2022 20:09
To: user@karaf.apache.org; Jean-Baptiste Onofre <jb...@nanthrax.net>
Subject: RE: reading mail attachments
Hi John,
thanks for your suggestion.
I will give it a try and let you know.
@Jean-Baptiste Onofre<ma...@nanthrax.net>: yes, exactly the same setup, only karaf updates. 4.3.2 works 4.3.5, 4.3.6 don’t work.
Rgds,
Joerg
From: John Taylor <jt...@gmail.com>>
Sent: Donnerstag, 3. Februar 2022 19:13
To: user@karaf.apache.org<ma...@karaf.apache.org>
Subject: Re: reading mail attachments
Sie erhalten nicht oft E-Mail von "jtt77777@gmail.com<ma...@gmail.com>". Weitere Informationen, warum dies wichtig ist<http://aka.ms/LearnAboutSenderIdentification>
Hi Joerg,
I ran into the same problem.
With either 4.3.5 or 4.3.6 I believe javax.activation was included in the jre-9 export in jre.properties
That pulls in the com.sun.activation/jakarta.activation bundle I believe and that doesn't seem to work with the camel attachments processing.
What I did to resolve it is comment that out in jre.properties and pull in the servicemix activation package.
jre.properties
jre-9= \
${jre-base}, \
javax.accessibility, \
javax.activity, \
javax.annotation;version="1.3", \
javax.annotation.processing;version="1.0", \
#javax.activation;version="1.2.1", \
javax.crypto, \
. . .
install -s mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.activation-api-1.2.1/1.2.1_3
That worked for me.
Hope that helps.
-John
On Thu, Feb 3, 2022, 11:21 AM Jean-Baptiste Onofré <jb...@nanthrax.net>> wrote:
With same Camel version ?
Regards
JB
On 03/02/2022 17:15, Jörg Jansen wrote:
> One more observation, the same setup with karaf-4.3.1 works fine.
>
> -----Original Message-----
> From: Jörg Jansen <Jo...@inform-software.com>>
> Sent: Donnerstag, 3. Februar 2022 16:56
> To: user@karaf.apache.org<ma...@karaf.apache.org>
> Subject: reading mail attachments
>
> [Sie erhalten nicht oft E-Mail von "joerg.jansen@inform-software.com<ma...@inform-software.com>". Weitere Informationen, warum dies wichtig ist, finden Sie unter "http://aka.ms/LearnAboutSenderIdentification".]
>
> Hi all,
>
> I've recognized a strange behavior, where I need some help.
>
> Running my pure camel route, to read mail attachments, everything works as expected.
> When running the same within my karaf distribution, the attachments could not be resolved.
>
> My route looks like this:
> from("pop3://mypop3server?username=myuser &password=mypassword&unseen=true&delay=20000")
> .routeId("mail-test-route")
> .split().method(SplitAttachmentsExpression.class)
> .log(LoggingLevel.INFO, "Received Attachment: ${body}")
> .to("file:out")
> .end()
> ;
>
> Instead of my attachments, I now receive the plain text with the Base64 encoded attachments.
>
> I'm using camel 3.14.1 and karaf 4.3.6.
>
> To reproduce this scenario you just need the following steps:
> - start karaf
> - repo-add camel
> - feature:install camel-blueprint camel-mail
> - deploy the attache camel-route indo deploy folder
>
> Route to deploy:
> <?xml version="1.0" encoding="UTF-8"?>
> <blueprint xmlns="https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.osgi.org%2Fxmlns%2Fblueprint%2Fv1.0.0&data=04%7C01%7CJoerg.Jansen%40inform-software.com%7Cb99d8bb4e48f4b305e0d08d9e72dc48b%7C36c737afe6e84ba685f855440ef5fd6c%7C0%7C0%7C637795006675481216%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=OEdeLDYJAlvrmWlm%2BjH2XpBEL2nvtVN4aPyyvtTVdKU%3D&reserved=0<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.osgi.org%2Fxmlns%2Fblueprint%2Fv1.0.0&data=04%7C01%7CJoerg.Jansen%40inform-software.com%7C5d88a68202954f3ad3a708d9e7489d2d%7C36c737afe6e84ba685f855440ef5fd6c%7C0%7C0%7C637795123103600218%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=1oR%2FHHUAaxGXrqPkMucILHlcjMIFotn%2BcVet8Saiej8%3D&reserved=0>"
> xmlns:xsi="https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema-instance&data=04%7C01%7CJoerg.Jansen%40inform-software.com%7Cb99d8bb4e48f4b305e0d08d9e72dc48b%7C36c737afe6e84ba685f855440ef5fd6c%7C0%7C0%7C637795006675481216%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=iKcG6LdtRMhOHzUzNAe5AKOXuDSZoyrQBp9YG33FKHg%3D&reserved=0<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema-instance&data=04%7C01%7CJoerg.Jansen%40inform-software.com%7C5d88a68202954f3ad3a708d9e7489d2d%7C36c737afe6e84ba685f855440ef5fd6c%7C0%7C0%7C637795123103600218%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=NFtT5ywLrs%2FM%2FmozRRQ9jwOyxZJhpsq0HQ7EuBAh1Rc%3D&reserved=0>"
> xsi:schemaLocation="https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.osgi.org%2Fxmlns%2Fblueprint%2Fv1.0.0&data=04%7C01%7CJoerg.Jansen%40inform-software.com%7Cb99d8bb4e48f4b305e0d08d9e72dc48b%7C36c737afe6e84ba685f855440ef5fd6c%7C0%7C0%7C637795006675481216%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=OEdeLDYJAlvrmWlm%2BjH2XpBEL2nvtVN4aPyyvtTVdKU%3D&reserved=0<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.osgi.org%2Fxmlns%2Fblueprint%2Fv1.0.0&data=04%7C01%7CJoerg.Jansen%40inform-software.com%7C5d88a68202954f3ad3a708d9e7489d2d%7C36c737afe6e84ba685f855440ef5fd6c%7C0%7C0%7C637795123103600218%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=1oR%2FHHUAaxGXrqPkMucILHlcjMIFotn%2BcVet8Saiej8%3D&reserved=0> https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.osgi.org%2Fxmlns%2Fblueprint%2Fv1.0.0%2Fblueprint.xsd&data=04%7C01%7CJoerg.Jansen%40inform-software.com%7Cb99d8bb4e48f4b305e0d08d9e72dc48b%7C36c737afe6e84ba685f855440ef5fd6c%7C0%7C0%7C637795006675481216%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=Eo%2B6Nd24M4cWlIYuJjuxIpugJzFKP3j5V6yWiKgzvxk%3D&reserved=0<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.osgi.org%2Fxmlns%2Fblueprint%2Fv1.0.0%2Fblueprint.xsd&data=04%7C01%7CJoerg.Jansen%40inform-software.com%7C5d88a68202954f3ad3a708d9e7489d2d%7C36c737afe6e84ba685f855440ef5fd6c%7C0%7C0%7C637795123103600218%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=AxFUEPDAlR%2BcVcMxvJUvVAwjMS0%2FWqWio6xROKjlkgg%3D&reserved=0>
> https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcamel.apache.org%2Fschema%2Fblueprint&data=04%7C01%7CJoerg.Jansen%40inform-software.com%7Cb99d8bb4e48f4b305e0d08d9e72dc48b%7C36c737afe6e84ba685f855440ef5fd6c%7C0%7C0%7C637795006675481216%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=SgFYfVlGew2eyX8fmu0mPzkuDeixRJL%2Bv8tu%2BRiTpqM%3D&reserved=0<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcamel.apache.org%2Fschema%2Fblueprint&data=04%7C01%7CJoerg.Jansen%40inform-software.com%7C5d88a68202954f3ad3a708d9e7489d2d%7C36c737afe6e84ba685f855440ef5fd6c%7C0%7C0%7C637795123103600218%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=UmsAvF%2FgReq6NVpD4HgEFCxRupY9KMf%2BrZwK5DGILAQ%3D&reserved=0> https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcamel.apache.org%2Fschema%2Fblueprint%2Fcamel-blueprint.xsd&data=04%7C01%7CJoerg.Jansen%40inform-software.com%7Cb99d8bb4e48f4b305e0d08d9e72dc48b%7C36c737afe6e84ba685f855440ef5fd6c%7C0%7C0%7C637795006675481216%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=qdlthfjqeZVnPGcnzzfS8tPC2UeTDbgsX%2F%2BsEY4cYfE%3D&reserved=0<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcamel.apache.org%2Fschema%2Fblueprint%2Fcamel-blueprint.xsd&data=04%7C01%7CJoerg.Jansen%40inform-software.com%7C5d88a68202954f3ad3a708d9e7489d2d%7C36c737afe6e84ba685f855440ef5fd6c%7C0%7C0%7C637795123103600218%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=KDyOjq7UPm5S9e0PR7Qyk4JNdWZqT10tnyCLw0gfpF0%3D&reserved=0>">
>
> <camelContext id="mail-test" xmlns="https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcamel.apache.org%2Fschema%2Fblueprint&data=04%7C01%7CJoerg.Jansen%40inform-software.com%7Cb99d8bb4e48f4b305e0d08d9e72dc48b%7C36c737afe6e84ba685f855440ef5fd6c%7C0%7C0%7C637795006675481216%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=SgFYfVlGew2eyX8fmu0mPzkuDeixRJL%2Bv8tu%2BRiTpqM%3D&reserved=0<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcamel.apache.org%2Fschema%2Fblueprint&data=04%7C01%7CJoerg.Jansen%40inform-software.com%7C5d88a68202954f3ad3a708d9e7489d2d%7C36c737afe6e84ba685f855440ef5fd6c%7C0%7C0%7C637795123103600218%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=UmsAvF%2FgReq6NVpD4HgEFCxRupY9KMf%2BrZwK5DGILAQ%3D&reserved=0>" trace="false" logMask="true" useBreadcrumb="true" streamCache="false">
> <route id="mail-test-route">
> <from uri="pop3:// mypop3server?username= myuser &password= mypassword &unseen=true&delay=20000"/>
> <split>
> <method beanType="org.apache.camel.component.mail.SplitAttachmentsExpression" />
> <log message="Me Got ${body}" loggingLevel="INFO" />
> <to uri="file:mail/out" />
> </split>
> </route>
> </camelContext>
> </blueprint>
>
> Any advice would be great,
> Joerg
RE: reading mail attachments
Posted by Jörg Jansen <Jo...@inform-software.com>.
Hi John,
thanks for your suggestion.
I will give it a try and let you know.
@Jean-Baptiste Onofre<ma...@nanthrax.net>: yes, exactly the same setup, only karaf updates. 4.3.2 works 4.3.5, 4.3.6 don't work.
Rgds,
Joerg
From: John Taylor <jt...@gmail.com>
Sent: Donnerstag, 3. Februar 2022 19:13
To: user@karaf.apache.org
Subject: Re: reading mail attachments
Sie erhalten nicht oft E-Mail von "jtt77777@gmail.com<ma...@gmail.com>". Weitere Informationen, warum dies wichtig ist<http://aka.ms/LearnAboutSenderIdentification>
Hi Joerg,
I ran into the same problem.
With either 4.3.5 or 4.3.6 I believe javax.activation was included in the jre-9 export in jre.properties
That pulls in the com.sun.activation/jakarta.activation bundle I believe and that doesn't seem to work with the camel attachments processing.
What I did to resolve it is comment that out in jre.properties and pull in the servicemix activation package.
jre.properties
jre-9= \
${jre-base}, \
javax.accessibility, \
javax.activity, \
javax.annotation;version="1.3", \
javax.annotation.processing;version="1.0", \
#javax.activation;version="1.2.1", \
javax.crypto, \
. . .
install -s mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.activation-api-1.2.1/1.2.1_3
That worked for me.
Hope that helps.
-John
On Thu, Feb 3, 2022, 11:21 AM Jean-Baptiste Onofré <jb...@nanthrax.net>> wrote:
With same Camel version ?
Regards
JB
On 03/02/2022 17:15, Jörg Jansen wrote:
> One more observation, the same setup with karaf-4.3.1 works fine.
>
> -----Original Message-----
> From: Jörg Jansen <Jo...@inform-software.com>>
> Sent: Donnerstag, 3. Februar 2022 16:56
> To: user@karaf.apache.org<ma...@karaf.apache.org>
> Subject: reading mail attachments
>
> [Sie erhalten nicht oft E-Mail von "joerg.jansen@inform-software.com<ma...@inform-software.com>". Weitere Informationen, warum dies wichtig ist, finden Sie unter "http://aka.ms/LearnAboutSenderIdentification".]
>
> Hi all,
>
> I've recognized a strange behavior, where I need some help.
>
> Running my pure camel route, to read mail attachments, everything works as expected.
> When running the same within my karaf distribution, the attachments could not be resolved.
>
> My route looks like this:
> from("pop3://mypop3server?username=myuser &password=mypassword&unseen=true&delay=20000")
> .routeId("mail-test-route")
> .split().method(SplitAttachmentsExpression.class)
> .log(LoggingLevel.INFO, "Received Attachment: ${body}")
> .to("file:out")
> .end()
> ;
>
> Instead of my attachments, I now receive the plain text with the Base64 encoded attachments.
>
> I'm using camel 3.14.1 and karaf 4.3.6.
>
> To reproduce this scenario you just need the following steps:
> - start karaf
> - repo-add camel
> - feature:install camel-blueprint camel-mail
> - deploy the attache camel-route indo deploy folder
>
> Route to deploy:
> <?xml version="1.0" encoding="UTF-8"?>
> <blueprint xmlns="https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.osgi.org%2Fxmlns%2Fblueprint%2Fv1.0.0&data=04%7C01%7CJoerg.Jansen%40inform-software.com%7Cb99d8bb4e48f4b305e0d08d9e72dc48b%7C36c737afe6e84ba685f855440ef5fd6c%7C0%7C0%7C637795006675481216%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=OEdeLDYJAlvrmWlm%2BjH2XpBEL2nvtVN4aPyyvtTVdKU%3D&reserved=0<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.osgi.org%2Fxmlns%2Fblueprint%2Fv1.0.0&data=04%7C01%7CJoerg.Jansen%40inform-software.com%7C7f514ed7a1c4439da91008d9e740cfeb%7C36c737afe6e84ba685f855440ef5fd6c%7C0%7C0%7C637795089613003463%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=ZhVkmwGCbltWBjyqr2FPilgb4t9viBSb%2B0e7xojpggk%3D&reserved=0>"
> xmlns:xsi="https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema-instance&data=04%7C01%7CJoerg.Jansen%40inform-software.com%7Cb99d8bb4e48f4b305e0d08d9e72dc48b%7C36c737afe6e84ba685f855440ef5fd6c%7C0%7C0%7C637795006675481216%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=iKcG6LdtRMhOHzUzNAe5AKOXuDSZoyrQBp9YG33FKHg%3D&reserved=0<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema-instance&data=04%7C01%7CJoerg.Jansen%40inform-software.com%7C7f514ed7a1c4439da91008d9e740cfeb%7C36c737afe6e84ba685f855440ef5fd6c%7C0%7C0%7C637795089613159710%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=fHD9oQtEs5Aro0laE54WQTscFVcT6ghflNGQHqgnfAw%3D&reserved=0>"
> xsi:schemaLocation="https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.osgi.org%2Fxmlns%2Fblueprint%2Fv1.0.0&data=04%7C01%7CJoerg.Jansen%40inform-software.com%7Cb99d8bb4e48f4b305e0d08d9e72dc48b%7C36c737afe6e84ba685f855440ef5fd6c%7C0%7C0%7C637795006675481216%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=OEdeLDYJAlvrmWlm%2BjH2XpBEL2nvtVN4aPyyvtTVdKU%3D&reserved=0<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.osgi.org%2Fxmlns%2Fblueprint%2Fv1.0.0&data=04%7C01%7CJoerg.Jansen%40inform-software.com%7C7f514ed7a1c4439da91008d9e740cfeb%7C36c737afe6e84ba685f855440ef5fd6c%7C0%7C0%7C637795089613159710%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=rl3JT1GFaiGKNIBWj7lBrhw%2FBayfjLqk2kCf%2FS6dwuw%3D&reserved=0> https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.osgi.org%2Fxmlns%2Fblueprint%2Fv1.0.0%2Fblueprint.xsd&data=04%7C01%7CJoerg.Jansen%40inform-software.com%7Cb99d8bb4e48f4b305e0d08d9e72dc48b%7C36c737afe6e84ba685f855440ef5fd6c%7C0%7C0%7C637795006675481216%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=Eo%2B6Nd24M4cWlIYuJjuxIpugJzFKP3j5V6yWiKgzvxk%3D&reserved=0<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.osgi.org%2Fxmlns%2Fblueprint%2Fv1.0.0%2Fblueprint.xsd&data=04%7C01%7CJoerg.Jansen%40inform-software.com%7C7f514ed7a1c4439da91008d9e740cfeb%7C36c737afe6e84ba685f855440ef5fd6c%7C0%7C0%7C637795089613159710%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=UDlHd6YYAxxEUkFUTMtikQCi5op13D%2BO9w8h%2FrV963M%3D&reserved=0>
> https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcamel.apache.org%2Fschema%2Fblueprint&data=04%7C01%7CJoerg.Jansen%40inform-software.com%7Cb99d8bb4e48f4b305e0d08d9e72dc48b%7C36c737afe6e84ba685f855440ef5fd6c%7C0%7C0%7C637795006675481216%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=SgFYfVlGew2eyX8fmu0mPzkuDeixRJL%2Bv8tu%2BRiTpqM%3D&reserved=0<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcamel.apache.org%2Fschema%2Fblueprint&data=04%7C01%7CJoerg.Jansen%40inform-software.com%7C7f514ed7a1c4439da91008d9e740cfeb%7C36c737afe6e84ba685f855440ef5fd6c%7C0%7C0%7C637795089613159710%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=dk%2BougTjKEJ6OMKktaDM1gUbH036NpJR7XlMmpI%2Bp5E%3D&reserved=0> https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcamel.apache.org%2Fschema%2Fblueprint%2Fcamel-blueprint.xsd&data=04%7C01%7CJoerg.Jansen%40inform-software.com%7Cb99d8bb4e48f4b305e0d08d9e72dc48b%7C36c737afe6e84ba685f855440ef5fd6c%7C0%7C0%7C637795006675481216%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=qdlthfjqeZVnPGcnzzfS8tPC2UeTDbgsX%2F%2BsEY4cYfE%3D&reserved=0<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcamel.apache.org%2Fschema%2Fblueprint%2Fcamel-blueprint.xsd&data=04%7C01%7CJoerg.Jansen%40inform-software.com%7C7f514ed7a1c4439da91008d9e740cfeb%7C36c737afe6e84ba685f855440ef5fd6c%7C0%7C0%7C637795089613159710%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=34zXDd4Wv3UlXggpxNVKSedGpb1Ym3fu4IDHj5GcTy8%3D&reserved=0>">
>
> <camelContext id="mail-test" xmlns="https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcamel.apache.org%2Fschema%2Fblueprint&data=04%7C01%7CJoerg.Jansen%40inform-software.com%7Cb99d8bb4e48f4b305e0d08d9e72dc48b%7C36c737afe6e84ba685f855440ef5fd6c%7C0%7C0%7C637795006675481216%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=SgFYfVlGew2eyX8fmu0mPzkuDeixRJL%2Bv8tu%2BRiTpqM%3D&reserved=0<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcamel.apache.org%2Fschema%2Fblueprint&data=04%7C01%7CJoerg.Jansen%40inform-software.com%7C7f514ed7a1c4439da91008d9e740cfeb%7C36c737afe6e84ba685f855440ef5fd6c%7C0%7C0%7C637795089613159710%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=dk%2BougTjKEJ6OMKktaDM1gUbH036NpJR7XlMmpI%2Bp5E%3D&reserved=0>" trace="false" logMask="true" useBreadcrumb="true" streamCache="false">
> <route id="mail-test-route">
> <from uri="pop3:// mypop3server?username= myuser &password= mypassword &unseen=true&delay=20000"/>
> <split>
> <method beanType="org.apache.camel.component.mail.SplitAttachmentsExpression" />
> <log message="Me Got ${body}" loggingLevel="INFO" />
> <to uri="file:mail/out" />
> </split>
> </route>
> </camelContext>
> </blueprint>
>
> Any advice would be great,
> Joerg
Re: reading mail attachments
Posted by John Taylor <jt...@gmail.com>.
Hi Joerg,
I ran into the same problem.
With either 4.3.5 or 4.3.6 I believe javax.activation was included in the
jre-9 export in jre.properties
That pulls in the com.sun.activation/jakarta.activation bundle I believe
and that doesn't seem to work with the camel attachments processing.
What I did to resolve it is comment that out in jre.properties and pull in
the servicemix activation package.
jre.properties
jre-9= \
${jre-base}, \
javax.accessibility, \
javax.activity, \
javax.annotation;version="1.3", \
javax.annotation.processing;version="1.0", \
#javax.activation;version="1.2.1", \
javax.crypto, \
. . .
install -s
mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.activation-api-1.2.1/1.2.1_3
That worked for me.
Hope that helps.
-John
On Thu, Feb 3, 2022, 11:21 AM Jean-Baptiste Onofré <jb...@nanthrax.net> wrote:
> With same Camel version ?
>
> Regards
> JB
>
> On 03/02/2022 17:15, Jörg Jansen wrote:
> > One more observation, the same setup with karaf-4.3.1 works fine.
> >
> > -----Original Message-----
> > From: Jörg Jansen <Jo...@inform-software.com>
> > Sent: Donnerstag, 3. Februar 2022 16:56
> > To: user@karaf.apache.org
> > Subject: reading mail attachments
> >
> > [Sie erhalten nicht oft E-Mail von "joerg.jansen@inform-software.com".
> Weitere Informationen, warum dies wichtig ist, finden Sie unter "
> http://aka.ms/LearnAboutSenderIdentification".]
> >
> > Hi all,
> >
> > I've recognized a strange behavior, where I need some help.
> >
> > Running my pure camel route, to read mail attachments, everything works
> as expected.
> > When running the same within my karaf distribution, the attachments
> could not be resolved.
> >
> > My route looks like this:
> > from("pop3://mypop3server?username=myuser
> &password=mypassword&unseen=true&delay=20000")
> > .routeId("mail-test-route")
> > .split().method(SplitAttachmentsExpression.class)
> > .log(LoggingLevel.INFO, "Received Attachment: ${body}")
> > .to("file:out")
> > .end()
> > ;
> >
> > Instead of my attachments, I now receive the plain text with the Base64
> encoded attachments.
> >
> > I'm using camel 3.14.1 and karaf 4.3.6.
> >
> > To reproduce this scenario you just need the following steps:
> > - start karaf
> > - repo-add camel
> > - feature:install camel-blueprint camel-mail
> > - deploy the attache camel-route indo deploy folder
> >
> > Route to deploy:
> > <?xml version="1.0" encoding="UTF-8"?>
> > <blueprint xmlns="
> https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.osgi.org%2Fxmlns%2Fblueprint%2Fv1.0.0&data=04%7C01%7CJoerg.Jansen%40inform-software.com%7Cb99d8bb4e48f4b305e0d08d9e72dc48b%7C36c737afe6e84ba685f855440ef5fd6c%7C0%7C0%7C637795006675481216%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=OEdeLDYJAlvrmWlm%2BjH2XpBEL2nvtVN4aPyyvtTVdKU%3D&reserved=0
> "
> > xmlns:xsi="
> https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema-instance&data=04%7C01%7CJoerg.Jansen%40inform-software.com%7Cb99d8bb4e48f4b305e0d08d9e72dc48b%7C36c737afe6e84ba685f855440ef5fd6c%7C0%7C0%7C637795006675481216%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=iKcG6LdtRMhOHzUzNAe5AKOXuDSZoyrQBp9YG33FKHg%3D&reserved=0
> "
> > xsi:schemaLocation="
> https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.osgi.org%2Fxmlns%2Fblueprint%2Fv1.0.0&data=04%7C01%7CJoerg.Jansen%40inform-software.com%7Cb99d8bb4e48f4b305e0d08d9e72dc48b%7C36c737afe6e84ba685f855440ef5fd6c%7C0%7C0%7C637795006675481216%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=OEdeLDYJAlvrmWlm%2BjH2XpBEL2nvtVN4aPyyvtTVdKU%3D&reserved=0
> https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.osgi.org%2Fxmlns%2Fblueprint%2Fv1.0.0%2Fblueprint.xsd&data=04%7C01%7CJoerg.Jansen%40inform-software.com%7Cb99d8bb4e48f4b305e0d08d9e72dc48b%7C36c737afe6e84ba685f855440ef5fd6c%7C0%7C0%7C637795006675481216%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=Eo%2B6Nd24M4cWlIYuJjuxIpugJzFKP3j5V6yWiKgzvxk%3D&reserved=0
> >
> https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcamel.apache.org%2Fschema%2Fblueprint&data=04%7C01%7CJoerg.Jansen%40inform-software.com%7Cb99d8bb4e48f4b305e0d08d9e72dc48b%7C36c737afe6e84ba685f855440ef5fd6c%7C0%7C0%7C637795006675481216%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=SgFYfVlGew2eyX8fmu0mPzkuDeixRJL%2Bv8tu%2BRiTpqM%3D&reserved=0
> https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcamel.apache.org%2Fschema%2Fblueprint%2Fcamel-blueprint.xsd&data=04%7C01%7CJoerg.Jansen%40inform-software.com%7Cb99d8bb4e48f4b305e0d08d9e72dc48b%7C36c737afe6e84ba685f855440ef5fd6c%7C0%7C0%7C637795006675481216%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=qdlthfjqeZVnPGcnzzfS8tPC2UeTDbgsX%2F%2BsEY4cYfE%3D&reserved=0
> ">
> >
> > <camelContext id="mail-test" xmlns="
> https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcamel.apache.org%2Fschema%2Fblueprint&data=04%7C01%7CJoerg.Jansen%40inform-software.com%7Cb99d8bb4e48f4b305e0d08d9e72dc48b%7C36c737afe6e84ba685f855440ef5fd6c%7C0%7C0%7C637795006675481216%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=SgFYfVlGew2eyX8fmu0mPzkuDeixRJL%2Bv8tu%2BRiTpqM%3D&reserved=0"
> trace="false" logMask="true" useBreadcrumb="true" streamCache="false">
> > <route id="mail-test-route">
> > <from uri="pop3:// mypop3server?username= myuser
> &password= mypassword &unseen=true&delay=20000"/>
> > <split>
> > <method
> beanType="org.apache.camel.component.mail.SplitAttachmentsExpression" />
> > <log message="Me Got ${body}" loggingLevel="INFO" />
> > <to uri="file:mail/out" />
> > </split>
> > </route>
> > </camelContext>
> > </blueprint>
> >
> > Any advice would be great,
> > Joerg
>
Re: reading mail attachments
Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
With same Camel version ?
Regards
JB
On 03/02/2022 17:15, Jörg Jansen wrote:
> One more observation, the same setup with karaf-4.3.1 works fine.
>
> -----Original Message-----
> From: Jörg Jansen <Jo...@inform-software.com>
> Sent: Donnerstag, 3. Februar 2022 16:56
> To: user@karaf.apache.org
> Subject: reading mail attachments
>
> [Sie erhalten nicht oft E-Mail von "joerg.jansen@inform-software.com". Weitere Informationen, warum dies wichtig ist, finden Sie unter "http://aka.ms/LearnAboutSenderIdentification".]
>
> Hi all,
>
> I've recognized a strange behavior, where I need some help.
>
> Running my pure camel route, to read mail attachments, everything works as expected.
> When running the same within my karaf distribution, the attachments could not be resolved.
>
> My route looks like this:
> from("pop3://mypop3server?username=myuser &password=mypassword&unseen=true&delay=20000")
> .routeId("mail-test-route")
> .split().method(SplitAttachmentsExpression.class)
> .log(LoggingLevel.INFO, "Received Attachment: ${body}")
> .to("file:out")
> .end()
> ;
>
> Instead of my attachments, I now receive the plain text with the Base64 encoded attachments.
>
> I'm using camel 3.14.1 and karaf 4.3.6.
>
> To reproduce this scenario you just need the following steps:
> - start karaf
> - repo-add camel
> - feature:install camel-blueprint camel-mail
> - deploy the attache camel-route indo deploy folder
>
> Route to deploy:
> <?xml version="1.0" encoding="UTF-8"?>
> <blueprint xmlns="https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.osgi.org%2Fxmlns%2Fblueprint%2Fv1.0.0&data=04%7C01%7CJoerg.Jansen%40inform-software.com%7Cb99d8bb4e48f4b305e0d08d9e72dc48b%7C36c737afe6e84ba685f855440ef5fd6c%7C0%7C0%7C637795006675481216%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=OEdeLDYJAlvrmWlm%2BjH2XpBEL2nvtVN4aPyyvtTVdKU%3D&reserved=0"
> xmlns:xsi="https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema-instance&data=04%7C01%7CJoerg.Jansen%40inform-software.com%7Cb99d8bb4e48f4b305e0d08d9e72dc48b%7C36c737afe6e84ba685f855440ef5fd6c%7C0%7C0%7C637795006675481216%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=iKcG6LdtRMhOHzUzNAe5AKOXuDSZoyrQBp9YG33FKHg%3D&reserved=0"
> xsi:schemaLocation="https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.osgi.org%2Fxmlns%2Fblueprint%2Fv1.0.0&data=04%7C01%7CJoerg.Jansen%40inform-software.com%7Cb99d8bb4e48f4b305e0d08d9e72dc48b%7C36c737afe6e84ba685f855440ef5fd6c%7C0%7C0%7C637795006675481216%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=OEdeLDYJAlvrmWlm%2BjH2XpBEL2nvtVN4aPyyvtTVdKU%3D&reserved=0 https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.osgi.org%2Fxmlns%2Fblueprint%2Fv1.0.0%2Fblueprint.xsd&data=04%7C01%7CJoerg.Jansen%40inform-software.com%7Cb99d8bb4e48f4b305e0d08d9e72dc48b%7C36c737afe6e84ba685f855440ef5fd6c%7C0%7C0%7C637795006675481216%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=Eo%2B6Nd24M4cWlIYuJjuxIpugJzFKP3j5V6yWiKgzvxk%3D&reserved=0
> https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcamel.apache.org%2Fschema%2Fblueprint&data=04%7C01%7CJoerg.Jansen%40inform-software.com%7Cb99d8bb4e48f4b305e0d08d9e72dc48b%7C36c737afe6e84ba685f855440ef5fd6c%7C0%7C0%7C637795006675481216%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=SgFYfVlGew2eyX8fmu0mPzkuDeixRJL%2Bv8tu%2BRiTpqM%3D&reserved=0 https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcamel.apache.org%2Fschema%2Fblueprint%2Fcamel-blueprint.xsd&data=04%7C01%7CJoerg.Jansen%40inform-software.com%7Cb99d8bb4e48f4b305e0d08d9e72dc48b%7C36c737afe6e84ba685f855440ef5fd6c%7C0%7C0%7C637795006675481216%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=qdlthfjqeZVnPGcnzzfS8tPC2UeTDbgsX%2F%2BsEY4cYfE%3D&reserved=0">
>
> <camelContext id="mail-test" xmlns="https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcamel.apache.org%2Fschema%2Fblueprint&data=04%7C01%7CJoerg.Jansen%40inform-software.com%7Cb99d8bb4e48f4b305e0d08d9e72dc48b%7C36c737afe6e84ba685f855440ef5fd6c%7C0%7C0%7C637795006675481216%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=SgFYfVlGew2eyX8fmu0mPzkuDeixRJL%2Bv8tu%2BRiTpqM%3D&reserved=0" trace="false" logMask="true" useBreadcrumb="true" streamCache="false">
> <route id="mail-test-route">
> <from uri="pop3:// mypop3server?username= myuser &password= mypassword &unseen=true&delay=20000"/>
> <split>
> <method beanType="org.apache.camel.component.mail.SplitAttachmentsExpression" />
> <log message="Me Got ${body}" loggingLevel="INFO" />
> <to uri="file:mail/out" />
> </split>
> </route>
> </camelContext>
> </blueprint>
>
> Any advice would be great,
> Joerg
RE: reading mail attachments
Posted by Jörg Jansen <Jo...@inform-software.com>.
One more observation, the same setup with karaf-4.3.1 works fine.
-----Original Message-----
From: Jörg Jansen <Jo...@inform-software.com>
Sent: Donnerstag, 3. Februar 2022 16:56
To: user@karaf.apache.org
Subject: reading mail attachments
[Sie erhalten nicht oft E-Mail von "joerg.jansen@inform-software.com". Weitere Informationen, warum dies wichtig ist, finden Sie unter "http://aka.ms/LearnAboutSenderIdentification".]
Hi all,
I've recognized a strange behavior, where I need some help.
Running my pure camel route, to read mail attachments, everything works as expected.
When running the same within my karaf distribution, the attachments could not be resolved.
My route looks like this:
from("pop3://mypop3server?username=myuser &password=mypassword&unseen=true&delay=20000")
.routeId("mail-test-route")
.split().method(SplitAttachmentsExpression.class)
.log(LoggingLevel.INFO, "Received Attachment: ${body}")
.to("file:out")
.end()
;
Instead of my attachments, I now receive the plain text with the Base64 encoded attachments.
I'm using camel 3.14.1 and karaf 4.3.6.
To reproduce this scenario you just need the following steps:
- start karaf
- repo-add camel
- feature:install camel-blueprint camel-mail
- deploy the attache camel-route indo deploy folder
Route to deploy:
<?xml version="1.0" encoding="UTF-8"?>
<blueprint xmlns="https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.osgi.org%2Fxmlns%2Fblueprint%2Fv1.0.0&data=04%7C01%7CJoerg.Jansen%40inform-software.com%7Cb99d8bb4e48f4b305e0d08d9e72dc48b%7C36c737afe6e84ba685f855440ef5fd6c%7C0%7C0%7C637795006675481216%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=OEdeLDYJAlvrmWlm%2BjH2XpBEL2nvtVN4aPyyvtTVdKU%3D&reserved=0"
xmlns:xsi="https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema-instance&data=04%7C01%7CJoerg.Jansen%40inform-software.com%7Cb99d8bb4e48f4b305e0d08d9e72dc48b%7C36c737afe6e84ba685f855440ef5fd6c%7C0%7C0%7C637795006675481216%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=iKcG6LdtRMhOHzUzNAe5AKOXuDSZoyrQBp9YG33FKHg%3D&reserved=0"
xsi:schemaLocation="https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.osgi.org%2Fxmlns%2Fblueprint%2Fv1.0.0&data=04%7C01%7CJoerg.Jansen%40inform-software.com%7Cb99d8bb4e48f4b305e0d08d9e72dc48b%7C36c737afe6e84ba685f855440ef5fd6c%7C0%7C0%7C637795006675481216%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=OEdeLDYJAlvrmWlm%2BjH2XpBEL2nvtVN4aPyyvtTVdKU%3D&reserved=0 https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.osgi.org%2Fxmlns%2Fblueprint%2Fv1.0.0%2Fblueprint.xsd&data=04%7C01%7CJoerg.Jansen%40inform-software.com%7Cb99d8bb4e48f4b305e0d08d9e72dc48b%7C36c737afe6e84ba685f855440ef5fd6c%7C0%7C0%7C637795006675481216%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=Eo%2B6Nd24M4cWlIYuJjuxIpugJzFKP3j5V6yWiKgzvxk%3D&reserved=0
https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcamel.apache.org%2Fschema%2Fblueprint&data=04%7C01%7CJoerg.Jansen%40inform-software.com%7Cb99d8bb4e48f4b305e0d08d9e72dc48b%7C36c737afe6e84ba685f855440ef5fd6c%7C0%7C0%7C637795006675481216%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=SgFYfVlGew2eyX8fmu0mPzkuDeixRJL%2Bv8tu%2BRiTpqM%3D&reserved=0 https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcamel.apache.org%2Fschema%2Fblueprint%2Fcamel-blueprint.xsd&data=04%7C01%7CJoerg.Jansen%40inform-software.com%7Cb99d8bb4e48f4b305e0d08d9e72dc48b%7C36c737afe6e84ba685f855440ef5fd6c%7C0%7C0%7C637795006675481216%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=qdlthfjqeZVnPGcnzzfS8tPC2UeTDbgsX%2F%2BsEY4cYfE%3D&reserved=0">
<camelContext id="mail-test" xmlns="https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcamel.apache.org%2Fschema%2Fblueprint&data=04%7C01%7CJoerg.Jansen%40inform-software.com%7Cb99d8bb4e48f4b305e0d08d9e72dc48b%7C36c737afe6e84ba685f855440ef5fd6c%7C0%7C0%7C637795006675481216%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=SgFYfVlGew2eyX8fmu0mPzkuDeixRJL%2Bv8tu%2BRiTpqM%3D&reserved=0" trace="false" logMask="true" useBreadcrumb="true" streamCache="false">
<route id="mail-test-route">
<from uri="pop3:// mypop3server?username= myuser &password= mypassword &unseen=true&delay=20000"/>
<split>
<method beanType="org.apache.camel.component.mail.SplitAttachmentsExpression" />
<log message="Me Got ${body}" loggingLevel="INFO" />
<to uri="file:mail/out" />
</split>
</route>
</camelContext>
</blueprint>
Any advice would be great,
Joerg
Re: reading mail attachments
Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Joerg
Is it related to Camel or Karaf update ?
I remember that Camel changed way to deal with classloader in some
components (we fixed a couple, but maybe mail component is impacted).
Regards
JB
On 03/02/2022 16:55, Jörg Jansen wrote:
> Hi all,
>
> I've recognized a strange behavior, where I need some help.
>
> Running my pure camel route, to read mail attachments, everything works as expected.
> When running the same within my karaf distribution, the attachments could not be resolved.
>
> My route looks like this:
> from("pop3://mypop3server?username=myuser &password=mypassword&unseen=true&delay=20000")
> .routeId("mail-test-route")
> .split().method(SplitAttachmentsExpression.class)
> .log(LoggingLevel.INFO, "Received Attachment: ${body}")
> .to("file:out")
> .end()
> ;
>
> Instead of my attachments, I now receive the plain text with the Base64 encoded attachments.
>
> I'm using camel 3.14.1 and karaf 4.3.6.
>
> To reproduce this scenario you just need the following steps:
> - start karaf
> - repo-add camel
> - feature:install camel-blueprint camel-mail
> - deploy the attache camel-route indo deploy folder
>
> Route to deploy:
> <?xml version="1.0" encoding="UTF-8"?>
> <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
> http://camel.apache.org/schema/blueprint http://camel.apache.org/schema/blueprint/camel-blueprint.xsd">
>
> <camelContext id="mail-test" xmlns="http://camel.apache.org/schema/blueprint" trace="false" logMask="true" useBreadcrumb="true" streamCache="false">
> <route id="mail-test-route">
> <from uri="pop3:// mypop3server?username= myuser &password= mypassword &unseen=true&delay=20000"/>
> <split>
> <method beanType="org.apache.camel.component.mail.SplitAttachmentsExpression" />
> <log message="Me Got ${body}" loggingLevel="INFO" />
> <to uri="file:mail/out" />
> </split>
> </route>
> </camelContext>
> </blueprint>
>
> Any advice would be great,
> Joerg