Home » Developer & Programmer » JDeveloper, Java & XML » Java AQ library, WebLogic & Connection pools problem
Java AQ library, WebLogic & Connection pools problem [message #92461] Wed, 28 July 2004 14:44 Go to next message
Ryan Daum
Messages: 1
Registered: July 2004
Junior Member
Hello all.

I have been writing a dequeueing agent in Java to pull messages out of an Oracle AQ. I was very successful in pulling it all together and getting it to work.

One of the first things I do is:

aq_sess = AQDriverManager.createAQSession(con);

Where con is my JDBC connection.

This works great _until_ try to switch to using a connection-pooled JDBC connection provided from WebLogic. This is a delegate class that uses RMI to talk to the 'real' connection behind WebLogic's connection pool.

Now when I try to build the session via the factory method above, I get:

oracle.AQ.AQException: JMS-112: Connection is invalid
at oracle.AQ.AQDriverManager.createAQSession(AQDriverManager.java:192)
at com.points.services.integration.conduit.dequeue.DequeueAgent.run(DequeueAgent.java:89)

According to the (sparse) Oracle documentation, JMS-112 occurs when the connection passed in is null. However it is not null, and works great if I run other statements, etc. across it.

I can only assume that the AQDriverManager does not accept a non-Oracle JDBC connection, even if the connection provided ultimately delegates to the Oracle JDBC connection.

Has anybody had this or similar problems? Any suggestions?

Ryan
Re: Java AQ library, WebLogic & Connection pools problem [message #92676 is a reply to message #92461] Fri, 19 November 2004 05:12 Go to previous messageGo to next message
Amit
Messages: 166
Registered: February 1999
Senior Member
I am having the same problem I am using Websphere pooled connection instead Weblogic. Did you figure out the reason why it doesn't work with pooled connection?
Thanks
-Amit
Re: Java AQ library, WebLogic & Connection pools problem [message #92787 is a reply to message #92461] Thu, 20 January 2005 08:06 Go to previous messageGo to next message
Tom Park
Messages: 1
Registered: January 2005
Junior Member
oracle.AQ.AQException: JMS-112: Connection is invalid

to fix this problem, you need to limit the number of jar files that are in your classpath.

All you need is 2 files in the classpath - aqapi.jar and classes12.zip in your classpath.

if you have oracle.jar in your classpath, then you get this JMS-112 error. The classes12.zip also contains a connection.class - you want to use this one, not the one in oracle.jar.

So check the jar files in your classpath.
Re: Java AQ library, WebLogic & Connection pools problem [message #129366 is a reply to message #92787] Sun, 24 July 2005 20:20 Go to previous message
mjmistry
Messages: 1
Registered: July 2005
Junior Member
Perhaps a little late to post on this topic...


I'm getting the same error when using a JNDI registered datasource from a simple java class (outside of any app server).

I only have classes12 in my classpath so I dont believe its caused by the oracle jar.

I can get a connection going if I pass in the host, port, sid etc to getTopicConnectionFactory.

If anyone has a solution then please post.

Thanks
Milan Mistry
Previous Topic: How to access sql*loader using javaprogram
Next Topic: JavaServlets and forms9i
Goto Forum:
  


Current Time: Fri Apr 19 12:48:45 CDT 2024