Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: AQDriverManager.createAQSession(conn) FAILS
I managed to solve this myself.
The classpath contained two versions of the same .jar file. I "just" had to figure out which of them that was incorrect and remove it from the classpath.
Thanks,
Jess
"languy" <languy_at_online.stofanet.dk> wrote in message
news:41e3a810$0$22691$d40e179e_at_nntp04.dk.telia.net...
> Hey there,
>
> I'm trying to implement a Java class, which should create an Oracle AQ
> Queue, but unfortunately it fails and I don't have clue why.
>
> -- code snip --
>
> Class.forName("oracle.jdbc.pool.OracleConnectionCacheImpl").newInstance();
> conn =
>
DriverManager.getConnection("jdbc:oracle:thin:@host:1521:sid","user","passwd
> ");
> conn.setAutoCommit(false);
> stmt = conn.createStatement();
>
> Class.forName("oracle.AQ.AQOracleDriver").newInstance();
> aqSession = AQDriverManager.createAQSession(conn); // FAILS
> // ...
> } finally { // Line 80
> try { stmt.close(); } catch (Exception ex) { }
> try { conn.close(); } catch (Exception ex) { }
> }
> -- code snip --
>
> When the createAQSession method is invocated the debugger goes directly to
> the finally block and gives the error messages listed in the snip below.
>
> -- error snip --
> Exception breakpoint occurred at line 80 of PA.java.
> java.lang.NoSuchMethodError: java.util.Dictionary
> oracle.jdbc.OracleConnection.getTypeMap()
> java.lang.NoSuchMethodError: java.util.Dictionary
> oracle.jdbc.OracleConnection.getTypeMap()
> void oracle.AQ.AQOracleSession.<init>(java.sql.Connection)
> AQOracleSession.java:96
> oracle.AQ.AQSession
> oracle.AQ.AQOracleDriver.createAQSession(java.lang.Object)
> AQOracleDriver.java:67
> oracle.AQ.AQSession
> oracle.AQ.AQDriverManager.createAQSession(java.lang.Object)
> AQDriverManager.java:183
> void dk.dr.kgf.adapters.bcr.PA.execute(java.lang.String,
java.lang.String)
> PA.java:59
> void dk.dr.kgf.adapters.bcr.PA.main(java.lang.String[])
> PA.java:99
> -- error snip --
>
> I hope any one can help me with this issue as soon as possible.
>
> Thanks in regards,
> Jess
>
>
Received on Tue Jan 11 2005 - 07:35:19 CST
![]() |
![]() |