<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">

<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>

                                <td>

                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="http://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">Community</a></h1>
                                                                </td>

                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px;  -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
    java.lang.NullPointerException on JBoss 6 M2
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="http://community.jboss.org/people/ilangocal">ilango gurusamy</a> in <i>JBoss Messaging</i> - <a href="http://community.jboss.org/message/536677#536677">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p>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</p><p>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.</p><p>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.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>The errors are below:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>2010-04-09 16:47:20,661 WARN&#160; [org.jboss.resource.adapter.jms.inflow.JmsActivation] (pool-1-thread-3) Failure in jms activation org.jboss.resource.adapter.jms.inflow.JmsActivationSpec@40d447(ra=org.jboss.resource.adapter.jms.JmsResourceAdapter@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<br/>&#160;&#160;&#160; at org.jboss.jms.client.container.ConnectionAspect.getConnectionState(ConnectionAspect.java:252)<br/>&#160;&#160;&#160; at org.jboss.jms.client.container.ConnectionAspect.handleSetExceptionListener(ConnectionAspect.java:117)<br/>&#160;&#160;&#160; at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br/>&#160;&#160;&#160; at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)<br/>&#160;&#160;&#160; at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br/>&#160;&#160;&#160; at java.lang.reflect.Method.invoke(Method.java:597)<br/>&#160;&#160;&#160; at org.jboss.aop.advice.PerInstanceAdvice.invoke(PerInstanceAdvice.java:122)<br/>&#160;&#160;&#160; at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)<br/>&#160;&#160;&#160; at org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:170)<br/>&#160;&#160;&#160; at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:86)<br/>&#160;&#160;&#160; at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)<br/>&#160;&#160;&#160; at org.jboss.jms.client.delegate.ClientConnectionDelegate.setExceptionListener(ClientConnectionDelegate.java)<br/>&#160;&#160;&#160; at org.jboss.jms.client.JBossConnection.setExceptionListener(JBossConnection.java:116)<br/>&#160;&#160;&#160; at org.jboss.resource.adapter.jms.inflow.dlq.AbstractDLQHandler.setupDLQConnection(AbstractDLQHandler.java:142)<br/>&#160;&#160;&#160; at org.jboss.resource.adapter.jms.inflow.dlq.AbstractDLQHandler.setup(AbstractDLQHandler.java:83)<br/>&#160;&#160;&#160; at org.jboss.resource.adapter.jms.inflow.dlq.JBossMQDLQHandler.setup(JBossMQDLQHandler.java:48)<br/>&#160;&#160;&#160; at org.jboss.resource.adapter.jms.inflow.JmsActivation.setupDLQ(JmsActivation.java:414)<br/>&#160;&#160;&#160; at org.jboss.resource.adapter.jms.inflow.JmsActivation.setup(JmsActivation.java:352)<br/>&#160;&#160;&#160; at org.jboss.resource.adapter.jms.inflow.JmsActivation$SetupActivation.run(JmsActivation.java:730)<br/>&#160;&#160;&#160; at org.jboss.resource.work.WorkWrapper.run(WorkWrapper.java:172)<br/>&#160;&#160;&#160; at org.jboss.threads.SimpleDirectExecutor.execute(SimpleDirectExecutor.java:33)<br/>&#160;&#160;&#160; at org.jboss.threads.QueueExecutor.runTask(QueueExecutor.java:780)<br/>&#160;&#160;&#160; at org.jboss.threads.QueueExecutor.access$100(QueueExecutor.java:45)<br/>&#160;&#160;&#160; at org.jboss.threads.QueueExecutor$Worker.run(QueueExecutor.java:800)<br/>&#160;&#160;&#160; at java.lang.Thread.run(Thread.java:619)<br/>&#160;&#160;&#160; at org.jboss.threads.JBossThread.run(JBossThread.java:122)</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>---------------------------------------------------------------------------------------</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>The following is the code of one of the MDBs. The other MDB's code is&#160; similar.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>import javax.annotation.Resource;<br/>import javax.ejb.ActivationConfigProperty;<br/>import org.jboss.annotation.ejb.PoolClass;<br/>import org.jboss.ejb3.Container;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>@MessageDriven(mappedName="jLog", activationConfig = {<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; @ActivationConfigProperty(propertyName = "messagingType", propertyValue = "javax.jms.MessageListener"),<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; @ActivationConfigProperty(propertyName="destinationType", propertyValue="javax.jms.Queue"),<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; @ActivationConfigProperty(propertyName = "useJNDI", propertyValue = "true"),<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; @ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge"),<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; @ActivationConfigProperty (propertyName="maxMessages", propertyValue="10"),<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; @ActivationConfigProperty (propertyName="minSession", propertyValue="10"),<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; @ActivationConfigProperty (propertyName="maxSession", propertyValue="10"),<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; @ActivationConfigProperty (propertyName="destination", propertyValue="queue/jLog"),<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; @ActivationConfigProperty (propertyName="useDLQ", propertyValue="false")</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>&#160;&#160;&#160; })</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>public class LogConsumerBean implements MessageDrivenBean, MessageListener {</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>&#160;&#160;&#160; public LogConsumerBean() {<br/>&#160;&#160;&#160; }</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>&#160;&#160;&#160; public void setMessageDrivenContext(MessageDrivenContext mdc) {<br/>&#160;&#160;&#160; }</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>&#160;&#160;&#160; public void ejbCreate() {<br/>&#160;&#160;&#160; }<br/>&#160;&#160;&#160; <br/>&#160;&#160;&#160; public void ejbRemove() {<br/>&#160;&#160;&#160; }</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>&#160;&#160;&#160; public void onMessage(Message msg) {<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; ObjectMessage oMessage = (ObjectMessage) msg;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; try {<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Log log = (Log) oMessage.getObject();<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; LogServicesImpl logServicesImpl = new LogServicesImpl();<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; logServicesImpl.logSync(log);<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; } catch (Exception e) {<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; throw new RuntimeException(e);<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; }<br/>&#160;&#160;&#160; }</p><p><br/>}</p></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Reply to this message by <a href="http://community.jboss.org/message/536677#536677">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in JBoss Messaging at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2042">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>