[ 
https://issues.apache.org/jira/browse/JAMES-1476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13574527#comment-13574527
 ] 

Eric Charles commented on JAMES-1476:
-------------------------------------

Hi,
I have run your test class with the current James trunk default config (with my 
username/password) for +/- 5 minutes without exception (see end of the log here 
after).

As always, with intermittent failures, it is not obvious to reproduce.
Any particular conditions that would make this happen: parallel run of the 
test, machine load,... ?

Thx, Eric

DEBUG IMAP: AUTH: PLAIN
A3 EXAMINE INBOX
* FLAGS (\Answered \Deleted \Draft \Flagged \Seen NonJunk)
* 796 EXISTS
* 796 RECENT
* OK [UIDVALIDITY 321340841] UIDs valid
* OK [UNSEEN 796] Message 796 is first unseen
* OK [PERMANENTFLAGS (\Answered \Deleted \Draft \Flagged \Seen NonJunk \*)] 
Limited
* OK [HIGHESTMODSEQ 829] Highest
* OK [UIDNEXT 830] Predicted next UID
A3 OK [READ-ONLY] EXAMINE completed.
DEBUG IMAP: IMAPProtocol noop
A1478 NOOP
* 796 EXISTS
* 313 RECENT
A1478 OK NOOP completed.
A1479 SEARCH SUBJECT "subject with random nr: 1360335549198 92" ALL
* SEARCH 796
A1479 OK SEARCH completed.
A1480 FETCH 796 (BODYSTRUCTURE)
* 796 FETCH (BODYSTRUCTURE ("TEXT" "TXT" ("charset" "UTF-8") NIL NIL "7BIT" 19 
1 NIL NIL NIL NIL))
A1480 OK FETCH completed.
A1481 FETCH 796 (BODY[TEXT]<0.19>)
* 796 FETCH (FLAGS (\Recent \Seen) BODY[TEXT]<0> {19}
this is a message
)
A1481 OK FETCH completed.
[2013.02.08 GMT 14:59:32.877] (aos.protocol.imap4.ImapTest.java:118):testSend - 
msg found
DEBUG: getProvider() returning 
javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun 
Microsystems, Inc]
DEBUG SMTP: useEhlo true, useAuth true
DEBUG SMTP: useEhlo true, useAuth true
DEBUG SMTP: trying to connect to host "localhost.net", port 2525, isSSL false
220 eric JAMES SMTP Server Server (JAMES SMTP Server ) ready
DEBUG SMTP: connected to host "localhost.net", port: 2525

EHLO localhost
250-eric Hello localhost [127.0.0.1])
250-PIPELINING
250-ENHANCEDSTATUSCODES
250 8BITMIME
DEBUG SMTP: Found extension "PIPELINING", arg ""
DEBUG SMTP: Found extension "ENHANCEDSTATUSCODES", arg ""
DEBUG SMTP: Found extension "8BITMIME", arg ""
DEBUG SMTP: use8bit false
MAIL FROM:<tests...@icw.cm.test>
250 2.1.0 Sender <tests...@icw.cm.test> OK
RCPT TO:<e...@localhost.net>
250 2.1.5 Recipient <e...@localhost.net> OK
DEBUG SMTP: Verified Addresses
DEBUG SMTP:   e...@localhost.net
DATA
354 Ok Send data ending with <CRLF>.<CRLF>
Date: Fri, 8 Feb 2013 14:47:50 +0000 (GMT)
From: tests...@icw.cm.test
To: e...@localhost.net
Message-ID: <822082860.483.1360335572929.JavaMail.eric@eric>
Subject: subject with random nr: 1360335572928 14
MIME-Version: 1.0
Content-Type: text/txt; charset=UTF-8
Content-Transfer-Encoding: 7bit

