You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by "Dave Rushall (JIRA)" <ji...@apache.org> on 2008/08/13 17:20:44 UTC

[jira] Created: (GERONIMO-4241) NPE when calling folder.getDeletedMessageCount() for POP3 store

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; type=javax.mail.Provider$Type@67886788; 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.


[jira] Assigned: (GERONIMO-4241) NPE when calling folder.getDeletedMessageCount() for POP3 store

Posted by "Rick McGuire (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GERONIMO-4241?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rick McGuire reassigned GERONIMO-4241:
--------------------------------------

    Assignee: Rick McGuire

> 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
>            Assignee: Rick McGuire
>
> 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; type=javax.mail.Provider$Type@67886788; 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.


[jira] Resolved: (GERONIMO-4241) NPE when calling folder.getDeletedMessageCount() for POP3 store

Posted by "Rick McGuire (JIRA)" <ji...@apache.org>.
     [ 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; type=javax.mail.Provider$Type@67886788; 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.


[jira] Resolved: (GERONIMO-4241) NPE when calling folder.getDeletedMessageCount() for POP3 store

Posted by "Rick McGuire (JIRA)" <ji...@apache.org>.
     [ 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 689140.

I was able to redo the connection management so that single-threaded operations should never require more than a single open 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
>            Assignee: Rick McGuire
>
> 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; type=javax.mail.Provider$Type@67886788; 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.


[jira] Commented: (GERONIMO-4241) NPE when calling folder.getDeletedMessageCount() for POP3 store

Posted by "Dave Rushall (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMO-4241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12623975#action_12623975 ] 

Dave Rushall commented on GERONIMO-4241:
----------------------------------------

Perhaps I'm missing something, but I don't understand why getDeletedMessageCount() is attempting to open the second connection, at all. If the application already has the folder open (read/write), then attempting to open the second session to the same POP3 folder is going to fail, isn't it? I would have thought that the POP3 folder implementation should be able to determine the count without making a second connection - getMessageCount() doesn't make a second connection, for example.

For now, I'm working around the problem for POP3 by assuming that getDeletedMessageCount() always returns 0, unless I have deleted a message in my active session. It seems odd that I have to do this and this workaround does not seem to be necessary when using another implementation of Javamail.


> 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; type=javax.mail.Provider$Type@67886788; 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.


[jira] Reopened: (GERONIMO-4241) NPE when calling folder.getDeletedMessageCount() for POP3 store

Posted by "Dave Rushall (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GERONIMO-4241?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dave Rushall reopened GERONIMO-4241:
------------------------------------


Reopening after chatting about this issue with Rick...

I still think there is an issue here with the Geronimo Javamail implementation. Running my code against the same POP3 server using the Sun Javamail implementation works fine. The debug log does not show any attempt to create a second connection to the server, allowing it to complete, without hitting the locked mailbox exception.

DEBUG: JavaMail version 1.4.1
DEBUG: not loading file: C:\Program Files\IBM\Java50\jre\lib\javamail.providers
DEBUG: java.io.FileNotFoundException: C:\Program Files\IBM\Java50\jre\lib\javamail.providers (The system cannot find the file specified.)
DEBUG: URL jar:file:/******************************************/testStoreRegistration.jar!/META-INF/javamail.providers
DEBUG: successfully loaded resource: jar:file:/******************************************/testStoreRegistration.jar!/META-INF/javamail.providers
DEBUG: successfully loaded resource: /META-INF/javamail.default.providers
DEBUG: Tables of loaded providers
DEBUG: Providers Listed By Class Name: {com.sun.mail.smtp.SMTPSSLTransport=javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Sun Microsystems, Inc], com.sun.mail.smtp.SMTPTransport=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc], com.sun.mail.imap.IMAPSSLStore=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Sun Microsystems, Inc], com.sun.mail.pop3.POP3SSLStore=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Sun Microsystems, Inc], com.sun.mail.imap.IMAPStore=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc], com.sun.mail.pop3.POP3Store=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun Microsystems, Inc], **************.TestStore=javax.mail.Provider[STORE,testStore,**************.TestStore,***********]}
DEBUG: Providers Listed By Protocol: {imaps=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Sun Microsystems, Inc], imap=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc], testStore=javax.mail.Provider[STORE,testStore,**************.TestStore,***********], smtps=javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Sun Microsystems, Inc], pop3=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun Microsystems, Inc], pop3s=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Sun Microsystems, Inc], smtp=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]}
DEBUG: successfully loaded resource: /META-INF/javamail.default.address.map
DEBUG: !anyLoaded
DEBUG: not loading resource: /META-INF/javamail.address.map
DEBUG: not loading file: C:\Program Files\IBM\Java50\jre\lib\javamail.address.map
DEBUG: java.io.FileNotFoundException: C:\Program Files\IBM\Java50\jre\lib\javamail.address.map (The system cannot find the file specified.)
DEBUG: getProvider() returning javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun Microsystems, Inc]
DEBUG POP3: connecting to host "*************************", port 110, isSSL false
S: +OK POP3 ************************* v2003.83 server ready
C: USER *******
S: +OK User name accepted, password please
C: PASS ********
S: +OK Mailbox open, 0 messages
C: STAT
S: +OK 0 0
C: NOOP
S: +OK No-op to you too!
C: QUIT
S: +OK Sayonara

The following pseudo code outlines what my code is doing...

store = session.getStore("POP3");
store.connect(hostName, port, userid, password);
folder = store.getFolder(folderName);
folder.open(Folder.READ_WRITE);
undeletedMessageCount = folder.getMessageCount();
undeletedMessageCount -= folder.getDeletedMessageCount(); // fails using Geronimo implementation
folder.close()
store.close()


> 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
>            Assignee: Rick McGuire
>
> 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; type=javax.mail.Provider$Type@67886788; 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.