JBoss 2.4.6 Database Persistence Manager Error message
sundaram Jul 2, 2003 12:24 PMI am trying to use MySQL for Persistence messages. JBoss is starting with out any problem, but when I send a message. I am getting following error message.
Any help
jboss.jcml
=======
<!-- ==================================================================== -->
<!-- JBossMQ -->
<!-- ==================================================================== -->
<!-- The StateManager is used to keep JMS perisitent state data. -->
<!-- For example: what durable subscriptions are active. -->
jbossmq-state.xml
<!-- The PersistenceManager is used to store messages to disk. -->
<!--
../../db/jbossmq/
-->
<!-- The PersistenceManager is used to store messages to Database -->
java:/DefaultDS
<!-- InvocationLayers are the different transport methods that can be used to access the server -->
java:/ConnectionFactory
java:/XAConnectionFactory
RMIConnectionFactory
RMIXAConnectionFactory
ConnectionFactory
XAConnectionFactory
UILConnectionFactory
UILXAConnectionFactory
<!-- The following three line create 3 topics named: testTopic, example, and bob -->
<!--
-->
<!-- The following 9 line create 9 topics named: testQueue, controlQueue, A, B, -->
<!-- C, D, E, F, and ex -->
<!--
-->
<!-- Used for backwards compatability with JBossMQ versions before 1.0.0 -->
ConnectionFactory
QueueConnectionFactory
ConnectionFactory
TopicConnectionFactory
<!-- For Message Driven Beans -->
DefaultJMSProvider
org.jboss.jms.jndi.JBossMQProvider
java:/XAConnectionFactory
java:/XAConnectionFactory
StdJMSPool
org.jboss.jms.asf.StdServerSessionPoolFactory
server.log
=======
[12:12:15,653,OILClientIL] ConnectionReceiverOILClient is connecting to: 192.168.1.140:4645
[12:12:15,823,OILServerILService] Client request resulted in a server exception:
java.lang.NullPointerException
at org.jboss.mq.server.BasicQueue.addMessage(BasicQueue.java:330)
at org.jboss.mq.server.PersistentQueue.addMessage(PersistentQueue.java:39)
at org.jboss.mq.server.JMSQueue.addMessage(JMSQueue.java:100)
at org.jboss.mq.server.JMSServer.addMessage(JMSServer.java:280)
at org.jboss.mq.server.JMSServer.addMessage(JMSServer.java:265)
at org.jboss.mq.il.oil.OILServerILService.run(OILServerILService.java:254)
at java.lang.Thread.run(Thread.java:536)
[12:12:16,744,OILServerILService] Connection failure (1).
java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:168)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:183)
at java.io.BufferedInputStream.read(BufferedInputStream.java:201)
at java.io.ObjectInputStream$PeekInputStream.peek(ObjectInputStream.java:2133)
at java.io.ObjectInputStream$BlockDataInputStream.readBlockHeader(ObjectInputStream.java:2316)
at java.io.ObjectInputStream$BlockDataInputStream.refill(ObjectInputStream.java:2383)
at java.io.ObjectInputStream$BlockDataInputStream.read(ObjectInputStream.java:2455)
at java.io.ObjectInputStream$BlockDataInputStream.readByte(ObjectInputStream.java:2604)
at java.io.ObjectInputStream.readByte(ObjectInputStream.java:845)
at org.jboss.mq.il.oil.OILServerILService.run(OILServerILService.java:220)
at java.lang.Thread.run(Thread.java:536)
spy.log
=====
1057162194329|0|0|rollback||
1057162194480|10|0|statement|select id from jms_transactions|select id from jms_transactions
1057162194480|0|0|rollback||
1057162194490|10|0|statement|select messageblob, messageid from jms_messages where destination = ?|select messageblob, messageid from jms_messages where destination = 'DLQ'
1057162194490|0|0|rollback||
1057162194490|0|0|statement|select messageblob, messageid from jms_messages where destination = ?|select messageblob, messageid from jms_messages where destination = 'testQueue'
1057162194490|0|0|rollback||
1057162335783|0|0|statement|insert into jms_messages (messageid, destination, messageblob) VALUES(?,?,?)|insert into jms_messages (messageid, destination, messageblob) VALUES('-8000000000000000','testQueue','java.io.ByteArrayInputStream@8ab08f')
1057162335793|10|0|rollback||
Client Error Message:
==============
org.jboss.mq.SpyJMSException: Cannot send a message to the JMS server
at org.jboss.mq.Connection.sendToServer(Connection.java:670)
at org.jboss.mq.SpySession.sendMessage(SpySession.java:478)
at org.jboss.mq.SpyQueueSender.send(SpyQueueSender.java:103)
at org.jboss.mq.SpyQueueSender.send(SpyQueueSender.java:69)
at com.jms.SendMsg.main(SendMsg.java:66)
linked exception is:
java.lang.NullPointerException
at org.jboss.mq.server.BasicQueue.addMessage(BasicQueue.java:330)
at org.jboss.mq.server.PersistentQueue.addMessage(PersistentQueue.java:39)
at org.jboss.mq.server.JMSQueue.addMessage(JMSQueue.java:100)
at org.jboss.mq.server.JMSServer.addMessage(JMSServer.java:280)
at org.jboss.mq.server.JMSServer.addMessage(JMSServer.java:265)
at org.jboss.mq.il.oil.OILServerILService.run(OILServerILService.java:254)
at java.lang.Thread.run(Thread.java:536)
linked exception is:
java.lang.NullPointerException
at org.jboss.mq.server.BasicQueue.addMessage(BasicQueue.java:330)
at org.jboss.mq.server.PersistentQueue.addMessage(PersistentQueue.java:39)
at org.jboss.mq.server.JMSQueue.addMessage(JMSQueue.java:100)
at org.jboss.mq.server.JMSServer.addMessage(JMSServer.java:280)
at org.jboss.mq.server.JMSServer.addMessage(JMSServer.java:265)
at org.jboss.mq.il.oil.OILServerILService.run(OILServerILService.java:254)
at java.lang.Thread.run(Thread.java:536)
Exception in thread "main"
Client program:
===========
package com.jms;
import java.util.*;
import java.rmi.*;
import javax.naming.*;
import javax.jms.*;
public class SendMsg {
public SendMsg() {
}
public static void main(String[] args) throws Exception {
// Populate with needed properties
Hashtable props = new Hashtable();
props.put(Context.INITIAL_CONTEXT_FACTORY,
"org.jnp.interfaces.NamingContextFactory");
props.put(Context.PROVIDER_URL, "localhost:1099");
props.put("java.naming.rmi.security.manager", "yes");
props.put(Context.URL_PKG_PREFIXES, "org.jboss.naming");
// Get the initial context with given properties
Context context = new InitialContext(props);
// Get the connection factory
QueueConnectionFactory queueFactory =
(QueueConnectionFactory) context.lookup("QueueConnectionFactory");
// Create the connection
QueueConnection queueConnection = queueFactory.createQueueConnection();
// Create the session
QueueSession queueSession = queueConnection.createQueueSession(
// No transaction
false,
// Auto ack
Session.AUTO_ACKNOWLEDGE);
// Look up the destination
Queue queue = (Queue) context.lookup("queue/testQueue");
// Create a sender
QueueSender queueSender = queueSession.createSender(queue);
for (int i = 1; i < 100; i++) {
String msg = "Hello world : "+1;
// Create a message
TextMessage message = queueSession.createTextMessage();
message.setText(msg);
// Send the message
queueSender.send(queue, message);
}
queueConnection.close();
System.out.println("Done.");
}
}