You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by se...@james.apache.org on 2004/08/13 00:23:19 UTC

[jira] Created: (JAMES-316) java.lang.ArrayIndexOutOfBoundsException from RemoteDelivery

Message:

  A new issue has been created in JIRA.

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/JAMES-316

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: JAMES-316
    Summary: java.lang.ArrayIndexOutOfBoundsException from RemoteDelivery
       Type: Bug

     Status: Unassigned
   Priority: Major

    Project: James
 Components: 
             Remote Delivery
   Versions:
             2.2.1

   Assignee: 
   Reporter: Bradley D. Brown

    Created: Thu, 12 Aug 2004 3:22 PM
    Updated: Thu, 12 Aug 2004 3:22 PM
Environment: Windows XP

Description:
When I look in the mailet logs, I see pages and pages of errors like this:

12/08/04 14:31:01 INFO  James.Mailet: RemoteDelivery: Exception caught in RemoteDelivery.run()
java.lang.ArrayIndexOutOfBoundsException: 10
	at org.apache.james.transport.mailets.RemoteDelivery.getNextDelay(RemoteDelivery.java:981)
	at org.apache.james.transport.mailets.RemoteDelivery.access$000(RemoteDelivery.java:93)
	at org.apache.james.transport.mailets.RemoteDelivery$MultipleDelayFilter.accept(RemoteDelivery.java:155)
	at org.apache.james.mailrepository.AvalonSpoolRepository.accept(AvalonSpoolRepository.java:156)
	at org.apache.james.transport.mailets.RemoteDelivery.run(RemoteDelivery.java:901)
	at java.lang.Thread.run(Unknown Source)
12/08/04 14:31:01 INFO  James.Mailet: RemoteDelivery: Exception caught in RemoteDelivery.run()
java.lang.ArrayIndexOutOfBoundsException: 2
	at org.apache.james.transport.mailets.RemoteDelivery.getNextDelay(RemoteDelivery.java:981)
	at org.apache.james.transport.mailets.RemoteDelivery.access$000(RemoteDelivery.java:93)
	at org.apache.james.transport.mailets.RemoteDelivery$MultipleDelayFilter.accept(RemoteDelivery.java:155)
	at org.apache.james.mailrepository.AvalonSpoolRepository.accept(AvalonSpoolRepository.java:156)
	at org.apache.james.transport.mailets.RemoteDelivery.run(RemoteDelivery.java:901)
	at java.lang.Thread.run(Unknown Source)


Email does not appear to be delivered, my startup is exceptionally slow, but that may be a different issue.


---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


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


[jira] Commented: (JAMES-316) java.lang.ArrayIndexOutOfBoundsException from RemoteDelivery

