Discussion:
[openjms-developer] [ openjms-Bugs-1058427 ] QueueDestinationCache throws IndexOutOfBoundsException
SourceForge.net
2004-11-01 21:47:25 UTC
Permalink
Bugs item #1058427, was opened at 2004-11-01 16:47
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=474136&aid=1058427&group_id=54559

Category: server
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Dmitri Afanassiev (dmitria)
Assigned to: Nobody/Anonymous (nobody)
Summary: QueueDestinationCache throws IndexOutOfBoundsException

Initial Comment:
03:14:47.605 ERROR [RMI TCP Connection(1027)-
192.168.254.17] - Failed to make message persistent
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.LinkedList.entry(LinkedList.java:343)
at java.util.LinkedList.get(LinkedList.java:286)
at java.util.Collections$SynchronizedList.get
(Collections.java:1323)
at
org.exolab.jms.messagemgr.QueueDestinationCache.getE
ndpointForMessage(QueueDestinationCache.java:459)
at
org.exolab.jms.messagemgr.QueueDestinationCache.persi
stentMessageAdded(QueueDestinationCache.java:384)
at
org.exolab.jms.messagemgr.MessageMgr.notifyOnAddPersi
stentMessage(MessageMgr.java:717)
at
org.exolab.jms.messagemgr.MessageMgr.addPersistentMe
ssage(MessageMgr.java:386)
at org.exolab.jms.messagemgr.MessageMgr.add
(MessageMgr.java:281)
at
org.exolab.jms.server.JmsServerSession.sendMessage
(JmsServerSession.java:350)
at
org.exolab.jms.server.rmi.RmiJmsServerSession.sendMess
age(RmiJmsServerSession.java:174)
at java.lang.reflect.Method.invoke(Native Method)
at sun.rmi.server.UnicastServerRef.dispatch
(UnicastServerRef.java:236)
at sun.rmi.transport.Transport$1.run
(Transport.java:147)
at java.security.AccessController.doPrivileged
(Native Method)
at sun.rmi.transport.Transport.serviceCall
(Transport.java:143)
at
sun.rmi.transport.tcp.TCPTransport.handleMessages
(TCPTransport.java:460)
at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.ru
n(TCPTransport.java:701)
at java.lang.Thread.run(Thread.java:479)

I have system with one QueueSender submitting
thousands of persistent messages to one queue and
several QueueReceiver's retrieving messages from this
queue. Number of receiver's changes time to time (some
connecting and some disconnecting) and sometimes (in
my test it happens between 300k..1M messages) I'm
catching this exception and QueueSender.send() fails. It
looks like problem is in "incomplete" synchronization of
_consumers object. However, additional synchronization
may cause performance degradation and I preferred just
to add special exception handling in
QueueDestinationCache class (reset index to 0 after
such exception, verify size of the list and try again).


----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=474136&aid=1058427&group_id=54559
Loading...