oracle11g - Failed to link oracle/jms/AQjmsGenMessage_C -
i attempting link aq , jboss application using spring jdbc extensions , apache camel. think have spring configuration correct, when run using ojdbc6 , aqapi jar supplied oraclexe installation following error
jbweb000287: exception sending context initialized event listener instance of class org.springframework.web.context.contextloaderlistener: org.springframework.beans.factory.beancreationexception: error creating bean name 'aq' defined in class path resource [camel-config.xml]: cannot resolve reference bean 'connectionfactory' while setting bean property 'connectionfactory'; nested exception org.springframework.beans.factory.beancreationexception: error creating bean name 'connectionfactory': factorybean threw exception on object creation; nested exception java.lang.linkageerror: failed link oracle/jms/aqjmsgenmessage_c
if swap ojdbc6 jar ojdbc14 further. when connection unwrapped not correct version getconnection call. suspect due incompatible libraries, proves might on right lines.
we need keep jndi datasource 3 reasons
- passwords need obtained vault , easier
- as config shows doing additional processing in same database on same connection using hibernate keeping same data connection essential
- we need scale using
jbossdata source management seems logical option.
any ideas on more welcome.
here camel-context , spring config
<?xml version="1.0" encoding="utf-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns:tx="http://www.springframework.org/schema/tx" xmlns:context="http://www.springframework.org/schema/context" xmlns:orcl="http://www.springframework.org/schema/data/orcl" xmlns:jms="http://www.springframework.org/schema/jms" xmlns:camel="http://camel.apache.org/schema/spring" xmlns:jee="http://www.springframework.org/schema/jee" xsi:schemalocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd http://www.springframework.org/schema/data/orcl http://www.springframework.org/schema/data/orcl/spring-data-orcl-1.0.xsd http://www.springframework.org/schema/jms http://www.springframework.org/schema/jms/spring-jms-3.0.xsd http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-3.0.xsd http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd"> <context:annotation-config/> <tx:annotation-driven/> <bean id="aq" class="org.apache.camel.component.jms.jmscomponent"> <property name="connectionfactory" ref="connectionfactory" /> <property name="transactionmanager" ref="transactionmanager" /> </bean> <orcl:aq-jms-connection-factory id="connectionfactory" use-local-data-source-transaction="true" native-jdbc-extractor="jbossnativejdbcextractor" data-source="jbossdatasource" /> <bean id="transactionmanager" class="org.springframework.jdbc.datasource.datasourcetransactionmanager"> <property name="datasource" ref="jbossdatasource"/> </bean> <bean id="jbossnativejdbcextractor" class="org.springframework.jdbc.support.nativejdbc.jbossnativejdbcextractor"/> <jee:jndi-lookup id="jbossdatasource" jndi-name="cipdatasource" /> <camelcontext trace="true" xmlns="http://camel.apache.org/schema/spring"> <route> <from uri="servlet:///in"/> <choice> <when> <header>name</header> <transform> <simple>hello ${header.name} how you?</simple> </transform> </when> <otherwise> <transform> <constant>add name parameter uri, eg ?name=foo</constant> </transform> </otherwise> </choice> </route> <route> <from uri="servlet:///tojms"/> <to pattern="inonly" uri="aq:cip.qstart"/> </route> </camelcontext> </beans> additional info tracing on ojdbc14.jar get
aqjmsdbconnmgr ctor (datasource): enter aqjmsdbconnmgr.getconnection: creating datasource fetching jdbc connection datasource unwrapping jdbc connection of type:org.jboss.jca.adapters.jdbc.jdk6.wrappedconnectionjdk6 using closeable proxy fo jdbc connection [oracle.jdbc.driver.t4cconnection@3ceb975] aqjmsdbconnmgr: constructor (datasource) org.springframework.data.jdbc.config.oracle.aqjmsfactorybeanfactory$transactionawaredatasource@3da8acb9: exception: oracle.jms.aqjmsexception: error creating db_connection oracle.jms.aqjmsexception: error creating db_connection there no trace information ojdbc6.jar application fails start up.
edit2: swapped ojdbc6.jar , noticed war file missing file in web-inf/lib folder. added in , have same situation ojdbc14.jar.
i can run tojms servlet same issue extracting connection via getconnection. relevant section of stacktrace seems be
oracle.jms.aqjmsexception: error creating db_connection @ oracle.jms.aqjmsdbconnmgr.getconnection(aqjmsdbconnmgr.java:625) @ oracle.jms.aqjmsdbconnmgr.<init>(aqjmsdbconnmgr.java:399) @ oracle.jms.aqjmsconnection.<init>(aqjmsconnection.java:249) @ oracle.jms.aqjmsconnectionfactory.createconnection(aqjmsconnectionfactory.java:513) @ org.springframework.jms.support.jmsaccessor.createconnection(jmsaccessor.java:184) @ org.springframework.jms.core.jmstemplate.execute(jmstemplate.java:456) @ org.apache.camel.component.jms.jmsconfiguration$cameljmstemplate.send(jmsconfiguration.java:180) @ org.apache.camel.component.jms.jmsproducer.dosend(jmsproducer.java:355) @ org.apache.camel.component.jms.jmsproducer.processinonly(jmsproducer.java:311) @ org.apache.camel.component.jms.jmsproducer.process(jmsproducer.java:109)
Comments
Post a Comment