0 Replies Latest reply on Jan 13, 2003 11:59 PM by George Chianese

    Oracle OCI Driver Problem

    George Chianese Newbie

      We are trying to convert from Oracle thin drivers to OCI
      so we can handle BLOBs. We are using JBoss 3.0.4/Tomcat
      4.1.12 bundle, JDK 1.4, Oracle Client 9.2.0.1 and on the
      database machine, Oracle Server 8.1.7. I've tried
      various ways to configure oracle-service.xml. SQLPlus works from the JBoss machine connecting to the Oracle Server.

      Using the Oracle thin driver, this works:

      <config-property name="ConnectionURL" type="java.lang.String">
      jdbc:oracle:thin:@MYHOST:1521:MYSID</config-property>

      Using the Oracle OCI driver with this string:

      <config-property name="ConnectionURL" type="java.lang.String">jdbc:oracle:oci8:@MYALIAS</config-property>

      Or this:

      <config-property name="ConnectionURL" type="java.lang.String">
      jdbc:oracle:oci8:@(description=
      (address=(host=MYYHOST)(protocol=tcp)(port=1521))
      (connect_data=(service_name=MYSID)))</config-property>

      Incidentally, the explicit Net connection string works with the Oracle thin driver also.

      We are getting an error with the OCI driver:

      2003-01-13 22:13:35,206 ERROR [org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand] Exception caught executing SQL
      org.jboss.util.NestedSQLException: Could not create connection; - nested throwable: (java.sql.SQLException: Closed Connection); - nested throwable: (org.jboss.resource.ResourceException: Could not create connection; - nested throwable: (java.sql.SQLException: Closed Connection))
      at org.jboss.resource.adapter.jdbc.local.LocalDataSource.getConnection(LocalDataSource.java:106)
      at org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand.getConnection(JDBCCommand.java:700)

      ...

      Caused by: org.jboss.resource.ResourceException: Could not create connection; - nested throwable: (java.sql.SQLException: Closed Connection)
      at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:144)
      at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnection(InternalManagedConnectionPool.java:259)
      at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:106)
      at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:323)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:467)
      at org.jboss.resource.connectionmanager.LocalTxConnectionManager.getManagedConnection(LocalTxConnectionManager.java:221)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:532)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:814)
      at org.jboss.resource.adapter.jdbc.local.LocalDataSource.getConnection(LocalDataSource.java:102)
      ... 96 more
      Caused by: java.sql.SQLException: Closed Connection
      at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
      at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
      at oracle.jdbc.oci8.OCIDBAccess.check_error(OCIDBAccess.java:2348)
      at oracle.jdbc.oci8.OCIDBAccess.logon(OCIDBAccess.java:477)
      at oracle.jdbc.driver.OracleConnection.(OracleConnection.java:346)
      at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:468)
      at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:314)
      at java.sql.DriverManager.getConnection(DriverManager.java:537)
      at java.sql.DriverManager.getConnection(DriverManager.java:156)
      at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:133)
      ... 104 more


      Any ideas what might be causing this?

      Thanks in advance.