0 Replies Latest reply on Aug 8, 2012 4:05 PM by sridharts

    JBoss AS 7.1.0 not working with OCI driver

    sridharts Newbie


        I have Jboss AS 4.05 currently and am migrating to JBoss AS 7.1.0. I installed Jboss7.1.0 and did the setup and everything works fine except the jdbc driver.

      I have downloaded the instantclient from oracle website for oralce 11g (  in C:\ple\instantclient folder which has the ojdbc6.jar and ocijdbc11.dll and other dlls . My oracle database is in a different machine and its the same version( 


      I created a simple java program which does these things and it works fine and returns the results without any error.

             String driverClass = "oracle.jdbc.driver.OracleDriver";

              String connectString = "jdbc:oracle:oci:@sridb:1521:intpl";

              String userName = "myuser";

              String password = "mypass";

               String sql = "select count(id) from mytesttable";



              cont = DriverManager.getConnection(connectString, userName, password);

              Statement stmt =  cont.createStatement(sql);



      But when i do the exact same thing from a jsp inside the Jboss 7.1.0 server it doesnt work and gives a SQLException in DriverManager.getConnection() with no trace or detail message.

      All the detailed message the SQLException had was some 4 wierd square shaped characters and those characters keeps changing too everytime i run it. the jboss log says it deployed jdbc driver


      JBAS010403: Deploying JDBC-compliant driver class oracle.jdbc.OracleDriver (version 11.2)


      This same thing works fine with my Jboss 4.05 server with the oci driver. The other thing i noticed was if i changed the driver to thin in my connectString (jdbc:oracle:thin:@sridb:1521:intpl) it works fine.


      Has anyone encountered this similar issue. Any help in this is appreciated.


      In my jboss standalone.bat i set the classpath and path as


      set CLASSPATH=%CLASSPATH%;C:\ple\instantclient\ojdbc6.jar

      set PATH=C:\ple\instantclient;%PATH%


      In modules folder i created com/myoracle/main folders and copied into it the C:\ple\instantclient\ojdbc6.jar

      also created a dlls folder under main and copied all the dlls from C:\ple\instantclient


      This is how my module.xml looks like


      <?xml version="1.0" encoding="UTF-8"?>

      <module xmlns="urn:jboss:module:1.0" name="com.myoracle">


            <resource-root path="dlls"/>

              <resource-root path="ojdbc6.jar"/>



              <module name="javax.api"/>

              <module name="javax.transaction.api"/>




      In my test.war/WEB-INF this is my jboss-deployment-structure.xml




              <!-- Exclusions allow you to prevent the server from automatically adding some dependencies -->






                                      <module name="com.myoracle" />





      I also tried it with giving a datasource in standalone.xml l and accessing it in my jsp with the datasource name. But get the same issue. It works only if i use thin but not oci.

      <subsystem xmlns="urn:jboss:domain:datasources:1.0">


                      <datasource jta="true" jndi-name="java:/OracleDS" pool-name="OracleDS" enabled="true" use-java-context="true">









                          <driver name="plejdbc" module="com.myoracle">