1 Reply Latest reply on Mar 1, 2011 3:24 PM by Wolf-Dieter Fink

    org.jboss.util.NestedSQLException

    Joseph Hwang Novice

      When Jboss 5 and Oracle 11g jdbc driver integrated, org.jboss.util.NestedSQLException occurs!

       

      OS : CentOS Linux 5.5

      JDK : JDK 1.5

      JBoss : JBoss 5.0.0.GA

      DB : 예) Oracle 11g

       

      I put ojdbc5.jar file into jboss-5.0.0.GA/common/lib folder and set oracle-ds.xml file like below

       

       

      <datasources>

        <local-tx-datasource>

          <jndi-name>OracleDS</jndi-name>

          <connection-url>jdbc:oracle:thin:@localhost:1521:orcl</connection-url>

          <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>

          <user-name>scott</user-name>

          <password>tiger</password>

          <min-pool-size>2</min-pool-size>

          <max-pool-size>5</max-pool-size>

          <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>

          <metadata>

             <type-mapping>Oracle11g</type-mapping>

          </metadata>

        </local-tx-datasource>

      </datasources>

       

      In JSP file, code is

       

      ctx=new initialContext();

      ds=(DataSource)ctx.lookup("java:/OracleDS");

      con=ds.getConnection();

       

      However, code does net generate connection objects.In Eclipse Console, messages are

       

      10:26:07,923 ERROR [STDERR] org.jboss.util.NestedSQLException: Could not create connection; - nested throwable: (java.sql.SQLException: IO Exception: The Network Adapter could not establish the connection); - nested throwable: (org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (java.sql.SQLException: IO Exception: The Network Adapter could not establish the connection))

      10:26:07,923 ERROR [STDERR]     at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:95)

      10:26:07,923 ERROR [STDERR]     at org.apache.jsp.oracletest_jsp._jspService(oracletest_jsp.java:92)

      10:26:07,923 ERROR [STDERR]     at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)...

       

      Sqlplus of oracle db works well.

       

      I need your advise. Best Regards..