ServiceMix
  1. ServiceMix
  2. SM-2151

java.lang.ClassCastException: org.apache.activemq.command.ActiveMQTempQueue cannot be cast to org.apache.activemq.command.Message

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Blocker Blocker
    • Resolution: Unresolved
    • Affects Version/s: 3.3.1
    • Fix Version/s: 3.4.2
    • Component/s: servicemix-jms
    • Labels:
    • Environment:

      Linux 2.6.18-274.el5 #1 SMP Fri Jul 8 17:36:59 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux

      Description

      I am using 'amq:jdbcPersistenceAdapter' in the activemq.xml. I get the following error when sending messages to the queue-
      ava.lang.ClassCastException: org.apache.activemq.command.ActiveMQTempQueue cannot be cast to org.apache.activemq.command.Message
              at org.apache.activemq.store.jdbc.JDBCMessageStore$2.recoverMessage(JDBCMessageStore.java:234)
              at org.apache.activemq.store.jdbc.adapter.DefaultJDBCAdapter.doRecoverNextMessages(DefaultJDBCAdapter.java:722)
              at org.apache.activemq.store.jdbc.JDBCMessageStore.recoverNextMessages(JDBCMessageStore.java:230)
              at org.apache.activemq.store.ProxyMessageStore.recoverNextMessages(ProxyMessageStore.java:83)
              at org.apache.activemq.broker.region.cursors.QueueStorePrefetch.doFillBatch(QueueStorePrefetch.java:75)
              at org.apache.activemq.broker.region.cursors.AbstractStoreCursor.fillBatch(AbstractStoreCursor.java:227)
              at org.apache.activemq.broker.region.cursors.AbstractStoreCursor.reset(AbstractStoreCursor.java:100)
              at org.apache.activemq.broker.region.cursors.StoreQueueCursor.reset(StoreQueueCursor.java:157)
              at org.apache.activemq.broker.region.Queue.doPageIn(Queue.java:1179)
              at org.apache.activemq.broker.region.Queue.addSubscription(Queue.java:237)
              at org.apache.activemq.broker.region.AbstractRegion.addConsumer(AbstractRegion.java:275)
              at org.apache.activemq.broker.region.RegionBroker.addConsumer(RegionBroker.java:372)
              at org.apache.activemq.broker.BrokerFilter.addConsumer(BrokerFilter.java:86)
              at org.apache.activemq.broker.BrokerFilter.addConsumer(BrokerFilter.java:86)
              at org.apache.activemq.advisory.AdvisoryBroker.addConsumer(AdvisoryBroker.java:83)
              at org.apache.activemq.broker.BrokerFilter.addConsumer(BrokerFilter.java:86)
              at org.apache.activemq.broker.MutableBrokerFilter.addConsumer(MutableBrokerFilter.java:93)
              at org.apache.activemq.broker.TransportConnection.processAddConsumer(TransportConnection.java:541)
              at org.apache.activemq.command.ConsumerInfo.visit(ConsumerInfo.java:345)
              at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:305)
              at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:179)
              at org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:68)
              at org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:143)
              at org.apache.activemq.transport.InactivityMonitor.onCommand(InactivityMonitor.java:206)
              at org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:84)
              at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:203)
              at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:185)
              at java.lang.Thread.run(Thread.java:662)

      --activemq.xml
      <amq:persistenceAdapter>
      <amq:jdbcPersistenceAdapter dataSource="#hub-ds"/>
      </amq:persistenceAdapter>

      <bean class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close" id="hub-ds">
      <property name="driverClassName" value="org.postgresql.Driver"/>
      <property name="url" value="jdbc:postgresql://localhost:5507/test"/>
      <property name="username" value="test"/>
      <property name="password" value="test"/>
      <property name="poolPreparedStatements" value="true"/>
      </bean>

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Unassigned
            Reporter:
            Kruttik Aggarwal
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Development