java.lang.ClassCastException: org.apache.cassandra.transport.messages.AuthenticateMessage cannot be cast to org.apache.cassandra.transport.messages.ErrorMessage

DataStax JIRA | Tran Huynh | 4 years ago
  1. 0

    It seems that internal authentication and authorization introduced in 1.2.2 is not yet supported in the Java driver. http://www.datastax.com/docs/1.2/security/native_authentication I tried to make use of the AuthInfoProvider to provide credentials for authenticating with Cassandra 1.2.4 cluster with valid credentials that has read & write permission on the given keyspace as follows: SimpleAuthProvider authProvider = new SimpleAuthProvider(); authProvider.add("user", "password"); Cluster cluster = Cluster.builder() .withAuthInfoProvider(authProvider) .... .build(); But when I execute the code to create this cluster, I get the following exception: java.lang.ClassCastException: org.apache.cassandra.transport.messages.AuthenticateMessage cannot be cast to org.apache.cassandra.transport.messages.ErrorMessage at com.datastax.driver.core.Connection.initializeTransport(Connection.java:157) at com.datastax.driver.core.Connection.<init>(Connection.java:118) at com.datastax.driver.core.Connection.<init>(Connection.java:90) at com.datastax.driver.core.Connection$Factory.open(Connection.java:376) at com.datastax.driver.core.ControlConnection.tryConnect(ControlConnection.java:203) at com.datastax.driver.core.ControlConnection.reconnectInternal(ControlConnection.java:166) at com.datastax.driver.core.ControlConnection.connect(ControlConnection.java:83) at com.datastax.driver.core.Cluster$Manager.<init>(Cluster.java:548) at com.datastax.driver.core.Cluster$Manager.<init>(Cluster.java:533) at com.datastax.driver.core.Cluster.<init>(Cluster.java:65) at com.datastax.driver.core.Cluster.buildFrom(Cluster.java:93) at com.datastax.driver.core.Cluster$Builder.build(Cluster.java:484)

    DataStax JIRA | 4 years ago | Tran Huynh
    java.lang.ClassCastException: org.apache.cassandra.transport.messages.AuthenticateMessage cannot be cast to org.apache.cassandra.transport.messages.ErrorMessage
  2. 0

    It seems that internal authentication and authorization introduced in 1.2.2 is not yet supported in the Java driver. http://www.datastax.com/docs/1.2/security/native_authentication I tried to make use of the AuthInfoProvider to provide credentials for authenticating with Cassandra 1.2.4 cluster with valid credentials that has read & write permission on the given keyspace as follows: SimpleAuthProvider authProvider = new SimpleAuthProvider(); authProvider.add("user", "password"); Cluster cluster = Cluster.builder() .withAuthInfoProvider(authProvider) .... .build(); But when I execute the code to create this cluster, I get the following exception: java.lang.ClassCastException: org.apache.cassandra.transport.messages.AuthenticateMessage cannot be cast to org.apache.cassandra.transport.messages.ErrorMessage at com.datastax.driver.core.Connection.initializeTransport(Connection.java:157) at com.datastax.driver.core.Connection.<init>(Connection.java:118) at com.datastax.driver.core.Connection.<init>(Connection.java:90) at com.datastax.driver.core.Connection$Factory.open(Connection.java:376) at com.datastax.driver.core.ControlConnection.tryConnect(ControlConnection.java:203) at com.datastax.driver.core.ControlConnection.reconnectInternal(ControlConnection.java:166) at com.datastax.driver.core.ControlConnection.connect(ControlConnection.java:83) at com.datastax.driver.core.Cluster$Manager.<init>(Cluster.java:548) at com.datastax.driver.core.Cluster$Manager.<init>(Cluster.java:533) at com.datastax.driver.core.Cluster.<init>(Cluster.java:65) at com.datastax.driver.core.Cluster.buildFrom(Cluster.java:93) at com.datastax.driver.core.Cluster$Builder.build(Cluster.java:484)

    DataStax JIRA | 4 years ago | Tran Huynh
    java.lang.ClassCastException: org.apache.cassandra.transport.messages.AuthenticateMessage cannot be cast to org.apache.cassandra.transport.messages.ErrorMessage
  3. 0

    Scala 2.11.5 and Squeryl?

    Google Groups | 2 years ago | Clint Gilbert
    java.lang.ClassCastException: scala.None$ cannot be cast to
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    adam2vcf

    Google Groups | 8 months ago | someya sayeh
    java.lang.ClassCastException: org.bdgenomics.formats.avro.Fragment cannot be cast to
  6. 0

    Memcached Java客户端2.6.1发布 - 编程语言 - ITeye资讯

    iteye.com | 1 year ago
    java.lang.ClassCastException: cannot be cast to

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.ClassCastException

      org.apache.cassandra.transport.messages.AuthenticateMessage cannot be cast to org.apache.cassandra.transport.messages.ErrorMessage

      at com.datastax.driver.core.Connection.initializeTransport()
    2. DataStax Java Driver for Apache Cassandra - Core
      Cluster$Builder.build
      1. com.datastax.driver.core.Connection.initializeTransport(Connection.java:157)
      2. com.datastax.driver.core.Connection.<init>(Connection.java:118)
      3. com.datastax.driver.core.Connection.<init>(Connection.java:90)
      4. com.datastax.driver.core.Connection$Factory.open(Connection.java:376)
      5. com.datastax.driver.core.ControlConnection.tryConnect(ControlConnection.java:203)
      6. com.datastax.driver.core.ControlConnection.reconnectInternal(ControlConnection.java:166)
      7. com.datastax.driver.core.ControlConnection.connect(ControlConnection.java:83)
      8. com.datastax.driver.core.Cluster$Manager.<init>(Cluster.java:548)
      9. com.datastax.driver.core.Cluster$Manager.<init>(Cluster.java:533)
      10. com.datastax.driver.core.Cluster.<init>(Cluster.java:65)
      11. com.datastax.driver.core.Cluster.buildFrom(Cluster.java:93)
      12. com.datastax.driver.core.Cluster$Builder.build(Cluster.java:484)
      12 frames