Service Virtualization

Expand all | Collapse all

Required Jars for Connectng to Cassandra DB

Jump to Best Answer
  • 1.  Required Jars for Connectng to Cassandra DB

    Posted 01-30-2020 11:48 PM
    Hi Team,

    Could you please let me know what are the jars do we need to have to Cassandra DB from DevTest Work Station?

    I am getting following error and as of now I am maintaining the following Jars:

    Jars Marinating in iib folder :    cassandra-2.1-2.jdbc41.jar, cassandra-clientutil.jar and cassandra-thrift.jar

    Error:
    java.lang.NoClassDefFoundError: org/apache/thrift/TEnum
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    at org.apache.cassandra.cql.jdbc.Utils.<clinit>(Utils.java:62)
    at org.apache.cassandra.cql.jdbc.CassandraDriver.connect(CassandraDriver.java:85)
    at com.itko.lisa.jdbc.JDBCNode.getConnection(JDBCNode.java:627)
    at com.itko.lisa.jdbc.JDBCNode.executeSQL(JDBCNode.java:370)
    at com.itko.lisa.jdbc.JDBCNodeEditor.doExec(JDBCNodeEditor.java:483)
    at com.itko.lisa.jdbc.JDBCNodeEditor$6.doCallback(JDBCNodeEditor.java:417)
    at com.itko.util.swing.panels.ProcessingDialog$2.run(ProcessingDialog.java:195)
    at java.lang.Thread.run(Thread.java:748)
    Caused by: java.lang.ClassNotFoundException: org.apache.thrift.TEnum
    at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    ... 20 more


    ------------------------------
    Regards,
    Saikiran Garapati
    ------------------------------


  • 2.  RE: Required Jars for Connectng to Cassandra DB
    Best Answer

    Posted 01-31-2020 03:56 AM
    Hi Sai
            Its likely that the class  org/apache/thrift/TEnum  is not defined in any of those 3 Jar files or it could be that the JAR files are not placed at the right location. 

    Please can you confirm where did you place these JAR files ? 

    --
    regards
    Sankar Natarajan