ActiveMQ 4.0.1 + Oracle ESB?
582987Jun 13 2007 — edited Jun 29 2007Hi All,
I've spent the last few days trying configure the JMS Adapter to consume an ActiveMQ topic on a remote host.
Here's what I've done so far.
I've deployed the required activemq libraries by using the Oracle ant task (publish-shared-library) to the propery deployerURI.
I've installed JDeveloper and coded a ESB Designer Application, which is very simple. All it does is it consumes a message off an ActiveMQ Topic, and routes it to a FileAdapter.
This is very very complex (probably around 20 detailed steps) to get to this point.
I'm trying to use the built in Oracle JMS Adapter's TopicConnectionFactory (eis/Jms/TopicConnectionFactory) and it tries to connect to the topic 5x, and outputs an error:
<SUPPL_DETAIL><![CDATA[ORABPEL-12134
ERRJMS_ERR_CR_TOPIC_CONS.
Error while creating Topic consumer:.
Please examine the log file to determine the problem.
at oracle.tip.adapter.jms.JMS.JMSConnection.createConsumer(JMSConnection.java:461)
at oracle.tip.adapter.jms.JMS.JMSConnection.createConsumer(JMSConnection.java:381)
at oracle.tip.adapter.jms.JMS.JMSMessageConsumer.createConsumer(JMSMessageConsumer.java:272)
at oracle.tip.adapter.jms.JMS.JMSMessageConsumer.init(JMSMessageConsumer.java:213)
at oracle.tip.adapter.jms.inbound.JmsConsumer.init(JmsConsumer.java:154)
at oracle.tip.adapter.jms.JmsEndpoint.run(JmsEndpoint.java:151)
at oracle.j2ee.connector.work.WorkWrapper.runTargetWork(WorkWrapper.java:242)
at oracle.j2ee.connector.work.WorkWrapper.doWork(WorkWrapper.java:215)
at oracle.j2ee.connector.work.WorkWrapper.run(WorkWrapper.java:190)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:819)
at java.lang.Thread.run(Thread.java:595)
Caused by: javax.jms.InvalidDestinationException: Destination cannot be null.
at com.evermind.server.jms.JMSUtils.make(JMSUtils.java:1072)
at com.evermind.server.jms.JMSUtils.toInvalidDestinationException(JMSUtils.java:1134)
at com.evermind.server.jms.EvermindMessageConsumer.<init>(EvermindMessageConsumer.java:66)
at com.evermind.server.jms.EvermindTopicSubscriber.<init>(EvermindTopicSubscriber.java:50)
at com.evermind.server.jms.EvermindTopicSession.createSubscriber(EvermindTopicSession.java:83)
at com.evermind.server.jms.EvermindTopicSession.createSubscriber(EvermindTopicSession.java:74)
at oracle.tip.adapter.jms.JMS.JMSConnection.createConsumer(JMSConnection.java:455)
... 10 more
]]></SUPPL_DETAIL>
Alternatively, I've also tried to modify the oc4j-xml for the jms adapter located here to have a custom entry for ActiveMQ. When I try to do that, I get a no class found error. Here's what I put for my entry:
<connector-factory location="eis/activeMQ/Topic" connector-name="activemq-rar">
<config-property name="connectionFactoryLocation" value="ConnectionFactory"/>
<config-property name="factoryProperties" value="java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory; java.naming.provider.url=tcp://hostname:61616"/>
<config-property name="acknowledgeMode" value="AUTO_ACKNOWLEDGE"/>
<config-property name="isTopic" value="true"/>
<config-property name="isTransacted" value="false"/>
<config-property name="username" value=""/>
<config-property name="password" value=""/>
<connection-pooling use="none">
</connection-pooling>
<security-config use="none">
</security-config>
</connector-factory>
I have confirmed through my SOA Console that my shared library is loaded (containing the proper activemq.rar file)
The error when using this configuration is this:
<PAYLOAD>
<MSG_TEXT>ESB bootstrap: Error occured while initializing ESB server from the ping thread</MSG_TEXT>
<SUPPL_DETAIL><![CDATA[java.lang.NoClassDefFoundError
at org.apache.commons.httpclient.SimpleHttpConnectionManager.getConnectionWithTimeout(SimpleHttpConnectionManager.java:132)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:147)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:437)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:324)
at oracle.tip.esb.server.bootstrap.ESBBaseResourceAdapter$PingTester.ping(Unknown Source)
at oracle.tip.esb.server.bootstrap.ESBBaseResourceAdapter$PingTester.run(Unknown Source)
at oracle.j2ee.connector.work.WorkWrapper.runTargetWork(WorkWrapper.java:242)
at oracle.j2ee.connector.work.WorkWrapper.doWork(WorkWrapper.java:215)
at oracle.j2ee.connector.work.WorkWrapper.run(WorkWrapper.java:190)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:819)
at java.lang.Thread.run(Thread.java:595)
]]></SUPPL_DETAIL>
</PAYLOAD>
Not very useful... as it doesn't say what class isn't found!!
Has anyone been able to configure the JMS Adapter that's part of the Oracle SOA suite to listen to a topic?