0 Replies Latest reply on Apr 17, 2014 4:42 PM by pharbo

    Problem using Sybase jconn4.jar with jboss 7.3 - UnsupportedOperationException on Statement.setMaxRows()

    pharbo

      I have set up a connection pool on a jboss eap6.2 (JBoss AS 7.3 final redhat) as follows

       

         <datasource jndi-name="java:jboss/datasources/sqlDataSource" pool-name="sqlDataSource" enabled="true">

               <connection-url>jdbc:sybase:Tds:133.133.133.133:2222/dbname</connection-url>

               <driver-class>com.sybase.jdbc4.jdbc.SybDriver</driver-class>

               <driver>sybaseDriver</driver>

               <transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>

               <pool>

                  <min-pool-size>1</min-pool-size>

                  <max-pool-size>100</max-pool-size>

                  <prefill>true</prefill>

                </pool>

                <security>

                  <user-name>usernm</user-name>

                  <password>pwwd</password>

                </security>

          </datasource>

         <drivers>

               <driver name="h2" module="com.h2database.h2">

                  <xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>

               </driver>

               <driver name="sybaseDriver" module="com.sybase.sybaseDriver"/>

          </drivers>

       

      and the driver is both in modules/system/layers/base/com/sybase/sybaseDriver/main/jconn4.jar and in standalone/deployments, where it was recognized:

       

      13:25:56,428 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015876: Starting deployment of "jconn4.jar" (runtime-name: "jconn4.jar")

      13:25:56,466 INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-7) JBAS010404: Deploying non-JDBC-compliant driver class com.sybase.jdbc4.jdbc.SybDriver (version 7.0)

      13:25:56,717 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 1) JBAS018559: Deployed "jconn4.jar" (runtime-name : "jconn4.jar")

       

      When I use the setMaxRows() method of the Statement object, it throws an UnsupportedOperationException, yet I can use this when I write a command-line interface

      test program compiled and run with jdk 1.7 and jconn4.jar in the command search path.  Also, statement.close() will cause the application to hang, while in the command-line

      test it does not.  I have checked with connection.getMetaData and it seems to be using the jConnect driver - has anyone encountered anything like this?