Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-10593

No way to prevent java mail “expected resource not found” warnings from camel-mail component

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: fuse-7.2
    • Fix Version/s: fuse-7.4-GA
    • Component/s: Camel
    • Labels:
      None
    • Sprint:
      Fuse 7.4 Sprint 46 - Dev #2
    • Steps to Reproduce:
      Hide
      • unzip attached reproducer.zip
      • modify reproducer/src/main/resources/mail.properties
      • cd reproducer
      • mvn clean install
      • FUSE7.2_KARAF_HOME/bin/fuse
      • osgi:install -s mvn:sample/reproducer/1.0.0-SNAPSHOT

      You can observe the following WARN logs

      2019-04-25 12:42:09,806 | WARN | 23 - scheduler://foo | j.mail | 21 - com.sun.mail.javax.mail - 1.6.1.redhat-1 | expected resource not found: /META-INF/javamail.default.providers
      2019-04-25 12:42:09,807 | WARN | 23 - scheduler://foo | j.mail | 21 - com.sun.mail.javax.mail - 1.6.1.redhat-1 | expected resource not found: /META-INF/javamail.default.address.map

      Show
      unzip attached reproducer.zip modify reproducer/src/main/resources/mail.properties cd reproducer mvn clean install FUSE7.2_KARAF_HOME/bin/fuse osgi:install -s mvn:sample/reproducer/1.0.0-SNAPSHOT You can observe the following WARN logs 2019-04-25 12:42:09,806 | WARN | 23 - scheduler://foo | j.mail | 21 - com.sun.mail.javax.mail - 1.6.1.redhat-1 | expected resource not found: /META-INF/javamail.default.providers 2019-04-25 12:42:09,807 | WARN | 23 - scheduler://foo | j.mail | 21 - com.sun.mail.javax.mail - 1.6.1.redhat-1 | expected resource not found: /META-INF/javamail.default.address.map
    • QE Test Coverage:
      +

      Description

      Following warn messages are always logged by using camel-mail component.
      fuse.log

      2019-04-25 12:42:09,806 | WARN | 23 - scheduler://foo | j.mail | 21 - com.sun.mail.javax.mail - 1.6.1.redhat-1 | expected resource not found: /META-INF/javamail.default.providers
      2019-04-25 12:42:09,807 | WARN | 23 - scheduler://foo | j.mail | 21 - com.sun.mail.javax.mail - 1.6.1.redhat-1 | expected resource not found: /META-INF/javamail.default.address.map

      part of camel route

      <to id="_to1" uri="smtp:smtp.host:smtp.port?password=smtp.password&username=smtp.username"/>

      I confirmed that javamail.default.providers and javamail.default.address.map are packaged in javax.mail-1.6.1.redhat-1.jar and also in my reproducer app.

      I guess the reason is a class loader for camel-mail(org.apache.camel.component.mail.DefaultAuthenticator) is used for Class.getResourceAsStream(), and could not find one in javax.mail-1.6.1.redhat-1.jar nor reproducer app.
      Please check the constructor for javax.mail.Session and Session.getResourceAsStream() method.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                ffang Freeman(Yue) Fang
                Reporter:
                hisao.furuichi Hisao Furuichi
                Tester:
                Jan Bouska
              • Votes:
                0 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: