Message lost due to NullpointerException in TopicConsumerEndpoint.deliverMessages

"A. Schiefke (ancosys)" <[email protected]>
Newsgroups gmane.comp.java.openjms.user
Message-ID <[email protected]>
I have an application with 4 processes on 4 different WinXP-PCs on a 
private network using tcp connectors. The OpenJMS-Server (0.7.6.1) runs 
on one of these PCs. There are less than 10 messages per second. I am 
using a single connection, a single session and single publisher (per 
process). All messages are non persistent. Memory and cpu load of the pc 
hosting the jms-server is very moderate.

The App runs in a production environment for months and it runs fine. No 
messages have got lost - until last friday. Then we experienced a lost 
message. The jms log told me that at the same time two 
NullPointerExceptions were thrown (see below).

I looked up the code of TopicConsumerEndpoint and found the following:

The second Exception (that is not caught regulary) seems to be just a 
follow up error during the error treatment.

The first exception occurs because there is no MessageHandle though the 
method is expecting one. But deliverMessage makes no attempt to verify 
that removeFirstMessage return not null.

Can anybody give me a hint what was going wrong there? Maybe there is 
synchronisation problem between the scheduling thread and the executing 
thread concerning the message cache?

Of course i could make these messages persistent but I am not shure 
whether this really would solve this special kind of problem. Moreover 
there seem to be a strong performance penalty for that.

Any help is appreciated.

40   	2005-08-06	11:16:02	ERROR	[Scheduler-Worker-11] 
messagemgr.TopicConsumerEndpoint	java.lang.NullPointerException
java.lang.NullPointerException
	at 
org.exolab.jms.messagemgr.TopicConsumerEndpoint.deliverMessages(TopicConsumerEndpoint.java:192)
	at 
org.exolab.jms.messagemgr.ConsumerEndpoint.run(ConsumerEndpoint.java:425)
	at 
org.exolab.core.threadPool.ThreadPoolWorker.runIt(ThreadPoolWorker.java:191)
	at 
org.exolab.core.threadPool.ThreadPoolWorker.runWork(ThreadPoolWorker.java:178)
	at 
org.exolab.core.threadPool.ThreadPoolWorker.access$000(ThreadPoolWorker.java:67)
	at 
org.exolab.core.threadPool.ThreadPoolWorker$1.run(ThreadPoolWorker.java:122)
	at java.lang.Thread.run(Thread.java:536)


260  	2005-08-06	11:16:02	ERROR	[Scheduler-Worker-11] 
threadPool.ThreadPoolWorker	Thread Scheduler-Worker-11: uncaught 
exception fell through from run()
java.lang.NullPointerException
	at 
org.exolab.jms.messagemgr.ConsumerEndpoint.addMessage(ConsumerEndpoint.java:670)
	at 
org.exolab.jms.messagemgr.ConsumerEndpoint.returnMessage(ConsumerEndpoint.java:585)
	at 
org.exolab.jms.messagemgr.TopicConsumerEndpoint.deliverMessages(TopicConsumerEndpoint.java:211)
	at 
org.exolab.jms.messagemgr.ConsumerEndpoint.run(ConsumerEndpoint.java:425)
	at 
org.exolab.core.threadPool.ThreadPoolWorker.runIt(ThreadPoolWorker.java:191)
	at 
org.exolab.core.threadPool.ThreadPoolWorker.runWork(ThreadPoolWorker.java:178)
	at 
org.exolab.core.threadPool.ThreadPoolWorker.access$000(ThreadPoolWorker.java:67)
	at 
org.exolab.core.threadPool.ThreadPoolWorker$1.run(ThreadPoolWorker.java:122)
	at java.lang.Thread.run(Thread.java:536)
-- 

Mit freundlichen Grüssen,

Andreas Schiefke
Dr. rer. nat.

ancosys gmbh
Büro Rhein-Ruhr
Gerhard-Hebborn-Str. 31
42699 Solingen

Tel: 0212/38 24 661
Fax: 0212/38 24 662
email: [email protected]



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.