Announcement Announcement Module
Collapse
No announcement yet.
Setup of JMS message listener invoker failed Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Setup of JMS message listener invoker failed

    Hi, I am trying to from one ActiveMQ to another and I keep getting the message below. Please help. Thank you.

    04.01.11 20:01:05 (ERROR) Setup of JMS message listener invoker failed - trying to recover
    org.apache.activemq.ConnectionFailedException: The JMS connection has failed: Unknown data type: 47
    at org.apache.activemq.ActiveMQConnection.checkClosed OrFailed(ActiveMQConnection.java:1338)
    at org.apache.activemq.ActiveMQConnection.createSessi on(ActiveMQConnection.java:302)
    at org.springframework.jms.support.JmsAccessor.create Session(JmsAccessor.java:200)
    at org.springframework.jms.listener.AbstractPollingMe ssageListenerContainer.doReceiveAndExecute(Abstrac tPollingMessageListenerContainer.java:292)
    at org.springframework.jms.listener.AbstractPollingMe ssageListenerContainer.receiveAndExecute(AbstractP ollingMessageListenerContainer.java:254)
    at org.springframework.jms.listener.DefaultMessageLis tenerContainer$AsyncMessageListenerInvoker.invokeL istener(DefaultMessageListenerContainer.java:870)
    at org.springframework.jms.listener.DefaultMessageLis tenerContainer$AsyncMessageListenerInvoker.run(Def aultMessageListenerContainer.java:810)
    at java.lang.Thread.run(Thread.java:619)
    Caused by: java.io.IOException: Unknown data type: 47
    at org.apache.activemq.openwire.OpenWireFormat.doUnma rshal(OpenWireFormat.java:356)
    at org.apache.activemq.openwire.OpenWireFormat.unmars hal(OpenWireFormat.java:276)
    at org.apache.activemq.transport.tcp.TcpTransport.rea dCommand(TcpTransport.java:211)
    at org.apache.activemq.transport.tcp.TcpTransport.doR un(TcpTransport.java:203)
    at org.apache.activemq.transport.tcp.TcpTransport.run (TcpTransport.java:186)
    ... 1 more

  • #2
    Simple Google search points to this http://activemq.2283324.n4.nabble.co...td2356674.html
    I think that is what you are looking for.

    Comment


    • #3
      Hi Oleg, I came across that post but I do not know what it really meant. I am new user and the middleware manual that was supplied is not that useful.

      Can you help with the definition below?
      <bean id="activemqLocal" class="org.apache.activemq.camel.component.ActiveM QComponent">
      <property name="connectionFactory">
      <bean class="org.apache.activemq.ActiveMQConnectionFacto ry">
      <property name="brokerURL" value="tcp://localhost:61616?jms.prefetchPolicy.queuePrefetch=0 "/>
      </bean>
      </property>
      <property name="testConnectionOnStartup" value="true" />
      </bean>
      <!--
      !!! DO NOT DELETE THIS ELEMENT (unless you don't want to read from and write to remote ActiveMQ queues) !!!
      Defines the remote ActiveMQ bean. This is needed to establish connections to remote ActiveMQ queues.
      Please change the IP address "10.72.128.23" and the port number "61616" to match your remote ActiveMQ set-up.
      -->

      <bean id="activemqRemote" class="org.apache.activemq.camel.component.ActiveM QComponent">
      <property name="connectionFactory">
      <bean class="org.apache.activemq.ActiveMQConnectionFacto ry">
      <property name="brokerURL" value="tcp://10.128.194.100:61616?jms.maxReconnectAttempts=10&a mp;jms.prefetchPolicy.queuePrefetch=0"/>
      </bean>
      </property>
      <property name="testConnectionOnStartup" value="true" />
      </bean>

      Thank you,

      Freddie

      Comment


      • #4
        The configuration of the two ActiveMQComponent objects looks fine. I'm curious to know if HTTP is involved at all from the client side. Can you elaborate on how the route is initialized and how messages flow?

        Bruce

        Comment


        • #5
          Hi Bruce,

          The setup is like this: a desktop, which serves as the central, and a laptop which serves as the remote. The central issues a request to the remote and the remote replies back via ActiveMq. I monitor this via the admin using a browser.

          Below is the definitions in the context file for both central and remote:
          Central

          .
          .
          .
          <!--
          !!! DO NOT DELETE THIS ELEMENT (unless you don't want to read from and write to local ActiveMQ queues) !!!
          Defines the local ActiveMQ bean. This is needed to establish connections to local ActiveMQ queues.
          value="failover://(tcp://localhost:61616)?maxReconnectAttempts=10"
          -->
          <bean id="activemqLocal" class="org.apache.activemq.camel.component.ActiveM QComponent">
          <property name="connectionFactory">
          <bean class="org.apache.activemq.ActiveMQConnectionFacto ry">
          <property name="brokerURL" value="tcp://localhost:8161?jms.prefetchPolicy.queuePrefetch=0"/>
          </bean>
          </property>
          <property name="testConnectionOnStartup" value="true" />
          </bean>
          <!--
          !!! DO NOT DELETE THIS ELEMENT (unless you don't want to read from and write to remote ActiveMQ queues) !!!
          Defines the remote ActiveMQ bean. This is needed to establish connections to remote ActiveMQ queues.
          Please change the IP address "10.72.128.23" and the port number "61616" to match your remote ActiveMQ set-up.
          -->

          <bean id="activemqRemote" class="org.apache.activemq.camel.component.ActiveM QComponent">
          <property name="connectionFactory">
          <bean class="org.apache.activemq.ActiveMQConnectionFacto ry">
          <property name="brokerURL" value="tcp://10.128.194.151:61616?jms.maxReconnectAttempts=10&a mp;jms.prefetchPolicy.queuePrefetch=0"/>
          </bean>
          </property>
          <property name="testConnectionOnStartup" value="true" />
          </bean>
          .
          .
          .
          <route>
          <from uri="activemqLocal:queue:From.IMREMOTE"/>
          <to uri="bonpc:IMREMOTE@imcentral"/>
          <to uri="file:Middleware/CentralArch/IMREMOTE"/>
          </route>
          <route>
          <from uri="bonpc:IMREMOTE@imcentral"/>
          <to uri="file:Middleware/RemoteArch/IMREMOTE"/>
          <to uri="activemqLocal:queue:To.IMREMOTE"/>
          </route>

          :::::::::::::::::::::::::::::::::::::::::::::::::: :::::::::::::::::::::::::::::::::::::

          REMOTE
          .
          .
          .
          <!--
          !!! DO NOT DELETE THIS ELEMENT (unless you don't want to read from and write to local ActiveMQ queues) !!!
          Defines the local ActiveMQ bean. This is needed to establish connections to local ActiveMQ queues.
          value="tcp://localhost:61616"
          value="failover://(tcp://localhost:61616)?maxReconnectAttempts=10"
          -->
          <bean id="activemqLocal" class="org.apache.activemq.camel.component.ActiveM QComponent">
          <property name="connectionFactory">
          <bean class="org.apache.activemq.ActiveMQConnectionFacto ry">
          <property name="brokerURL" value="tcp://localhost:61616?jms.prefetchPolicy.queuePrefetch=0 "/>
          </bean>
          </property>
          <property name="testConnectionOnStartup" value="true" />
          </bean>
          <!--
          !!! DO NOT DELETE THIS ELEMENT (unless you don't want to read from and write to remote ActiveMQ queues) !!!
          Defines the remote ActiveMQ bean. This is needed to establish connections to remote ActiveMQ queues.
          Please change the IP address "10.72.128.23" and the port number "61616" to match your remote ActiveMQ set-up.
          -->

          <bean id="activemqRemote" class="org.apache.activemq.camel.component.ActiveM QComponent">
          <property name="connectionFactory">
          <bean class="org.apache.activemq.ActiveMQConnectionFacto ry">
          <property name="brokerURL" value="tcp://10.128.194.100:61616?jms.maxReconnectAttempts=10&a mp;jms.prefetchPolicy.queuePrefetch=0"/>
          </bean>
          </property>
          <property name="testConnectionOnStartup" value="true" />
          </bean>
          <!--
          <bean id="activemqRemote" class="org.apache.activemq.camel.component.ActiveM QComponent">
          <property name="connectionFactory">
          <bean class="org.apache.activemq.ActiveMQConnectionFacto ry">
          <property name="brokerURL" value="tcp://10.128.194.98:8161?jms.maxReconnectAttempts=1&amp; jms.prefetchPolicy.queuePrefetch=0"/>
          <property name="userName" value="atvie2\admin" />
          <property name="password" value="exit123"/>
          </bean>
          </property>
          </bean>
          -->
          .
          .
          .
          <route>
          <from uri="activemqRemote:queue:To.IMREMOTE"/>
          <!--from uri="activemqLocal:queue:To.IBP100"/-->
          <to uri="bonpc:IMCENTRAL@imremote"/>
          <to uri="file:Middleware/FrCentralArch"/>
          </route>
          <route>
          <from uri="bonpc:IMCENTRAL@imremote"/>
          <!--to uri="activemqLocal:queue:From.IBP100"/-->
          <to uri="activemqRemote:queue:From.IMREMOTE"/>
          <to uri="file:Middleware/ToCentralArch"/>
          </route>
          :::::::::::::::::::::::::::::::::::::::::::::::::: :::::::::::::::::::::::::::::::::::::
          Thank you,
          Freddie

          Comment


          • #6
            The 'Unknown data type: 47' error is due to the configuration you are using for the following two broker URLs:

            Code:
            <property name="brokerURL" value="tcp://localhost:8161?jms.prefetchPolicy.queuePrefetch=0"/>
            
            <property name="brokerURL" value="tcp://10.128.194.98:8161?jms.maxReconnectAttempts=1&amp; jms.prefetchPolicy.queuePrefetch=0"/>
            The problem is that the port number is incorrect. Port 8161 is where the ActiveMQ web console runs. This explains the error message and stack trace that you're seeing. Whenever you visit the web console for the broker at this address (10.128.194.98:8161) the exception is thrown.

            To fix the problem, change the port number to the port on which the ActiveMQ TCP transport is listening. I hazard a guess that it is probably the default port number of 61616.

            Bruce

            Comment


            • #7
              Hi Bruce,

              I followed your advice and changed the port number. It is working now.

              Thank you and regards,

              Freddie

              Comment

              Working...
              X