In our application we have a table IOA_WORKFLOW_QUEUE_TYPE. This table holds the queue type. This is not static data, and can be modified by service or interfaces.
This data is also used by the clients (.NET). There is no way the clients can come to know about this change, without being updated about this change.
We are using aqapi.jar to create an oracle listener on this table. Any change on this table will be notified to a queue which in turn can trigger an action to update all the clients connected at that time with the new data.
In our hibernate configuration, we have an oracle data source, which we wish to replace with C3PO data source. On changing the configuration to C3PO data source, this listener functionality breaks to connect to oracle data base and the problem seems like the data source type. The following exception is noticed with it tries to connect to the data base.
[Linked-exception]
oracle.jms.AQjmsException: JMS-112: Connection is invalid
at oracle.jms.AQjmsError.throwEx(AQjmsError.java:288)
at oracle.jms.AQjmsDBConnMgr.extraInit(AQjmsDBConnMgr.java:782)
at oracle.jms.AQjmsDBConnMgr.getConnection(AQjmsDBConnMgr.java:588)
at oracle.jms.AQjmsDBConnMgr.<init>(AQjmsDBConnMgr.java:387)
at oracle.jms.AQjmsConnection.<init>(AQjmsConnection.java:247)
at oracle.jms.AQjmsConnectionFactory.createConnection(AQjmsConnectionFactory.java:398)
at org.springframework.jms.core.JmsTemplate.createConnection(JmsTemplate.java:457)
at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:573)
at org.springframework.jms.core.JmsTemplate.receive(JmsTemplate.java:760)
at org.springframework.jms.core.JmsTemplate.receive(JmsTemplate.java:747)
at com.rbsfm.ice.ioa.jms.listner.AQListener.receiveMessage(AQListener.java:168)
at com.rbsfm.ice.ioa.jms.listner.WorkflowChangeAQListener.run(WorkflowChangeAQListener.java:89)
at java.lang.Thread.run(Unknown Source)
We are using the following configuration with oracle with which is works fine
<bean id="dataSource" class="oracle.jdbc.pool.OracleDataSource" destroy-method="close">
<property name="driverType" value="thin" />
<property name="serverName" value="@db.host.one@" />
<property name="serviceName" value="@db.service.name@" />
When we replace the data source to :
<bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close">
<property name="driverClass" value="oracle.jdbc.OracleDriver"/>
<property name="jdbcUrl" value="@db.url@"/>
<property name="user" value="@db.user@"/>
<property name="password" value="@db.password@"/>
</bean>
It fails to work.
Please suggest, if you have faced this problem and any workaround that is applicable.
Hibernate version:hibernate3-patched.jar
[b]Mapping documents:
Code between sessionFactory.openSession() and session.close():
[b]Full stack trace of any exception that occurs:
Exception in thread "com.rbsfm.ice.ioa.jms.listner.WorkflowChangeAQListener" org.springframework.jms.UncategorizedJmsException: Uncategorized exception occured during JMS processing; nested exception is oracle.jms.AQjmsException: Error creating the db_connection; nested exception is oracle.jms.AQjmsException: Error creating the db_connection
oracle.jms.AQjmsException: Error creating the db_connection
at oracle.jms.AQjmsDBConnMgr.getConnection(AQjmsDBConnMgr.java:613)
at oracle.jms.AQjmsDBConnMgr.<init>(AQjmsDBConnMgr.java:387)
at oracle.jms.AQjmsConnection.<init>(AQjmsConnection.java:247)
at oracle.jms.AQjmsConnectionFactory.createConnection(AQjmsConnectionFactory.java:398)
at org.springframework.jms.core.JmsTemplate.createConnection(JmsTemplate.java:457)
at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:573)
at org.springframework.jms.core.JmsTemplate.receive(JmsTemplate.java:760)
at org.springframework.jms.core.JmsTemplate.receive(JmsTemplate.java:747)
at com.rbsfm.ice.ioa.jms.listner.AQListener.receiveMessage(AQListener.java:168)
at com.rbsfm.ice.ioa.jms.listner.WorkflowChangeAQListener.run(WorkflowChangeAQListener.java:89)
at java.lang.Thread.run(Unknown Source)
[Linked-exception]
oracle.jms.AQjmsException: JMS-112: Connection is invalid
at oracle.jms.AQjmsError.throwEx(AQjmsError.java:288)
at oracle.jms.AQjmsDBConnMgr.extraInit(AQjmsDBConnMgr.java:782)
at oracle.jms.AQjmsDBConnMgr.getConnection(AQjmsDBConnMgr.java:588)
at oracle.jms.AQjmsDBConnMgr.<init>(AQjmsDBConnMgr.java:387)
at oracle.jms.AQjmsConnection.<init>(AQjmsConnection.java:247)
at oracle.jms.AQjmsConnectionFactory.createConnection(AQjmsConnectionFactory.java:398)
at org.springframework.jms.core.JmsTemplate.createConnection(JmsTemplate.java:457)
at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:573)
at org.springframework.jms.core.JmsTemplate.receive(JmsTemplate.java:760)
at org.springframework.jms.core.JmsTemplate.receive(JmsTemplate.java:747)
at com.rbsfm.ice.ioa.jms.listner.AQListener.receiveMessage(AQListener.java:168)
at com.rbsfm.ice.ioa.jms.listner.WorkflowChangeAQListener.run(WorkflowChangeAQListener.java:89)
at java.lang.Thread.run(Unknown Source)
[b]Name and version of the database you are using: Oracle 10g
|