Uploaded image for project: 'Geronimo'
  1. Geronimo
  2. GERONIMO-6526

IMAP connection via java mail api (geronimo-javamail_1.4_mail) throws NPE

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 3.0.0, 3.0.1
    • None
    • mail
    • Security Level: public (Regular issues)

    Description

      Tryng to use the java mail api in establishing an imap connection results in an NPE.

      Properties p = new Properties();
      p.put("mail.store.protocol", "imap");  // imaps does the same
      p.put("mail.host", "");
      Session ss = Session.getInstance(p);
      Store s = ss.getStore();
      s.connect(user, pass); // Here we get the NPE
      

      Using the same code with the sun/oracle implementation is successful.

      A full example can be found here: https://github.com/og0815/sandbox/tree/master/geronimo-javamail-imap-bug

      Attachments

        1. geronimo-6526-svn-withtests.diff
          16 kB
          Hendrik Saly
        2. geronimo-6526-withtests.diff
          17 kB
          Hendrik Saly
        3. GERONIMO-6526.patch
          2 kB
          Hendrik Saly

        Issue Links

          Activity

            People

              Unassigned Unassigned
              oliver.guenther Oliver Guenther
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: