Uploaded image for project: 'Kuali Rice Development'
  1. Kuali Rice Development
  2. KULRICE-2953

Rice is currently pulling in the geronimo javamail jar as an undesirable dependency from CXF, this is conflicting with sun javamail functionality

    Details

    • Type: Bug Fix
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.0
    • Component/s: Development
    • Labels:
      None

      Description

      See the email pasted below from the Rice user list. The solution that I think we need to do is just manually exclude the geronimo mail jar from our CXF dependency in our POM file.

      >>>>>>>

      We're using the rice-release-0-9-4-br code base, planning on having a
      central rice instance for KIM but, at least for now, embedding KEW in
      our application (embedded, not bundled, if I've kept the terms straight)

      It was recently brought to my attention that the email we generate from
      our application is now missing the "To:", "From:", and "Subject:" lines,
      in our development version where we're adding the rice code.

      I've tracked this problem down to the "Geronimo" javamail jar that we
      get out of the rice build.

      From what I've been able to glean so far, the rice pom.xml references
      Apache CXF which, in turn, references Apache Geronimo. The ultimate
      result is that several "geronimo-*.jar" files end up in our deployed
      app, and specifically geronimo-javamail_1.4_spec-1.3.jar – which
      conflicts with Sun's mail.jar

      If I remove the geronimo javamail jar our email starts working again.
      Since this is an implementation of JavaMail I thought I could remove the
      standard mail.jar and use what Rice gave me, but when I tried that the
      SMTP send fails because there's no transport class for it:
      org.apache.geronimo.javamail.transport.smtp is not in any of the
      geronimo-* jar files.
      It seems there's a javamail-providers jar file I've seen mentioned while
      trying to track this down, but it may be part of the CXF or Geronimo
      Maven build and not out there available for a simple download; anyway, I
      haven't found one.

      Also, an old email thread from the cxf-user list
      http://www.mail-archive.com/cxf-user@incubator.apache.org/msg02144.html
      implies it is supposed to be safe to drop the geronimo jar in favor of
      the standard sun mail.jar but there was once a dependency problem that's
      likely fixed now.

      Are the geronimo jars – the CXF and/or Geronimo classes – still used
      in rice, or might they be cruft from earlier versions? That is, is it
      safe to just delete the jar file that's giving me a problem?

      If they're still used, is it safe at this point to delete that jar
      anyway and rely on mail.jar for whatever dependencies rice has?

      If it's not, that seems to imply that I have to switch to the Apache
      Geronimo implementation for JavaMail, and in that case the rice pom
      should also include the transport providers in some way, otherwise rice
      will break existing email implementations.

        Attachments

          Activity

          Hide
          caseyhb Casey Boettcher (Inactive) added a comment -

          Added:

          <dependency>
          <groupId>org.apache.cxf</groupId>
          <artifactId>cxf-rt-frontend-jaxws</artifactId>
          <version>$

          {cxf.version}

          </version>
          <exclusions>
          <exclusion><!-- avoids conflict with javamail -->
          <groupId>org.apache.geronimo.specs</groupId>
          <artifactId>geronimo-javamail_1.4_spec</artifactId>
          </exclusion>
          </exclusions>
          </dependency>

          to parent POM. Then packaged and checked if standalone included exclusion. It did not, so I'm marking resolved.

          Show
          caseyhb Casey Boettcher (Inactive) added a comment - Added: <dependency> <groupId>org.apache.cxf</groupId> <artifactId>cxf-rt-frontend-jaxws</artifactId> <version>$ {cxf.version} </version> <exclusions> <exclusion><!-- avoids conflict with javamail --> <groupId>org.apache.geronimo.specs</groupId> <artifactId>geronimo-javamail_1.4_spec</artifactId> </exclusion> </exclusions> </dependency> to parent POM. Then packaged and checked if standalone included exclusion. It did not, so I'm marking resolved.
          Hide
          ewestfal Eric Westfall added a comment -

          Bulk change of all Rice 1.0 issues to closed after public release.

          Show
          ewestfal Eric Westfall added a comment - Bulk change of all Rice 1.0 issues to closed after public release.

            People

            • Assignee:
              caseyhb Casey Boettcher (Inactive)
              Reporter:
              ewestfal Eric Westfall
            • Votes:
              1 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: