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] Commented: (GERONIMO-4241) NPE when calling folder.getDeletedMessageCount() for POP3 store
Date Wed, 20 Aug 2008 12:30:47 GMT

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


Mime
View raw message