2 Replies Latest reply on Dec 1, 2004 2:10 PM by Chris Johnston

    Cannot create a ConnectionReceiver

    Paul Marchant Newbie

      Hello all,

      I am working on a JBoss application where I have a single statefull session bean that is communicating directly with several different jms topics. The app will work fine for about 500 messages and then produce the following exception. It does not recover after the exception is thrown.

      I have searched for this on this forum and come up empty handed. (I also searched on Google and couldn't find anything).

      Any suggestions? If you need more info, just shout.

      Thanks.

      P.S. the notifyRead() method does a subscriber.receive() on a message topic.


      22:52:19,838 INFO [STDOUT] DMF_Interface_Bean.notifyRead(): JMSException org.jboss.mq.SpyJMSException: Cannot create a ConnectionReceiver; - nested throwable: (java.lang.NullPointerException)
      22:52:19,838 INFO [STDOUT] org.jboss.mq.SpyJMSException: Cannot create a ConnectionReceiver; - nested throwable: (java.lang.NullPointerException)
      22:52:19,840 INFO [STDOUT] at org.jboss.mq.Connection.receive(Connection.java:961)
      22:52:19,840 INFO [STDOUT] at org.jboss.mq.SpyMessageConsumer.receive(SpyMessageConsumer.java:289)
      22:52:19,840 INFO [STDOUT] at ca.gc.ec.dmf.glue.DMF_Interface_Bean.notifyRead(Unknown Source)
      22:52:19,840 INFO [STDOUT] at sun.reflect.GeneratedMethodAccessor64.invoke(Unknown Source)
      22:52:19,840 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      22:52:19,840 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:324)
      22:52:19,842 INFO [STDOUT] at org.jboss.ejb.StatefulSessionContainer$ContainerInterceptor.invoke(StatefulSessionContainer.java:949)
      22:52:19,842 INFO [STDOUT] at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:120)
      22:52:19,842 INFO [STDOUT] at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185)
      22:52:19,842 INFO [STDOUT] at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84)

        • 1. Re: Cannot create a ConnectionReceiver
          Elias Ross Master


          I don't know which version you're on, but I don't know what line 961 in Connection.java might refer to. Can you also enable trace loggin for this particular file and repro?

          • 2. Re: Cannot create a ConnectionReceiver
            Chris Johnston Newbie

            Here is a little more information regarding the error that we are receiving (listed above).

            JBoss version: 3.2.5
            Datasource for JMS: Postgres 7.2
            Persistance manager: PostgreSQL-JDBC3
            JBoss Memory: Default

            JMS Details: We have about 10 topics (Pub/Sub) that each have a minimum of 2 and a maximum of 3 durable subscribers connected to each topic. Each topic only has 1 publisher.

            Details: All of the topics are being accessed through a stateless session bean. There are two methods in the bean; 1 for reading and 1 for writing. When the bean is created, a connection is created and when the bean is removed, so is the connection.

            Within both the write and the read method a session is created along with the required subscriber/publisher. Once the bean has read/written the message, the subscriber/publisher and the session are closed.

            In addition, in the read and write method, the connection is started and stopped.

            We are able to put ~800 messages into the system. These messages start at one topic and slowly move through the system, moving from topic to topic. Each message is replicated on each topic and is only removed when all subscribers have received the message. The time taken to put ~800 messages onto the first topic is about 2-3 minutes.

            After ~800 messages are placed on the first topic, we start to get the Exception listed above. This seems to continue for about 100 messages and then things smooth out and we can put another 1000 messages through the system without any problems.

            Below is the JBoss log file with the first instance of the JMSException:

            2004-12-01 16:45:09,715 DEBUG [org.jboss.util.NestedThrowable] org.jboss.util.NestedThrowable.nestedTraceEnabled=false
            2004-12-01 16:45:09,716 DEBUG [org.jboss.util.NestedThrowable] org.jboss.util.NestedThrowable.detectDuplicateNesting=true
            2004-12-01 16:45:09,717 INFO [STDOUT] notifyRead():clientID=ca.gc.ec.dmf.pdb.IngesterDecoded,topicName=topic/RWINdecoded:JMSException5org.jboss.mq.SpyJMSException: Cannot create a ConnectionReceiver; - nested throwable: (java.lang.NullPointerException)
            2004-12-01 16:45:09,718 INFO [STDOUT] org.jboss.mq.SpyJMSException: Cannot create a ConnectionReceiver; - nested throwable: (java.lang.NullPointerException)
            2004-12-01 16:45:09,719 INFO [STDOUT] at org.jboss.mq.Connection.receive(Connection.java:961)
            2004-12-01 16:45:09,719 INFO [STDOUT] at org.jboss.mq.SpyMessageConsumer.receive(SpyMessageConsumer.java:289)
            2004-12-01 16:45:09,719 INFO [STDOUT] at ca.gc.ec.dmf.glue.DMF_Interface_Bean.notifyRead(Unknown Source)
            2004-12-01 16:45:09,719 INFO [STDOUT] at sun.reflect.GeneratedMethodAccessor77.invoke(Unknown Source)
            2004-12-01 16:45:09,720 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            2004-12-01 16:45:09,720 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:324)
            2004-12-01 16:45:09,720 INFO [STDOUT] at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:683)
            2004-12-01 16:45:09,721 INFO [STDOUT] notifyRead: Successfully created subscriber
            2004-12-01 16:45:09,721 INFO [STDOUT] at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185)
            2004-12-01 16:45:09,721 INFO [STDOUT] notifyRead:clientID=RWINAlertQC,topicName=topic/RWINqc
            2004-12-01 16:45:09,721 INFO [STDOUT] at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84)
            2004-12-01 16:45:09,721 INFO [STDOUT] at org.jboss.ejb.plugins.AbstractTxInterceptorBMT.invokeNext(AbstractTxInterceptorBMT.java:144)
            2004-12-01 16:45:09,722 INFO [STDOUT] at org.jboss.ejb.plugins.TxInterceptorBMT.invoke(TxInterceptorBMT.java:62)
            2004-12-01 16:45:09,722 INFO [STDOUT] at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:72)
            2004-12-01 16:45:09,722 INFO [STDOUT] at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:120)
            2004-12-01 16:45:09,722 INFO [STDOUT] at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
            2004-12-01 16:45:09,723 INFO [STDOUT] at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
            


            I am not sure how to enable a Trace, so if this would be helpful, please include a link to instructions on how to do this.

            In addition, some links to best practices for creating JMS applications and the load/performance specs for JBossMQ would also be helpful. So far, all of the examples that I have found for using JBossMQ have been trivial and do not really relate to what we are trying to do.

            Questions I would like to know answer to:
            1. How many messages across how many topics can JBossMQ reasonably be expected to handle?
            2. For the above question, what is the size of these messages?
            3. How does increasing the size of a message affect the overall performance?
            4. How many messages can you persist across topics using Hypesonic?
            5. Has anyone successfully used JBoss, JBossMQ and PostgreSQL to implement a high demand (several message per second forever) / high load (several thousand message at once) application?

            In addition, I have been looking for answers to the above questions across the web for several days now and can not find them anywhere. And the JBoss documentation is more concerned with configuration then implementation, however, it does not really mention what you should do and what you should not do and what you should and should not expect out of the various components.