You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by "aurelien leboulanger (JIRA)" <ji...@apache.org> on 2015/01/23 11:58:34 UTC

[jira] [Comment Edited] (GERONIMO-6526) IMAP connection via java mail api (geronimo-javamail_1.4_mail) throws NPE

    [ https://issues.apache.org/jira/browse/GERONIMO-6526?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14289082#comment-14289082 ] 

aurelien leboulanger edited comment on GERONIMO-6526 at 1/23/15 10:58 AM:
--------------------------------------------------------------------------

Hello,

I still have an NPE with the 1.8.4 version of geronimo with this sample : 

{code:java}
Properties props = new Properties();
props.setProperty("mail.store.protocol", "imap");
props.setProperty("mail.imap.ssl.enable", "true");
props.setProperty("mail.imap.ssl.checkserveridentity", "false");
props.setProperty("mail.imap.ssl.trust", "*");
Session session = Session.getInstance(props);
Store store = session.getStore();
store.connect(host, login, password);{code}

{quote}
java.lang.NullPointerException
	at org.apache.geronimo.javamail.store.imap.connection.IMAPTaggedResponse.isBAD(IMAPTaggedResponse.java:86)
	at org.apache.geronimo.javamail.store.imap.connection.IMAPConnection.receiveResponse(IMAPConnection.java:410)
	at org.apache.geronimo.javamail.store.imap.connection.IMAPConnection.sendCommand(IMAPConnection.java:324)
	at org.apache.geronimo.javamail.store.imap.connection.IMAPConnection.processLogin(IMAPConnection.java:598)
	at org.apache.geronimo.javamail.store.imap.connection.IMAPConnection.processPlainAuthentication(IMAPConnection.java:537)
	at org.apache.geronimo.javamail.store.imap.connection.IMAPConnection.login(IMAPConnection.java:488)
	at org.apache.geronimo.javamail.store.imap.connection.IMAPConnection.protocolConnect(IMAPConnection.java:176)
	at org.apache.geronimo.javamail.store.imap.connection.IMAPConnectionPool.createPoolConnection(IMAPConnectionPool.java:211)
	at org.apache.geronimo.javamail.store.imap.connection.IMAPConnectionPool.protocolConnect(IMAPConnectionPool.java:177)
	at org.apache.geronimo.javamail.store.imap.IMAPStore.protocolConnect(IMAPStore.java:156)
	at javax.mail.Service.connect(Service.java:251)
{quote}

How can i test the 1.8.5 version with maven please ?


was (Author: herau):
Hello,

I still have an NPE with the 1.8.4 version of geronimo with this sample : 

{code:java}
Properties props = new Properties();
props.setProperty("mail.store.protocol", "imap");
props.setProperty("mail.imap.ssl.enable", "true");
props.setProperty("mail.imap.ssl.checkserveridentity", "false");
props.setProperty("mail.imap.ssl.trust", "*");
Session session = Session.getInstance(props);
Store store = session.getStore();
store.connect(host, login, password);{code}

{quote}
java.lang.NullPointerException
	at org.apache.geronimo.javamail.store.imap.connection.IMAPTaggedResponse.isBAD(IMAPTaggedResponse.java:86)
	at org.apache.geronimo.javamail.store.imap.connection.IMAPConnection.receiveResponse(IMAPConnection.java:410)
	at org.apache.geronimo.javamail.store.imap.connection.IMAPConnection.sendCommand(IMAPConnection.java:324)
	at org.apache.geronimo.javamail.store.imap.connection.IMAPConnection.processLogin(IMAPConnection.java:598)
	at org.apache.geronimo.javamail.store.imap.connection.IMAPConnection.processPlainAuthentication(IMAPConnection.java:537)
	at org.apache.geronimo.javamail.store.imap.connection.IMAPConnection.login(IMAPConnection.java:488)
	at org.apache.geronimo.javamail.store.imap.connection.IMAPConnection.protocolConnect(IMAPConnection.java:176)
	at org.apache.geronimo.javamail.store.imap.connection.IMAPConnectionPool.createPoolConnection(IMAPConnectionPool.java:211)
	at org.apache.geronimo.javamail.store.imap.connection.IMAPConnectionPool.protocolConnect(IMAPConnectionPool.java:177)
	at org.apache.geronimo.javamail.store.imap.IMAPStore.protocolConnect(IMAPStore.java:156)
	at javax.mail.Service.connect(Service.java:251)
{quote}

> IMAP connection via java mail api (geronimo-javamail_1.4_mail) throws NPE
> -------------------------------------------------------------------------
>
>                 Key: GERONIMO-6526
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-6526
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: mail
>    Affects Versions: 3.0.0, 3.0.1
>            Reporter: Oliver Guenther
>            Priority: Minor
>              Labels: JM14_1.8.5
>         Attachments: GERONIMO-6526.patch, geronimo-6526-svn-withtests.diff, geronimo-6526-withtests.diff
>
>
> Tryng to use the java mail api in establishing an imap connection results in an NPE. 
> {code}
> 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
> {code}
> 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



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)