You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fx-dev@ws.apache.org by "Andrew Gatford (JIRA)" <ji...@apache.org> on 2006/11/22 10:46:02 UTC
[jira] Created: (SANDESHA2-46) ArrayIndexOutofBounds in the Invoker
ArrayIndexOutofBounds in the Invoker
------------------------------------
Key: SANDESHA2-46
URL: http://issues.apache.org/jira/browse/SANDESHA2-46
Project: Apache Sandesha2
Issue Type: Bug
Reporter: Andrew Gatford
Priority: Trivial
Attachments: ArrayIndexInvoker.patch
The following block of code causes an ArrayIndexOutOfBoundsException when the allSequencesList.remove is called with size set to the size of the sequence list
int size = allSequencesList.size();
log.debug("Choosing one from " + size + " sequences");
if(nextIndex >= size) {
nextIndex = 0;
if (size == 0) continue;
}
String sequenceId = (String) allSequencesList.get(nextIndex++);
log.debug("Chose sequence " + sequenceId);
NextMsgBean nextMsgBean = nextMsgMgr.retrieve(sequenceId);
if (nextMsgBean == null) {
String message = "Next message not set correctly. Removing invalid entry.";
log.debug(message);
allSequencesList.remove(size);
allSequencesList.remove() Should be using the nextIndex key to remove the right element from the list.
--
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: sandesha-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: sandesha-dev-help@ws.apache.org
[jira] Updated: (SANDESHA2-46) ArrayIndexOutofBounds in the Invoker
Posted by "Andrew Gatford (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/SANDESHA2-46?page=all ]
Andrew Gatford updated SANDESHA2-46:
------------------------------------
Attachment: ArrayIndexInvoker.patch
> ArrayIndexOutofBounds in the Invoker
> ------------------------------------
>
> Key: SANDESHA2-46
> URL: http://issues.apache.org/jira/browse/SANDESHA2-46
> Project: Apache Sandesha2
> Issue Type: Bug
> Reporter: Andrew Gatford
> Priority: Trivial
> Attachments: ArrayIndexInvoker.patch
>
>
> The following block of code causes an ArrayIndexOutOfBoundsException when the allSequencesList.remove is called with size set to the size of the sequence list
> int size = allSequencesList.size();
> log.debug("Choosing one from " + size + " sequences");
> if(nextIndex >= size) {
> nextIndex = 0;
> if (size == 0) continue;
> }
> String sequenceId = (String) allSequencesList.get(nextIndex++);
> log.debug("Chose sequence " + sequenceId);
> NextMsgBean nextMsgBean = nextMsgMgr.retrieve(sequenceId);
> if (nextMsgBean == null) {
> String message = "Next message not set correctly. Removing invalid entry.";
> log.debug(message);
>
> allSequencesList.remove(size);
> allSequencesList.remove() Should be using the nextIndex key to remove the right element from the list.
--
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: sandesha-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: sandesha-dev-help@ws.apache.org
[jira] Updated: (SANDESHA2-46) ArrayIndexOutofBounds in the Invoker
Posted by "Andrew Gatford (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/SANDESHA2-46?page=all ]
Andrew Gatford updated SANDESHA2-46:
------------------------------------
Attachment: ArrayIndexInvoker.patch
> ArrayIndexOutofBounds in the Invoker
> ------------------------------------
>
> Key: SANDESHA2-46
> URL: http://issues.apache.org/jira/browse/SANDESHA2-46
> Project: Apache Sandesha2
> Issue Type: Bug
> Reporter: Andrew Gatford
> Priority: Trivial
> Attachments: ArrayIndexInvoker.patch
>
>
> The following block of code causes an ArrayIndexOutOfBoundsException when the allSequencesList.remove is called with size set to the size of the sequence list
> int size = allSequencesList.size();
> log.debug("Choosing one from " + size + " sequences");
> if(nextIndex >= size) {
> nextIndex = 0;
> if (size == 0) continue;
> }
> String sequenceId = (String) allSequencesList.get(nextIndex++);
> log.debug("Chose sequence " + sequenceId);
> NextMsgBean nextMsgBean = nextMsgMgr.retrieve(sequenceId);
> if (nextMsgBean == null) {
> String message = "Next message not set correctly. Removing invalid entry.";
> log.debug(message);
>
> allSequencesList.remove(size);
> allSequencesList.remove() Should be using the nextIndex key to remove the right element from the list.
--
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: sandesha-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: sandesha-dev-help@ws.apache.org
[jira] Resolved: (SANDESHA2-46) ArrayIndexOutofBounds in the
Invoker
Posted by "Matt Lovett (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/SANDESHA2-46?page=all ]
Matt Lovett resolved SANDESHA2-46.
----------------------------------
Resolution: Fixed
> ArrayIndexOutofBounds in the Invoker
> ------------------------------------
>
> Key: SANDESHA2-46
> URL: http://issues.apache.org/jira/browse/SANDESHA2-46
> Project: Apache Sandesha2
> Issue Type: Bug
> Reporter: Andrew Gatford
> Priority: Trivial
> Attachments: ArrayIndexInvoker.patch
>
>
> The following block of code causes an ArrayIndexOutOfBoundsException when the allSequencesList.remove is called with size set to the size of the sequence list
> int size = allSequencesList.size();
> log.debug("Choosing one from " + size + " sequences");
> if(nextIndex >= size) {
> nextIndex = 0;
> if (size == 0) continue;
> }
> String sequenceId = (String) allSequencesList.get(nextIndex++);
> log.debug("Chose sequence " + sequenceId);
> NextMsgBean nextMsgBean = nextMsgMgr.retrieve(sequenceId);
> if (nextMsgBean == null) {
> String message = "Next message not set correctly. Removing invalid entry.";
> log.debug(message);
>
> allSequencesList.remove(size);
> allSequencesList.remove() Should be using the nextIndex key to remove the right element from the list.
--
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: sandesha-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: sandesha-dev-help@ws.apache.org
[jira] Commented: (SANDESHA2-46) ArrayIndexOutofBounds in the
Invoker
Posted by "Andrew Gatford (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/SANDESHA2-46?page=comments#action_12453881 ]
Andrew Gatford commented on SANDESHA2-46:
-----------------------------------------
This patch has been applied, but due to an error with my apache id no notification was sent.....
Author: gatfora
Date: Mon Nov 27 02:11:25 2006
New Revision: 479570
URL: http://svn.apache.org/viewvc?view=rev&rev=479570
Log:
Applying patch for SANDESHA2-46
Modified:
webservices/sandesha/trunk/java/src/org/apache/sandesha2/workers/Invoker.java
Modified:
webservices/sandesha/trunk/java/src/org/apache/sandesha2/workers/Invoker.java
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/src/org/apache/sandesha2/workers/Invoker.java?view=diff&rev=479570&r1=479569&r2=479570
==============================================================================
---
webservices/sandesha/trunk/java/src/org/apache/sandesha2/workers/Invoker.java
(original)
+++
webservices/sandesha/trunk/java/src/org/apache/sandesha2/workers/Invoker.java
Mon Nov 27 02:11:25 2006
@@ -20,17 +20,12 @@
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
-import java.util.Random;
-import org.apache.axis2.addressing.AddressingConstants;
import org.apache.axis2.context.ConfigurationContext ;
-import org.apache.axis2.context.MessageContext;
-import org.apache.axis2.engine.AxisEngine;
import org.apache.axis2.util.threadpool.ThreadFactory;
import org.apache.axis2.util.threadpool.ThreadPool;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.apache.sandesha2.RMMsgContext;
import org.apache.sandesha2.Sandesha2Constants;
import org.apache.sandesha2.SandeshaException ;
import org.apache.sandesha2.i18n.SandeshaMessageHelper;
@@ -43,12 +38,9 @@
import org.apache.sandesha2.storage.beans.InvokerBean;
import org.apache.sandesha2.storage.beans.NextMsgBean;
import org.apache.sandesha2.storage.beans.SequencePropertyBean ;
-import org.apache.sandesha2.util.MsgInitializer;
import org.apache.sandesha2.util.Range;
import org.apache.sandesha2.util.RangeString;
import org.apache.sandesha2.util.SandeshaUtil;
-import org.apache.sandesha2.util.TerminateManager ;
-import org.apache.sandesha2.wsrm.Sequence;
/**
* This is used when InOrder invocation is required. This is a seperated
Thread
@@ -442,7 +434,7 @@
String message
= "Next message not set correctly. Removing invalid entry.";
log.debug(message);
-
allSequencesList.remove(size);
+
allSequencesList.remove(nextIndex - 1);
// cleaning
the invalid data of the all sequences.
allSequencesBean.setValue(allSequencesList.toString());
> ArrayIndexOutofBounds in the Invoker
> ------------------------------------
>
> Key: SANDESHA2-46
> URL: http://issues.apache.org/jira/browse/SANDESHA2-46
> Project: Apache Sandesha2
> Issue Type: Bug
> Reporter: Andrew Gatford
> Priority: Trivial
> Attachments: ArrayIndexInvoker.patch
>
>
> The following block of code causes an ArrayIndexOutOfBoundsException when the allSequencesList.remove is called with size set to the size of the sequence list
> int size = allSequencesList.size();
> log.debug("Choosing one from " + size + " sequences");
> if(nextIndex >= size) {
> nextIndex = 0;
> if (size == 0) continue;
> }
> String sequenceId = (String) allSequencesList.get(nextIndex++);
> log.debug("Chose sequence " + sequenceId);
> NextMsgBean nextMsgBean = nextMsgMgr.retrieve(sequenceId);
> if (nextMsgBean == null) {
> String message = "Next message not set correctly. Removing invalid entry.";
> log.debug(message);
>
> allSequencesList.remove(size);
> allSequencesList.remove() Should be using the nextIndex key to remove the right element from the list.
--
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: sandesha-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: sandesha-dev-help@ws.apache.org
[jira] Resolved: (SANDESHA2-46) ArrayIndexOutofBounds in the
Invoker
Posted by "Matt Lovett (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/SANDESHA2-46?page=all ]
Matt Lovett resolved SANDESHA2-46.
----------------------------------
Resolution: Fixed
> ArrayIndexOutofBounds in the Invoker
> ------------------------------------
>
> Key: SANDESHA2-46
> URL: http://issues.apache.org/jira/browse/SANDESHA2-46
> Project: Apache Sandesha2
> Issue Type: Bug
> Reporter: Andrew Gatford
> Priority: Trivial
> Attachments: ArrayIndexInvoker.patch
>
>
> The following block of code causes an ArrayIndexOutOfBoundsException when the allSequencesList.remove is called with size set to the size of the sequence list
> int size = allSequencesList.size();
> log.debug("Choosing one from " + size + " sequences");
> if(nextIndex >= size) {
> nextIndex = 0;
> if (size == 0) continue;
> }
> String sequenceId = (String) allSequencesList.get(nextIndex++);
> log.debug("Chose sequence " + sequenceId);
> NextMsgBean nextMsgBean = nextMsgMgr.retrieve(sequenceId);
> if (nextMsgBean == null) {
> String message = "Next message not set correctly. Removing invalid entry.";
> log.debug(message);
>
> allSequencesList.remove(size);
> allSequencesList.remove() Should be using the nextIndex key to remove the right element from the list.
--
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: sandesha-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: sandesha-dev-help@ws.apache.org
[jira] Commented: (SANDESHA2-46) ArrayIndexOutofBounds in the
Invoker
Posted by "Andrew Gatford (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/SANDESHA2-46?page=comments#action_12453881 ]
Andrew Gatford commented on SANDESHA2-46:
-----------------------------------------
This patch has been applied, but due to an error with my apache id no notification was sent.....
Author: gatfora
Date: Mon Nov 27 02:11:25 2006
New Revision: 479570
URL: http://svn.apache.org/viewvc?view=rev&rev=479570
Log:
Applying patch for SANDESHA2-46
Modified:
webservices/sandesha/trunk/java/src/org/apache/sandesha2/workers/Invoker.java
Modified:
webservices/sandesha/trunk/java/src/org/apache/sandesha2/workers/Invoker.java
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/src/org/apache/sandesha2/workers/Invoker.java?view=diff&rev=479570&r1=479569&r2=479570
==============================================================================
---
webservices/sandesha/trunk/java/src/org/apache/sandesha2/workers/Invoker.java
(original)
+++
webservices/sandesha/trunk/java/src/org/apache/sandesha2/workers/Invoker.java
Mon Nov 27 02:11:25 2006
@@ -20,17 +20,12 @@
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
-import java.util.Random;
-import org.apache.axis2.addressing.AddressingConstants;
import org.apache.axis2.context.ConfigurationContext ;
-import org.apache.axis2.context.MessageContext;
-import org.apache.axis2.engine.AxisEngine;
import org.apache.axis2.util.threadpool.ThreadFactory;
import org.apache.axis2.util.threadpool.ThreadPool;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.apache.sandesha2.RMMsgContext;
import org.apache.sandesha2.Sandesha2Constants;
import org.apache.sandesha2.SandeshaException ;
import org.apache.sandesha2.i18n.SandeshaMessageHelper;
@@ -43,12 +38,9 @@
import org.apache.sandesha2.storage.beans.InvokerBean;
import org.apache.sandesha2.storage.beans.NextMsgBean;
import org.apache.sandesha2.storage.beans.SequencePropertyBean ;
-import org.apache.sandesha2.util.MsgInitializer;
import org.apache.sandesha2.util.Range;
import org.apache.sandesha2.util.RangeString;
import org.apache.sandesha2.util.SandeshaUtil;
-import org.apache.sandesha2.util.TerminateManager ;
-import org.apache.sandesha2.wsrm.Sequence;
/**
* This is used when InOrder invocation is required. This is a seperated
Thread
@@ -442,7 +434,7 @@
String message
= "Next message not set correctly. Removing invalid entry.";
log.debug(message);
-
allSequencesList.remove(size);
+
allSequencesList.remove(nextIndex - 1);
// cleaning
the invalid data of the all sequences.
allSequencesBean.setValue(allSequencesList.toString());
> ArrayIndexOutofBounds in the Invoker
> ------------------------------------
>
> Key: SANDESHA2-46
> URL: http://issues.apache.org/jira/browse/SANDESHA2-46
> Project: Apache Sandesha2
> Issue Type: Bug
> Reporter: Andrew Gatford
> Priority: Trivial
> Attachments: ArrayIndexInvoker.patch
>
>
> The following block of code causes an ArrayIndexOutOfBoundsException when the allSequencesList.remove is called with size set to the size of the sequence list
> int size = allSequencesList.size();
> log.debug("Choosing one from " + size + " sequences");
> if(nextIndex >= size) {
> nextIndex = 0;
> if (size == 0) continue;
> }
> String sequenceId = (String) allSequencesList.get(nextIndex++);
> log.debug("Chose sequence " + sequenceId);
> NextMsgBean nextMsgBean = nextMsgMgr.retrieve(sequenceId);
> if (nextMsgBean == null) {
> String message = "Next message not set correctly. Removing invalid entry.";
> log.debug(message);
>
> allSequencesList.remove(size);
> allSequencesList.remove() Should be using the nextIndex key to remove the right element from the list.
--
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: sandesha-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: sandesha-dev-help@ws.apache.org