Return-Path: Delivered-To: apmail-geronimo-dev-archive@www.apache.org Received: (qmail 19579 invoked from network); 20 Aug 2008 12:31:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 20 Aug 2008 12:31:09 -0000 Received: (qmail 70879 invoked by uid 500); 20 Aug 2008 12:31:06 -0000 Delivered-To: apmail-geronimo-dev-archive@geronimo.apache.org Received: (qmail 70811 invoked by uid 500); 20 Aug 2008 12:31:06 -0000 Mailing-List: contact dev-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list dev@geronimo.apache.org Received: (qmail 70800 invoked by uid 99); 20 Aug 2008 12:31:06 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Aug 2008 05:31:06 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Aug 2008 12:30:18 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 468FB234C1BF for ; Wed, 20 Aug 2008 05:30:47 -0700 (PDT) Message-ID: <200383665.1219235447287.JavaMail.jira@brutus> Date: Wed, 20 Aug 2008 05:30:47 -0700 (PDT) From: "Dave Rushall (JIRA)" To: dev@geronimo.apache.org Subject: [jira] Commented: (GERONIMO-4241) NPE when calling folder.getDeletedMessageCount() for POP3 store In-Reply-To: <1262537113.1218640844248.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on 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.