geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dave Rushall (JIRA)" <j...@apache.org>
Subject [jira] Reopened: (GERONIMO-4241) NPE when calling folder.getDeletedMessageCount() for POP3 store
Date Tue, 26 Aug 2008 15:26:44 GMT

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


Mime
View raw message