[ 
https://issues.apache.org/jira/browse/GERONIMO-4241?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Rick McGuire resolved GERONIMO-4241.
------------------------------------

    Resolution: Fixed

Committed revision 686218.

This fixes the NPE, but the likely result in this situation will be a 
MessageException because the Store object backing the folder will be unable to 
confirm the connection status with the POP3 server because it's getting an 
error when attempting to establish a second connection.  

> NPE when calling folder.getDeletedMessageCount() for POP3 store
> ---------------------------------------------------------------
>
>                 Key: GERONIMO-4241
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-4241
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: mail
>         Environment: geronimo-javamail_1.4_mail-1.4.jar
> IBM JRE 6 SR 1
> Windows XP
>            Reporter: Dave Rushall
>
> Calling folder.getDeletedMessageCount() for POP3 store results in the 
> following NPE...
> java.lang.NullPointerException
>       at 
> org.apache.geronimo.javamail.store.pop3.POP3Store.isConnected(POP3Store.java:238)
>       at 
> org.apache.geronimo.javamail.store.pop3.POP3Folder.isOpen(POP3Folder.java:354)
>       at javax.mail.Folder.getCount(Folder.java:436)
>       at javax.mail.Folder.getDeletedMessageCount(Folder.java:432)
> Note that calling folder.getMessageCount() functions as expected.
> The debug logs suggest that getDeletedMessageCount() attempts to open a 
> second simultaneous connection, which is refused by the server...
> Loading javamail.default.providers from 
> jar:file:/C:/Documents%20and%20Settings/Administrator/Desktop/Calico/other/geronimo-javamail_1.4_mail-1.4.jar!/META-INF/javamail.default.providers
> DEBUG: loading new provider protocol=smtp, 
> className=org.apache.geronimo.javamail.transport.smtp.SMTPTransport, 
> vendor=Apache Software Foundation, version=1.0
> DEBUG: loading new provider protocol=smtps, 
> className=org.apache.geronimo.javamail.transport.smtp.SMTPTSransport, 
> vendor=Apache Software Foundation, version=1.0
> DEBUG: loading new provider protocol=nntp-post, 
> className=org.apache.geronimo.javamail.transport.nntp.NNTPTransport, 
> vendor=Apache Software Foundation, version=1.0
> DEBUG: loading new provider protocol=nntp, 
> className=org.apache.geronimo.javamail.store.nntp.NNTPStore, vendor=Apache 
> Software Foundation, version=1.0
> DEBUG: loading new provider protocol=pop3, 
> className=org.apache.geronimo.javamail.store.pop3.POP3Store, vendor=Apache 
> Software Foundation, version=1.0
> DEBUG: loading new provider protocol=pop3s, 
> className=org.apache.geronimo.javamail.store.pop3.POP3SSLStore, vendor=Apache 
> Software Foundation, version=1.0
> DEBUG: loading new provider protocol=imap, 
> className=org.apache.geronimo.javamail.store.imap.IMAPStore, vendor=Apache 
> Software Foundation, version=1.0
> DEBUG: loading new provider protocol=imaps, 
> className=org.apache.geronimo.javamail.store.imap.IMAPSSLStore, vendor=Apache 
> Software Foundation, version=1.0
> DEBUG: getProvider() returning provider protocol=pop3; [EMAIL PROTECTED]; 
> class=org.apache.geronimo.javamail.store.pop3.POP3Store; vendor=Apache 
> Software Foundation;version=1.0
> IMAPStore DEBUG: Attempting plain socket connection to server null:0
> POP3Store DEBUG: Connecting to server ********:110 for user ********
> IMAPStore DEBUG: Attempting plain socket connection to server ********:110
> +OK POP3 ******** v2003.83 server ready
> USER ********
> +OK User name accepted, password please
> PASS ********
> +OK Mailbox open, 0 messages
> NOOP
> +OK No-op to you too!
> STAT
> +OK 0 0
> IMAPStore DEBUG: Attempting plain socket connection to server ********:110
> +OK POP3 ******** v2003.83 server ready
> USER ********
> +OK User name accepted, password please
> PASS ********
> -ERR Can't get lock.  Mailbox in use

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to