JMS Bridge ActiveMQ -> WLS 8.1 fails

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

JMS Bridge ActiveMQ -> WLS 8.1 fails

Kay Stanke
Maybe this is just some missconfiguration from my site but ...

I'm trying to use activemq to integrate some c++ code with the j2ee world. My task is to forward messages generated on the c++ side to the JMS of Bea Weblogic 8.1. ActiveMQ is running outside the WLS in a separate process. The startup looks fine as the wls context can be used to get references to the ConnectionFactory and the configured test destination WLSTestQ. On sending a message to the local queue of the bridge i get the following stacktrace:

java.lang.NumberFormatException: For input string: "WLSTESTQ"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
at java.lang.Integer.parseInt(Integer.java:447)
at java.lang.Integer.parseInt(Integer.java:497)
at org.apache.activemq.command.ActiveMQTempDestination.setPhysicalName(ActiveMQTempDestination.java:66)
at org.apache.activemq.command.ActiveMQDestination.<init>(ActiveMQDestination.java:142)
at org.apache.activemq.command.ActiveMQTempDestination.<init>(ActiveMQTempDestination.java:38)
at org.apache.activemq.command.ActiveMQTempQueue.<init>(ActiveMQTempQueue.java:36)
at org.apache.activemq.command.ActiveMQDestination.transform(ActiveMQDestination.java:107)
at org.apache.activemq.command.ActiveMQMessage.setJMSDestination(ActiveMQMessage.java:219)
at weblogic.jms.client.JMSProducer.sendInternal(JMSProducer.java:428)
at weblogic.jms.client.JMSProducer.send(JMSProducer.java:152)
at weblogic.jms.client.JMSProducer.send(JMSProducer.java:215)
at org.apache.activemq.network.jms.QueueBridge.sendMessage(QueueBridge.java:87)
at org.apache.activemq.network.jms.DestinationBridge.onMessage(DestinationBridge.java:134)
at org.apache.activemq.ActiveMQMessageConsumer.dispatch(ActiveMQMessageConsumer.java:840)
at org.apache.activemq.ActiveMQSessionExecutor.dispatch(ActiveMQSessionExecutor.java:96)
at org.apache.activemq.ActiveMQSessionExecutor.iterate(ActiveMQSessionExecutor.java:165)
at org.apache.activemq.thread.DedicatedTaskRunner.runTask(DedicatedTaskRunner.java:88)
at org.apache.activemq.thread.DedicatedTaskRunner.access$000(DedicatedTaskRunner.java:25)
at org.apache.activemq.thread.DedicatedTaskRunner$1.run(DedicatedTaskRunner.java:39)

ERROR DestinationBridge - failed to forward message on attempt: 1
reason: java.lang.NumberFormatException:
For input string: "WLSTESTQ" message:
ActiveMQTextMessage { commandId = 14, responseRequired = false, messageId = ID:KStanke-1523-1167310376227-0:0:1:1:10, originalDestination = null, originalTransactionId = null, producerId = ID:KStanke-1523-1167310376227-0:0:1:1, destination = queue://TEST.FOO, transactionId = null, expiration = 0, timestamp = 1167310385795, arrival = 0, correlationId = null, replyTo = null, persistent = false, type = null, priority = 4, groupID = null, groupSequence = 0, targetConsumerId = null, compressed = false, userID = null, content = null, marshalledProperties = null, dataStructure = null, redeliveryCounter = 0, size = 0, properties = null, readOnlyProperties = true, readOnlyBody = true, droppable = false, text = Message: 9 sent at: Thu Dec 28 13:53:05 CET 2006 [Skipped some blank lines] }

I'm using the message producer from the example to test the routing to wls JMS.

My activemq.xml looks like this:

<beans>

 
  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
 
  <broker brokerName="localhost" useJmx="true" xmlns="http://activemq.org/config/1.0">
    <persistenceAdapter>
 
      <journaledJDBC journalLogFiles="5" dataDirectory="${activemq.base}/data" dataSource="#oracle-ds"/>   
    </persistenceAdapter>
 
    <transportConnectors>
       <transportConnector name="default" uri="tcp://localhost:61616" discoveryUri="multicast://default"/>   
       <transportConnector name="ssl"     uri="ssl://localhost:61617"/>
       <transportConnector name="stomp"   uri="stomp://localhost:61613"/>
    </transportConnectors>
   
    <networkConnectors>
     
      <networkConnector name="default-nc" uri="multicast://default"/>
    </networkConnectors>

    <jmsBridgeConnectors>
     <jmsQueueConnector name="Weblogic Bridge Outbound"
        jndiOutboundTemplate="#remoteJndi"
        outboundQueueConnectionFactoryName="jms/ConnectionFactory"
        localQueueConnectionFactory="#localFactory">
        <outboundQueueBridges>
          <outboundQueueBridge localQueueName="TEST.FOO" outboundQueueName="WLSTESTQ"/>
        </outboundQueueBridges>
      </jmsQueueConnector>
    </jmsBridgeConnectors>

   
  </broker>
 
 
 
  <bean id="remoteJndi" class="org.springframework.jndi.JndiTemplate">
    <property name="environment">
      <props>
        <prop key="java.naming.factory.initial">weblogic.jndi.WLInitialContextFactory</prop>
        <prop key="java.naming.provider.url">t3://127.0.0.1:7001</prop>
      </props>
    </property>
   </bean>
   
  <bean id="localFactory"
   class="org.apache.activemq.ActiveMQConnectionFactory">
    <property name="brokerURL" value="tcp://localhost:61616" />
  </bean>
   
 
 
  <bean id="oracle-ds" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
    <property name="driverClassName" value="oracle.jdbc.driver.OracleDriver"/>
    <property name="url" value="jdbc:oracle:thin:@localhost:1521:GUTSMQ"/>
    <property name="username" value="system"/>
    <property name="password" value="GUTSMQ"/>
    <property name="poolPreparedStatements" value="true"/>
  </bean>
       
 </beans>

I would highly approciate if someone could point me the right direction as i have no clue how to overcome this.