[jboss-user] [JBoss Messaging] - java.lang.NullPointerException on JBoss 6 M2
ilango gurusamy
do-not-reply at jboss.com
Fri Apr 9 18:12:53 EDT 2010
ilango gurusamy [http://community.jboss.org/people/ilangocal] created the discussion
"java.lang.NullPointerException on JBoss 6 M2"
To view the discussion, visit: http://community.jboss.org/message/536677#536677
--------------------------------------------------------------
I am trying to deploy 2 MDBs in a standalone XP machine running JBoss 6 M2. I am getting the following exceptions in my server.log
I do have a ejb-jar.xml but I gather I do not need one since I have EJB3, but I do have session beans that are from EJB 2.0.
I have configured an Mysql datasource and necessary queues in the appropriate xml files, but it is apparent I am not doing something right somewhere. How can I solve this problem? Any pointers in resolving this issue are appreciated. Thanks in advance.
The errors are below:
2010-04-09 16:47:20,661 WARN [org.jboss.resource.adapter.jms.inflow.JmsActivation] (pool-1-thread-3) Failure in jms activation org.jboss.resource.adapter.jms.inflow.JmsActivationSpec at 40d447(ra=org.jboss.resource.adapter.jms.JmsResourceAdapter at 967df destination=queue/jissuetrackerLog destinationType=null tx=true durable=false reconnect=10 provider=DefaultJMSProvider user=null maxMessages=1 minSession=1 maxSession=15 keepAlive=30000 useDLQ=true DLQHandler=org.jboss.resource.adapter.jms.inflow.dlq.GenericDLQHandler DLQJndiName=queue/DLQ DLQUser=null DLQMaxResent=10): java.lang.NullPointerException
at org.jboss.jms.client.container.ConnectionAspect.getConnectionState(ConnectionAspect.java:252)
at org.jboss.jms.client.container.ConnectionAspect.handleSetExceptionListener(ConnectionAspect.java:117)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.aop.advice.PerInstanceAdvice.invoke(PerInstanceAdvice.java:122)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:170)
at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:86)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.jms.client.delegate.ClientConnectionDelegate.setExceptionListener(ClientConnectionDelegate.java)
at org.jboss.jms.client.JBossConnection.setExceptionListener(JBossConnection.java:116)
at org.jboss.resource.adapter.jms.inflow.dlq.AbstractDLQHandler.setupDLQConnection(AbstractDLQHandler.java:142)
at org.jboss.resource.adapter.jms.inflow.dlq.AbstractDLQHandler.setup(AbstractDLQHandler.java:83)
at org.jboss.resource.adapter.jms.inflow.dlq.JBossMQDLQHandler.setup(JBossMQDLQHandler.java:48)
at org.jboss.resource.adapter.jms.inflow.JmsActivation.setupDLQ(JmsActivation.java:414)
at org.jboss.resource.adapter.jms.inflow.JmsActivation.setup(JmsActivation.java:352)
at org.jboss.resource.adapter.jms.inflow.JmsActivation$SetupActivation.run(JmsActivation.java:730)
at org.jboss.resource.work.WorkWrapper.run(WorkWrapper.java:172)
at org.jboss.threads.SimpleDirectExecutor.execute(SimpleDirectExecutor.java:33)
at org.jboss.threads.QueueExecutor.runTask(QueueExecutor.java:780)
at org.jboss.threads.QueueExecutor.access$100(QueueExecutor.java:45)
at org.jboss.threads.QueueExecutor$Worker.run(QueueExecutor.java:800)
at java.lang.Thread.run(Thread.java:619)
at org.jboss.threads.JBossThread.run(JBossThread.java:122)
---------------------------------------------------------------------------------------
The following is the code of one of the MDBs. The other MDB's code is similar.
import javax.annotation.Resource;
import javax.ejb.ActivationConfigProperty;
import org.jboss.annotation.ejb.PoolClass;
import org.jboss.ejb3.Container;
@MessageDriven(mappedName="jLog", activationConfig = {
@ActivationConfigProperty(propertyName = "messagingType", propertyValue = "javax.jms.MessageListener"),
@ActivationConfigProperty(propertyName="destinationType", propertyValue="javax.jms.Queue"),
@ActivationConfigProperty(propertyName = "useJNDI", propertyValue = "true"),
@ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge"),
@ActivationConfigProperty (propertyName="maxMessages", propertyValue="10"),
@ActivationConfigProperty (propertyName="minSession", propertyValue="10"),
@ActivationConfigProperty (propertyName="maxSession", propertyValue="10"),
@ActivationConfigProperty (propertyName="destination", propertyValue="queue/jLog"),
@ActivationConfigProperty (propertyName="useDLQ", propertyValue="false")
})
public class LogConsumerBean implements MessageDrivenBean, MessageListener {
public LogConsumerBean() {
}
public void setMessageDrivenContext(MessageDrivenContext mdc) {
}
public void ejbCreate() {
}
public void ejbRemove() {
}
public void onMessage(Message msg) {
ObjectMessage oMessage = (ObjectMessage) msg;
try {
Log log = (Log) oMessage.getObject();
LogServicesImpl logServicesImpl = new LogServicesImpl();
logServicesImpl.logSync(log);
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/536677#536677]
Start a new discussion in JBoss Messaging at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2042]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100409/ce42fe78/attachment.html
More information about the jboss-user
mailing list