Hi I would ask Oracle how to use Spring JMS with their the JMS broker. That is essential what you are doing. The stacktrace looks like some version mismatch. eg what version of Spring does the Oracle JMS broker support.
On Mon, Feb 8, 2010 at 10:27 AM, Francesco Malvezzi <[email protected]> wrote: > I was trying to connect to a Oracle Advanced Queue with camel according > to the doc at: > > http://activemq.apache.org/jms-bridge-with-oracle-aq.html > (the dsl of my route follows) > > The queue has been created on OAS with data type SYS.AQ$_JMS_MESSAGE and > enqueing and dequeueing activated. > > As soon as I send a message (from activemq web frontend), I receive: > > 2010-02-08 10:02:07,755 | WARN | Execution of JMS message listener > failed | > org.springframework.jms.listener.DefaultMessageListenerContainer | > DefaultMessageListenerContainer-1 > java.lang.AbstractMethodError: > oracle.jms.AQjmsQueueConnectionFactory.createConnection(Ljava/lang/String;Ljava/lang/String;)Ljavax/jms/Connection; > at > org.springframework.jms.connection.UserCredentialsConnectionFactoryAdapter.doCreateConnection(UserCredentialsConnectionFactoryAdapter.java:174) > at > org.springframework.jms.connection.UserCredentialsConnectionFactoryAdapter.createConnection(UserCredentialsConnectionFactoryAdapter.java:149) > at > org.springframework.jms.support.JmsAccessor.createConnection(JmsAccessor.java:184) > [... many more ...] > > I think I'm missing something. > > First of all, which jar should be copied in /lib directory? From howto I > read aqapi13.jar, but in oracle relese I find many more: > aqapi11_g.jar > aqapi12.jar > aqapi_g.jar > aqapi11.jar > aqapi13_g.jar > aqapi.jar > aqapi12_g.jar > aqapi13.jar > which one do I choose (oracle version is 9.0.2.0.40)? > > then: are other jar necessary (oc4j, for instance, I believe not, but I > have no idea)? > > Actually docs describes reading messages from a OAS queue, while I'm > writing. Does it make any difference? > > Just for reference, I attach my camel route (inside apache activemq 5.3): > > <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring"> > <route> > <from uri="atcm:oracle.to"/> > <to uri="oracle:CORRELA_FROM"/> > </route> > </camelContext> > > <bean id="atcm" > class="org.apache.activemq.camel.component.ActiveMQComponent" > > <property name="connectionFactory"> > <bean class="org.apache.activemq.ActiveMQConnectionFactory"> > <property name="brokerURL" > value="vm://localhost?create=false&waitForStart=10000" /> > <property name="userName" value="${activemq.username}"/> > <property name="password" value="${activemq.password}"/> > </bean> > </property> > </bean> > > <bean id="requiredBeanForOracleAq" > class="org.apache.activemq.ActiveMQConnectionFactory" /> > > <bean id="connectionFactoryOracleAQQueue" > class="oracle.jms.AQjmsFactory" factory-method="getQueueConnectionFactory"> > <constructor-arg index="0"> > > <value>jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=my_ip)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=my_db)(SERVER=DEDICATED)))</value> > </constructor-arg> > <constructor-arg index="1" type="java.util.Properties"> > <value></value> > </constructor-arg> > </bean> > > <bean id="oracleQueueCredentials" > class="org.springframework.jms.connection.UserCredentialsConnectionFactoryAdapter"> > <property name="targetConnectionFactory" > ref="connectionFactoryOracleAQQueue" /> > <property name="username"> > <value>super</value> > </property> > <property name="password"> > <value>secret</value> > </property> > </bean> > > <bean id="oracle" class="org.apache.camel.component.jms.JmsComponent"> > <property name="connectionFactory" ref="oracleQueueCredentials" /> > </bean> > </beans> > > Can you please point me to other docs? > > Thank you for your help! > > Francesco > -- Claus Ibsen Apache Camel Committer Author of Camel in Action: http://www.manning.com/ibsen/ Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus
