3 Replies Latest reply on Sep 20, 2013 2:57 AM by tomjenkinson

    Cassandra datasource in AS 7.1.1 - incompactibility between JBOSS and Cassandra JDBC driver

    jrcheenu

      Hi  I am trying to configure the datasource for cassandra in JBOSS as 7.1.1. Datasource get created and established the connection, but when PreparedStatement is issued, it throws following exception.

       

      [[  java.sql.SQLFeatureNotSupportedException  [[  the Cassandra implementation does not support this methodjava.sql.SQLFeatureNotSupportedException: the Cassandra implementation does not support this method

        at org.apache.cassandra.cql.jdbc.CassandraConnection.prepareStatement(CassandraConnection.java:365)

        at org.jboss.jca.adapters.jdbc.BaseWrapperManagedConnection.doPrepareStatement(BaseWrapperManagedConnection.java:677)

        at org.jboss.jca.adapters.jdbc.BaseWrapperManagedConnection.prepareStatement(BaseWrapperManagedConnection.java:663)

        at org.jboss.jca.adapters.jdbc.WrappedConnection.prepareStatement(WrappedConnection.java:404)

       

      On going thru code, i could see the cassandra dont supports preparestatment for a type and concurrency.

        public PreparedStatement prepareStatement(String arg0, int arg1, int arg2) throws SQLException

          {

              throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);

          }

       

       

          public PreparedStatement prepareStatement(String arg0, int arg1, int arg2, int arg3) throws SQLException

          {

              throw new SQLFeatureNotSupportedException(NOT_SUPPORTED);

          }

       

      But Jboss JCA adaptor org.jboss.jca.adapters.jdbc.WrappedConnection

      by default call the invoke the these unsupported method.

       

      Is there any way to get around it with configuration changes.

      Thanks

      sean-u