Return-Path: Delivered-To: apmail-geronimo-dev-archive@www.apache.org Received: (qmail 43589 invoked from network); 26 Aug 2008 15:27:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 26 Aug 2008 15:27:08 -0000 Received: (qmail 26598 invoked by uid 500); 26 Aug 2008 15:27:05 -0000 Delivered-To: apmail-geronimo-dev-archive@geronimo.apache.org Received: (qmail 26539 invoked by uid 500); 26 Aug 2008 15:27:04 -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 26510 invoked by uid 99); 26 Aug 2008 15:27:04 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Aug 2008 08:27:04 -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; Tue, 26 Aug 2008 15:26:15 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id EF501234C1B9 for ; Tue, 26 Aug 2008 08:26:44 -0700 (PDT) Message-ID: <1815968044.1219764404979.JavaMail.jira@brutus> Date: Tue, 26 Aug 2008 08:26:44 -0700 (PDT) From: "Dave Rushall (JIRA)" To: dev@geronimo.apache.org Subject: [jira] Reopened: (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: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.