Posted by "Hes Siemelink (JIRA)" <se...@james.apache.org>.
     [ http://nagoya.apache.org/jira/browse/JAMES-316?page=comments#action_55974 ]
     
Hes Siemelink commented on JAMES-316:
-------------------------------------

Same here... 

James short-circuited in the RemoteDelivery, hogging all CPU time.


What probably happens is that it is possible to misconfigure the RemoteDelivery's delayTimes in the config.xml file. This passes undetected, but at the hour of delivering a message getNextDelay() throws the ArrayIndexOutOfBoundsException.

This will cause a (tight) loop in RemoteDelivery.run().

Work-around: configure your config.xml so there are less delayTimes entries than deliveryAttempts and delete all your mail that is still hanging in a queue.




> java.lang.ArrayIndexOutOfBoundsException from RemoteDelivery
> ------------------------------------------------------------
>
>          Key: JAMES-316
>          URL: http://nagoya.apache.org/jira/browse/JAMES-316
>      Project: James
>         Type: Bug
>   Components: Remote Delivery
>     Versions: 2.2.1
>  Environment: Windows XP
>     Reporter: Bradley D. Brown
>  Attachments: config.xml
>
> When I look in the mailet logs, I see pages and pages of errors like this:
> 12/08/04 14:31:01 INFO  James.Mailet: RemoteDelivery: Exception caught in RemoteDelivery.run()
> java.lang.ArrayIndexOutOfBoundsException: 10
> 	at org.apache.james.transport.mailets.RemoteDelivery.getNextDelay(RemoteDelivery.java:981)
> 	at org.apache.james.transport.mailets.RemoteDelivery.access$000(RemoteDelivery.java:93)
> 	at org.apache.james.transport.mailets.RemoteDelivery$MultipleDelayFilter.accept(RemoteDelivery.java:155)
> 	at org.apache.james.mailrepository.AvalonSpoolRepository.accept(AvalonSpoolRepository.java:156)
> 	at org.apache.james.transport.mailets.RemoteDelivery.run(RemoteDelivery.java:901)
> 	at java.lang.Thread.run(Unknown Source)
> 12/08/04 14:31:01 INFO  James.Mailet: RemoteDelivery: Exception caught in RemoteDelivery.run()
> java.lang.ArrayIndexOutOfBoundsException: 2
> 	at org.apache.james.transport.mailets.RemoteDelivery.getNextDelay(RemoteDelivery.java:981)
> 	at org.apache.james.transport.mailets.RemoteDelivery.access$000(RemoteDelivery.java:93)
> 	at org.apache.james.transport.mailets.RemoteDelivery$MultipleDelayFilter.accept(RemoteDelivery.java:155)
> 	at org.apache.james.mailrepository.AvalonSpoolRepository.accept(AvalonSpoolRepository.java:156)
> 	at org.apache.james.transport.mailets.RemoteDelivery.run(RemoteDelivery.java:901)
> 	at java.lang.Thread.run(Unknown Source)
> Email does not appear to be delivered, my startup is exceptionally slow, but that may be a different issue.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


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


[jira] Updated: (JAMES-316) java.lang.ArrayIndexOutOfBoundsException from RemoteDelivery

Posted by se...@james.apache.org.
The following issue has been updated:

    Updater: Bradley D. Brown (mailto:brownb@tusc.com)
       Date: Thu, 12 Aug 2004 3:24 PM
    Comment:
Here's my config.xml file in case I messed something up here...
    Changes:
             Attachment changed to config.xml
    ---------------------------------------------------------------------
For a full history of the issue, see:

  http://issues.apache.org/jira/browse/JAMES-316?page=history

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/JAMES-316

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: JAMES-316
    Summary: java.lang.ArrayIndexOutOfBoundsException from RemoteDelivery
       Type: Bug

     Status: Unassigned
   Priority: Major

    Project: James
 Components: 
             Remote Delivery
   Versions:
             2.2.1

   Assignee: 
   Reporter: Bradley D. Brown

    Created: Thu, 12 Aug 2004 3:22 PM
    Updated: Thu, 12 Aug 2004 3:24 PM
Environment: Windows XP

Description:
When I look in the mailet logs, I see pages and pages of errors like this:

12/08/04 14:31:01 INFO  James.Mailet: RemoteDelivery: Exception caught in RemoteDelivery.run()
java.lang.ArrayIndexOutOfBoundsException: 10
	at org.apache.james.transport.mailets.RemoteDelivery.getNextDelay(RemoteDelivery.java:981)
	at org.apache.james.transport.mailets.RemoteDelivery.access$000(RemoteDelivery.java:93)
	at org.apache.james.transport.mailets.RemoteDelivery$MultipleDelayFilter.accept(RemoteDelivery.java:155)
	at org.apache.james.mailrepository.AvalonSpoolRepository.accept(AvalonSpoolRepository.java:156)
	at org.apache.james.transport.mailets.RemoteDelivery.run(RemoteDelivery.java:901)
	at java.lang.Thread.run(Unknown Source)
12/08/04 14:31:01 INFO  James.Mailet: RemoteDelivery: Exception caught in RemoteDelivery.run()
java.lang.ArrayIndexOutOfBoundsException: 2
	at org.apache.james.transport.mailets.RemoteDelivery.getNextDelay(RemoteDelivery.java:981)
	at org.apache.james.transport.mailets.RemoteDelivery.access$000(RemoteDelivery.java:93)
	at org.apache.james.transport.mailets.RemoteDelivery$MultipleDelayFilter.accept(RemoteDelivery.java:155)
	at org.apache.james.mailrepository.AvalonSpoolRepository.accept(AvalonSpoolRepository.java:156)
	at org.apache.james.transport.mailets.RemoteDelivery.run(RemoteDelivery.java:901)
	at java.lang.Thread.run(Unknown Source)


Email does not appear to be delivered, my startup is exceptionally slow, but that may be a different issue.


---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


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


[jira] Commented: (JAMES-316) java.lang.ArrayIndexOutOfBoundsException from RemoteDelivery

Posted by "Hes Siemelink (JIRA)" <se...@james.apache.org>.
     [ http://nagoya.apache.org/jira/browse/JAMES-316?page=comments#action_55975 ]
     
Hes Siemelink commented on JAMES-316:
-------------------------------------

Quick fix:

Alter the method RemoteDelivery.getNextDelay by adding a range check:

    /**
     * This method returns, given a retry-count, the next delay time to use.
     * @param retry_count the current retry_count.
     * @return the next delay time to use, given the retry count
     **/
    private long getNextDelay (int retry_count) {
+        if (retry_count >= delayTimes.length) {
+            return DEFAULT_DELAY_TIME;
+        }
        return delayTimes[retry_count-1];
    }

This solution will also work if the array of delayTimes shrinks because of a reconfiguration, but there is still a message with more error attempts hanging in the queue.

We need a robust solution, because if this method throws an exception James virtually hangs!

> java.lang.ArrayIndexOutOfBoundsException from RemoteDelivery
> ------------------------------------------------------------
>
>          Key: JAMES-316
>          URL: http://nagoya.apache.org/jira/browse/JAMES-316
>      Project: James
>         Type: Bug
>   Components: Remote Delivery
>     Versions: 2.2.1
>  Environment: Windows XP
>     Reporter: Bradley D. Brown
>  Attachments: config.xml
>
> When I look in the mailet logs, I see pages and pages of errors like this:
> 12/08/04 14:31:01 INFO  James.Mailet: RemoteDelivery: Exception caught in RemoteDelivery.run()
> java.lang.ArrayIndexOutOfBoundsException: 10
> 	at org.apache.james.transport.mailets.RemoteDelivery.getNextDelay(RemoteDelivery.java:981)
> 	at org.apache.james.transport.mailets.RemoteDelivery.access$000(RemoteDelivery.java:93)
> 	at org.apache.james.transport.mailets.RemoteDelivery$MultipleDelayFilter.accept(RemoteDelivery.java:155)
> 	at org.apache.james.mailrepository.AvalonSpoolRepository.accept(AvalonSpoolRepository.java:156)
> 	at org.apache.james.transport.mailets.RemoteDelivery.run(RemoteDelivery.java:901)
> 	at java.lang.Thread.run(Unknown Source)
> 12/08/04 14:31:01 INFO  James.Mailet: RemoteDelivery: Exception caught in RemoteDelivery.run()
> java.lang.ArrayIndexOutOfBoundsException: 2
> 	at org.apache.james.transport.mailets.RemoteDelivery.getNextDelay(RemoteDelivery.java:981)
> 	at org.apache.james.transport.mailets.RemoteDelivery.access$000(RemoteDelivery.java:93)
> 	at org.apache.james.transport.mailets.RemoteDelivery$MultipleDelayFilter.accept(RemoteDelivery.java:155)
> 	at org.apache.james.mailrepository.AvalonSpoolRepository.accept(AvalonSpoolRepository.java:156)
> 	at org.apache.james.transport.mailets.RemoteDelivery.run(RemoteDelivery.java:901)
> 	at java.lang.Thread.run(Unknown Source)
> Email does not appear to be delivered, my startup is exceptionally slow, but that may be a different issue.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


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


[jira] Resolved: (JAMES-316) java.lang.ArrayIndexOutOfBoundsException from RemoteDelivery

Posted by "Stefano Bagnara (JIRA)" <se...@james.apache.org>.
     [ http://issues.apache.org/jira/browse/JAMES-316?page=all ]
     
Stefano Bagnara resolved JAMES-316:
-----------------------------------

    Fix Version: 2.3.0
     Resolution: Fixed
      Assign To: Stefano Bagnara

Applied the workaround. Changed the >= to >.

> java.lang.ArrayIndexOutOfBoundsException from RemoteDelivery
> ------------------------------------------------------------
>
>          Key: JAMES-316
>          URL: http://issues.apache.org/jira/browse/JAMES-316
>      Project: James
>         Type: Bug
>   Components: Remote Delivery
>     Versions: 2.3.0
>  Environment: Windows XP
>     Reporter: Bradley D. Brown
>     Assignee: Stefano Bagnara
>      Fix For: 2.3.0
>  Attachments: config.xml
>
> When I look in the mailet logs, I see pages and pages of errors like this:
> 12/08/04 14:31:01 INFO  James.Mailet: RemoteDelivery: Exception caught in RemoteDelivery.run()
> java.lang.ArrayIndexOutOfBoundsException: 10
> 	at org.apache.james.transport.mailets.RemoteDelivery.getNextDelay(RemoteDelivery.java:981)
> 	at org.apache.james.transport.mailets.RemoteDelivery.access$000(RemoteDelivery.java:93)
> 	at org.apache.james.transport.mailets.RemoteDelivery$MultipleDelayFilter.accept(RemoteDelivery.java:155)
> 	at org.apache.james.mailrepository.AvalonSpoolRepository.accept(AvalonSpoolRepository.java:156)
> 	at org.apache.james.transport.mailets.RemoteDelivery.run(RemoteDelivery.java:901)
> 	at java.lang.Thread.run(Unknown Source)
> 12/08/04 14:31:01 INFO  James.Mailet: RemoteDelivery: Exception caught in RemoteDelivery.run()
> java.lang.ArrayIndexOutOfBoundsException: 2
> 	at org.apache.james.transport.mailets.RemoteDelivery.getNextDelay(RemoteDelivery.java:981)
> 	at org.apache.james.transport.mailets.RemoteDelivery.access$000(RemoteDelivery.java:93)
> 	at org.apache.james.transport.mailets.RemoteDelivery$MultipleDelayFilter.accept(RemoteDelivery.java:155)
> 	at org.apache.james.mailrepository.AvalonSpoolRepository.accept(AvalonSpoolRepository.java:156)
> 	at org.apache.james.transport.mailets.RemoteDelivery.run(RemoteDelivery.java:901)
> 	at java.lang.Thread.run(Unknown Source)
> Email does not appear to be delivered, my startup is exceptionally slow, but that may be a different issue.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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