geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "aurelien leboulanger (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (GERONIMO-6526) IMAP connection via java mail api (geronimo-javamail_1.4_mail) throws NPE
Date Fri, 23 Jan 2015 10:59:34 GMT

    [ 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}


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}

How can i test the 1.8.5 version with maven please ?

> 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)

Mime
View raw message