I'm using Weblogic 8.1sp2 with Oracle 8 under Win 2000. Although the thin driver(Type 4) works with WL, somehow the JDBC-ODBC driver coming with JDK 1.4.1_02 doesn't work with it. I'm sure that the connection pool test via the Web console have done successfully.
Unfortunately I've got the following exception from WL when a servlet calls the javax.sql.DataSource#getConnection which connects a DB via the JDBC-ODBC driver, there is no problem with Type 4 though.
java.sql.SQLException: Cannot obtain connection: driverURL = jdbc:weblogicooldbcPool, props = {enableTwoPhaseCommit=false, jdbcTxDataSource=true, connectionPoolID=odbcPool, dataSourceName=MyJDBC-Data-Source}.
Nested Exception: java.lang.IllegalArgumentException: Null keys not supported
at weblogic.utils.collections.WeakConcurrentHashMap.get(WeakConcurrentHashMap.java:189)
at weblogic.utils.wrapper.WrapperFactory.getCachedWrapperClass(WrapperFactory.java:51)
at weblogic.utils.wrapper.WrapperFactory.getWrapperClass(WrapperFactory.java:183)
at weblogic.utils.wrapper.WrapperFactory.getWrapperClass(WrapperFactory.java:171)
at weblogic.jdbc.wrapper.JDBCWrapperFactory.getWrapper(JDBCWrapperFactory.java:146)
at weblogic.jdbc.pool.Driver.allocateConnection(Driver.java:243)
at weblogic.jdbc.pool.Driver.connect(Driver.java:159)
at weblogic.jdbc.jts.Driver.getNonTxConnection(Driver.java:444)
at weblogic.jdbc.jts.Driver.connect(Driver.java:138)
at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:305)
at test.OracleServlet.doGet(OracleServlet.java:48)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:971)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:402)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:305)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6350)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3635)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2585)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
at weblogic.jdbc.jts.Driver.wrapAndThrowSQLException(Driver.java:395)
at weblogic.jdbc.jts.Driver.getNonTxConnection(Driver.java:448)
at weblogic.jdbc.jts.Driver.connect(Driver.java:138)
at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:305)
at test.OracleServlet.doGet(OracleServlet.java:48)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:971)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:402)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:305)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6350)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3635)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2585)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
- Nitta
Unfortunately I've got the following exception from WL when a servlet calls the javax.sql.DataSource#getConnection which connects a DB via the JDBC-ODBC driver, there is no problem with Type 4 though.
java.sql.SQLException: Cannot obtain connection: driverURL = jdbc:weblogicooldbcPool, props = {enableTwoPhaseCommit=false, jdbcTxDataSource=true, connectionPoolID=odbcPool, dataSourceName=MyJDBC-Data-Source}.
Nested Exception: java.lang.IllegalArgumentException: Null keys not supported
at weblogic.utils.collections.WeakConcurrentHashMap.get(WeakConcurrentHashMap.java:189)
at weblogic.utils.wrapper.WrapperFactory.getCachedWrapperClass(WrapperFactory.java:51)
at weblogic.utils.wrapper.WrapperFactory.getWrapperClass(WrapperFactory.java:183)
at weblogic.utils.wrapper.WrapperFactory.getWrapperClass(WrapperFactory.java:171)
at weblogic.jdbc.wrapper.JDBCWrapperFactory.getWrapper(JDBCWrapperFactory.java:146)
at weblogic.jdbc.pool.Driver.allocateConnection(Driver.java:243)
at weblogic.jdbc.pool.Driver.connect(Driver.java:159)
at weblogic.jdbc.jts.Driver.getNonTxConnection(Driver.java:444)
at weblogic.jdbc.jts.Driver.connect(Driver.java:138)
at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:305)
at test.OracleServlet.doGet(OracleServlet.java:48)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:971)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:402)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:305)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6350)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3635)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2585)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
at weblogic.jdbc.jts.Driver.wrapAndThrowSQLException(Driver.java:395)
at weblogic.jdbc.jts.Driver.getNonTxConnection(Driver.java:448)
at weblogic.jdbc.jts.Driver.connect(Driver.java:138)
at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:305)
at test.OracleServlet.doGet(OracleServlet.java:48)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:971)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:402)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:305)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6350)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3635)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2585)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
- Nitta