this is a message
.
250 2.6.0 Message received
QUIT
221 2.0.0 eric Service closing transmission channel
DEBUG: no connections in the pool, creating a new one
* OK JAMES IMAP4rev1 Server  Server eric is ready.
A0 CAPABILITY
* CAPABILITY SASL-IR IDLE LITERAL+ AUTH=PLAIN CONDSTORE ESEARCH CHILDREN 
UIDPLUS UNSELECT WITHIN ENABLE I18NLEVEL=1 SEARCHRES IMAP4rev1 NAMESPACE QRESYNC
A0 OK CAPABILITY completed.
DEBUG IMAP: AUTH: PLAIN
DEBUG IMAP: AUTHENTICATE PLAIN command trace suppressed
DEBUG IMAP: AUTHENTICATE PLAIN command result: A1 OK AUTHENTICATE completed.
A2 CAPABILITY
* CAPABILITY SASL-IR IDLE LITERAL+ AUTH=PLAIN CONDSTORE ESEARCH CHILDREN 
UIDPLUS UNSELECT WITHIN ENABLE I18NLEVEL=1 SEARCHRES IMAP4rev1 NAMESPACE QRESYNC
A2 OK CAPABILITY completed.
DEBUG IMAP: AUTH: PLAIN
A3 EXAMINE INBOX
* FLAGS (\Answered \Deleted \Draft \Flagged \Seen NonJunk)
* 797 EXISTS
* 797 RECENT
* OK [UIDVALIDITY 321340841] UIDs valid
* OK [UNSEEN 797] Message 797 is first unseen
* OK [PERMANENTFLAGS (\Answered \Deleted \Draft \Flagged \Seen NonJunk \*)] 
Limited
* OK [HIGHESTMODSEQ 830] Highest
* OK [UIDNEXT 831] Predicted next UID
A3 OK [READ-ONLY] EXAMINE completed.
DEBUG IMAP: IMAPProtocol noop
A1482 NOOP
* 797 EXISTS
* 313 RECENT
A1482 OK NOOP completed.
A1483 SEARCH SUBJECT "subject with random nr: 1360335572928 14" ALL

                
> ArrayIndexOutOfBoundsException when searching in ImapFolder 
> ------------------------------------------------------------
>
>                 Key: JAMES-1476
>                 URL: https://issues.apache.org/jira/browse/JAMES-1476
>             Project: James Server
>          Issue Type: Bug
>          Components: IMAPServer
>    Affects Versions: 3.0-beta4
>            Reporter: Heinz-Dieter Conradi
>            Priority: Critical
>         Attachments: cdm-messaging-config-3.2-SNAPSHOT.jar, JamesTest.java
>
>
> Hi,
> Occasionally, some of my test fail with an ArrayIndexOutOfBoundsException:
> java.lang.ArrayIndexOutOfBoundsException: message number (6) out of bounds (5)
> at com.sun.mail.imap.MessageCache.getMessage(MessageCache.java:132)
> at com.sun.mail.imap.MessageCache.getMessageBySeqnum(MessageCache.java:162)
> at com.sun.mail.imap.IMAPFolder.getMessageBySeqNumber(IMAPFolder.java:2809)
> at com.sun.mail.imap.IMAPFolder.search(IMAPFolder.java:1662)
> The test is rather simple: I create a Message and do 
> 'Transport.send(message)' and then I try to verify if the mail can be found 
> on the server with 'folder.search(searchTerm);'.
> The folder is opened with 'folder.open(Folder.READ_ONLY);'.
> I have asked on the javax.mail mailing list 
> (https://forums.oracle.com/forums/thread.jspa?threadID=2489711&tstart=0) and 
> have been advised to open a bug here:
> ------
> It's definitely a bug in the server. You can see it here:
> You open the INBOX and it tells you there's 6 messages in the INBOX:
> A3 EXAMINE INBOX
> * FLAGS (\Answered \Deleted \Draft \Flagged \Seen)
> * 6 EXISTS
> Then you do a search and it matches message number 7!
> A5 SEARCH SUBJECT "subject with random nr: 1359967923405 9" ALL
> * SEARCH 7
> There was also another search for the same message right before that, and it 
> returned nothing.
> Presumably the message just showed up in the INBOX between those two 
> searches, which is
> fine, but the IMAP protocol requires the server to notify the client of the 
> new message before
> it can return that message as the result of a search.
> --------
> The complete stacktrace and debug output can be found in that thread, or I 
> can attach it to this bug.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
For additional commands, e-mail: server-dev-h...@james.apache.org

Reply via email to