Hi, I can not connect to a connection pool with a datasource. I can connect with the DriverManager.getConnection Method. when I try to connect using the datasource I am getting this error: java.lang.ClassCastException: weblogic.jdbc20.common.internal.RmiDataSource_ServiceStub I am trying to connect from a jsp. This is the jsp code: InitialContext initCtx = null;
Hashtable hashtable = new Hashtable(); hashtable.put("java.naming.factory.initial", "weblogic.jndi.WLInitialContextFactory"); hashtable.put("java.naming.provider.url", _url1); initCtx = new InitialContext(hashtable); javax.sql.ConnectionPoolDataSource ds = (javax.sql.ConnectionPoolDataSource) initCtx.lookup ("myDataSource"); The entry I have in the weblogic properties is: weblogic.jdbc.connectionPool.uidaePool=\ url=jdbc racle:thin:@serv1.line.net:1521:serv,\ driver=oracle.jdbc.driver.OracleDriver,\ initialCapacity=5,\ maxCapacity=20,\ capacityIncrement=1,\ props=user=user;password=pass weblogic.jdbc.TXDataSource.myDataSource1=uidaePool weblogic.allow.reserve.weblogic.jdbc.connectionPool.oraclePool=everyone I am going crazy with this error. If anyone has any idea about why I am getting the error I would really appreciate your input. Thank you, Rosalinde firstname.lastname@example.org
I have seen things you people would not believe, attack ships on fire off the shoulder of Orion, c-beams sparkling in the dark near the Tennhauser Gate. All these moments will be lost in time, like tears in the rain.
Hi Rosalinde, It looks like you are using the oracle drivers. Try instantiating the oracle.jdbc.pool.OracleDataSource object rather than the javax.sql.DataSource. I hope it should work. Cheers, Narendra.