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 <mailto:[email protected]>: 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 <[email protected]>
*Sent:* Donnerstag, 3. Februar 2022 20:09
*To:* [email protected]; Jean-Baptiste Onofre <[email protected]>
*Subject:* RE: reading mail attachments

Hi John,

thanks for your suggestion.

I will give it a try and let you know.

@Jean-Baptiste Onofre <mailto:[email protected]>: 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 <[email protected] <mailto:[email protected]>>
*Sent:* Donnerstag, 3. Februar 2022 19:13
*To:* [email protected] <mailto:[email protected]>
*Subject:* Re: reading mail attachments

        

Sie erhalten nicht oft E-Mail von "[email protected] <mailto:[email protected]>". 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é <[email protected] <mailto:[email protected]>> 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 <[email protected]
    <mailto:[email protected]>>
     > Sent: Donnerstag, 3. Februar 2022 16:56
     > To: [email protected] <mailto:[email protected]>
     > Subject: reading mail attachments
     >
     > [Sie erhalten nicht oft E-Mail von
    "[email protected]
    <mailto:[email protected]>". 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&amp;data=04%7C01%7CJoerg.Jansen%40inform-software.com%7Cb99d8bb4e48f4b305e0d08d9e72dc48b%7C36c737afe6e84ba685f855440ef5fd6c%7C0%7C0%7C637795006675481216%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&amp;sdata=OEdeLDYJAlvrmWlm%2BjH2XpBEL2nvtVN4aPyyvtTVdKU%3D&amp;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&amp;data=04%7C01%7CJoerg.Jansen%40inform-software.com%7Cb99d8bb4e48f4b305e0d08d9e72dc48b%7C36c737afe6e84ba685f855440ef5fd6c%7C0%7C0%7C637795006675481216%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&amp;sdata=iKcG6LdtRMhOHzUzNAe5AKOXuDSZoyrQBp9YG33FKHg%3D&amp;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&amp;data=04%7C01%7CJoerg.Jansen%40inform-software.com%7Cb99d8bb4e48f4b305e0d08d9e72dc48b%7C36c737afe6e84ba685f855440ef5fd6c%7C0%7C0%7C637795006675481216%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&amp;sdata=OEdeLDYJAlvrmWlm%2BjH2XpBEL2nvtVN4aPyyvtTVdKU%3D&amp;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&amp;data=04%7C01%7CJoerg.Jansen%40inform-software.com%7Cb99d8bb4e48f4b305e0d08d9e72dc48b%7C36c737afe6e84ba685f855440ef5fd6c%7C0%7C0%7C637795006675481216%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&amp;sdata=Eo%2B6Nd24M4cWlIYuJjuxIpugJzFKP3j5V6yWiKgzvxk%3D&amp;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&amp;data=04%7C01%7CJoerg.Jansen%40inform-software.com%7Cb99d8bb4e48f4b305e0d08d9e72dc48b%7C36c737afe6e84ba685f855440ef5fd6c%7C0%7C0%7C637795006675481216%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&amp;sdata=SgFYfVlGew2eyX8fmu0mPzkuDeixRJL%2Bv8tu%2BRiTpqM%3D&amp;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&amp;data=04%7C01%7CJoerg.Jansen%40inform-software.com%7Cb99d8bb4e48f4b305e0d08d9e72dc48b%7C36c737afe6e84ba685f855440ef5fd6c%7C0%7C0%7C637795006675481216%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&amp;sdata=qdlthfjqeZVnPGcnzzfS8tPC2UeTDbgsX%2F%2BsEY4cYfE%3D&amp;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&amp;data=04%7C01%7CJoerg.Jansen%40inform-software.com%7Cb99d8bb4e48f4b305e0d08d9e72dc48b%7C36c737afe6e84ba685f855440ef5fd6c%7C0%7C0%7C637795006675481216%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&amp;sdata=SgFYfVlGew2eyX8fmu0mPzkuDeixRJL%2Bv8tu%2BRiTpqM%3D&amp;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
    &amp;password= mypassword &amp;unseen=true&amp;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

Reply via email to