Error 'java.lang.NoSuchFieldError: EOF_TOKEN'

747 views
Skip to first unread message

Arun Chaitanya

unread,
Feb 3, 2015, 2:21:49 AM2/3/15
to cassandra-...@googlegroups.com
Hello people,

This error happens on running JUnit Test Case. When I debug, I understand that the error occurs at CFMetaData.IndexCf.compile();


java.lang.NoClassDefFoundError: Could not initialize class org.apache.cassandra.config.DatabaseDescriptor
at org.cassandraunit.utils.EmbeddedCassandraServerHelper.dropKeyspaces(EmbeddedCassandraServerHelper.java:152)
at org.cassandraunit.utils.EmbeddedCassandraServerHelper.cleanEmbeddedCassandra(EmbeddedCassandraServerHelper.java:148)
at org.cassandraunit.spring.AbstractCassandraUnitTestExecutionListener.cleanServer(AbstractCassandraUnitTestExecutionListener.java:103)
at org.cassandraunit.spring.CassandraUnitTestExecutionListener.afterTestMethod(CassandraUnitTestExecutionListener.java:23)
at org.springframework.test.context.TestContextManager.afterTestMethod(TestContextManager.java:416)
at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:91)
at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:233)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:87)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:71)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:176)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)


My dependency list in pom.xml

  <dependencies>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-webmvc</artifactId>
      <version>4.0.6.RELEASE</version>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-tx</artifactId>
      <version>4.0.6.RELEASE</version>
    </dependency>
    <dependency>
      <groupId>com.netflix.astyanax</groupId>
      <artifactId>astyanax</artifactId>
      <version>2.0.1</version>
      <exclusions>
        <exclusion>
          <groupId>org.slf4j</groupId>
          <artifactId>slf4j-log4j12</artifactId>
        </exclusion>
        <exclusion>
          <groupId>javax.servlet</groupId>
          <artifactId>servlet-api</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.apache.httpcomponents</groupId>
          <artifactId>httpclient</artifactId>
        </exclusion>
        <exclusion><!-- exclude this because we already use another version -->
          <groupId>junit</groupId>
          <artifactId>junit</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.apache.cassandra</groupId>
     <artifactId>cassandra-all</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>com.datastax.cassandra</groupId>
      <artifactId>cassandra-driver-core</artifactId>
      <version>2.1.4</version>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.11</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-test</artifactId>
      <version>4.0.6.RELEASE</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.esotericsoftware</groupId>
      <artifactId>kryo-shaded</artifactId>
      <version>3.0.0</version>
    </dependency>
    <dependency>
      <groupId>de.javakaffee</groupId>
      <artifactId>kryo-serializers</artifactId>
      <version>0.27</version>
    </dependency>
    <dependency>
      <groupId>org.cassandraunit</groupId>
      <artifactId>cassandra-unit-spring</artifactId>
      <version>2.0.2.2</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
     <groupId>org.springframework</groupId>
     <artifactId>spring-context</artifactId>
        </exclusion>
        <exclusion>
          <groupId>com.datastax.cassandra</groupId>
          <artifactId>cassandra-driver-core</artifactId>
        </exclusion>
        <exclusion>
            <artifactId>cassandra-all</artifactId>
            <groupId>org.apache.cassandra</groupId>
        </exclusion>
        <exclusion>
            <groupId>com.datastax.cassandra</groupId>
            <artifactId>cassandra-driver-core</artifactId>
        </exclusion>
        <exclusion>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
        </exclusion>
        </exclusions>
    </dependency>
    <dependency>
    <groupId>org.apache.cassandra</groupId>
        <artifactId>cassandra-all</artifactId>
        <version>2.0.5</version>
    </dependency>
  </dependencies>


My test code is default, but anyways, I will dump here:

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = "classpath:servlet-context.xml")
@TestExecutionListeners({ CassandraUnitTestExecutionListener.class })
@CassandraDataSet(value = { "simple.cql" })
@EmbeddedCassandra
public class CassandraUnitTest {

    @Test
    public void testInProcessCassandraServer()
            throws UnsupportedEncodingException, InvalidRequestException,
            UnavailableException, TimedOutException, TException,
            NotFoundException {
        Cluster cluster = Cluster.builder()
                .addContactPoints("127.0.0.1")
                .withPort(9142)
                .build();
        Session session = cluster.connect("cassandra_unit_keyspace");

        ResultSet result = session.execute("select * from mytable WHERE id='myKey01'");
        assertThat(result.iterator().next().getString("value"), is("myValue01"));
    }


Any help is appreciated!

Arun

Nate McCall

unread,
Feb 3, 2015, 10:44:47 AM2/3/15
to cassandra-...@googlegroups.com
What's the output of:

mvn dependency:tree -Dverbose -Dincludes=cassandra-all

Could be that the java driver and cassandra-all are butting heads.

There have been a bunch of classpath hiesenbugs recently with guava as
well, maybe try the above again with that transitive dependency.
> --
> Vous recevez ce message, car vous êtes abonné au groupe Google Groupes
> "cassandra-unit-users".
> Pour vous désabonner de ce groupe et ne plus recevoir d'e-mails le
> concernant, envoyez un e-mail à l'adresse
> cassandra-unit-u...@googlegroups.com.
> Pour obtenir davantage d'options, consultez la page
> https://groups.google.com/d/optout.

Arun Chaitanya

unread,
Feb 4, 2015, 11:16:41 PM2/4/15
to cassandra-...@googlegroups.com
Hey thanks,

The error was conflicting antlr-runtime library.

Now I have a new error.

me.prettyprint.hector.api.exceptions.HectorException: All host pools marked down. Retry burden pushed out to client.
at me.prettyprint.cassandra.connection.HConnectionManager.getClientFromLBPolicy(HConnectionManager.java:390)
at me.prettyprint.cassandra.connection.HConnectionManager.operateWithFailover(HConnectionManager.java:244)
at me.prettyprint.cassandra.service.AbstractCluster.describeKeyspaces(AbstractCluster.java:136)
at org.cassandraunit.utils.EmbeddedCassandraServerHelper.dropKeyspaces(EmbeddedCassandraServerHelper.java:157)
at org.cassandraunit.utils.EmbeddedCassandraServerHelper.cleanEmbeddedCassandra(EmbeddedCassandraServerHelper.java:148)
at org.cassandraunit.spring.AbstractCassandraUnitTestExecutionListener.cleanServer(AbstractCassandraUnitTestExecutionListener.java:103)
at org.cassandraunit.spring.CassandraUnitTestExecutionListener.afterTestMethod(CassandraUnitTestExecutionListener.java:23)
at org.springframework.test.context.TestContextManager.afterTestMethod(TestContextManager.java:297)
at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:90)
at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:73)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:217)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:83)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:68)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:163)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)


As you can see that this happens when executing afterTestMethod.
Any ideas on this?

Thanks


--
Vous recevez ce message car vous êtes abonné à un sujet dans le groupe Google Groupes "cassandra-unit-users".
Pour vous désabonner de ce sujet, visitez le site https://groups.google.com/d/topic/cassandra-unit-users/Daa-VIoKP5M/unsubscribe.
Pour vous désabonner de ce groupe et de tous ses sujets, envoyez un e-mail à l'adresse cassandra-unit-u...@googlegroups.com.
Pour plus d'options, visitez le site https://groups.google.com/d/optout .

Arun Chaitanya

unread,
Feb 4, 2015, 11:31:32 PM2/4/15
to cassandra-...@googlegroups.com
Hey I forgot to add Console Log.

12:27:48.793 [main] DEBUG o.c.u.EmbeddedCassandraServerHelper - Cleaning cassandra keyspaces on localhost:9160
12:27:48.824 [main] INFO  m.p.c.c.CassandraHostRetryService - Downed Host Retry service started with queue size -1 and retry delay 10s
12:27:48.826 [main] INFO  m.p.cassandra.service.JmxMonitor - Registering JMX me.prettyprint.cassandra.service_TestCluster:ServiceType=hector,MonitorType=hector
12:27:48.834 [main] DEBUG m.p.c.c.client.HThriftClient - Creating a new thrift connection to localhost(127.0.0.1):9160
12:27:48.836 [main] DEBUG m.p.c.c.client.HThriftClient - Creating a new thrift connection to localhost(127.0.0.1):9160
12:27:48.836 [main] DEBUG m.p.c.c.client.HThriftClient - Creating a new thrift connection to localhost(127.0.0.1):9160
12:27:48.837 [main] DEBUG m.p.c.c.client.HThriftClient - Creating a new thrift connection to localhost(127.0.0.1):9160
12:27:48.837 [main] DEBUG m.p.c.c.client.HThriftClient - Creating a new thrift connection to localhost(127.0.0.1):9160
12:27:48.837 [main] DEBUG m.p.c.c.client.HThriftClient - Creating a new thrift connection to localhost(127.0.0.1):9160
12:27:48.837 [main] DEBUG m.p.c.c.client.HThriftClient - Creating a new thrift connection to localhost(127.0.0.1):9160
12:27:48.838 [main] DEBUG m.p.c.c.client.HThriftClient - Creating a new thrift connection to localhost(127.0.0.1):9160
12:27:48.839 [main] DEBUG m.p.c.c.client.HThriftClient - Creating a new thrift connection to localhost(127.0.0.1):9160
12:27:48.840 [main] DEBUG m.p.c.c.client.HThriftClient - Creating a new thrift connection to localhost(127.0.0.1):9160
12:27:48.841 [main] DEBUG m.p.c.c.client.HThriftClient - Creating a new thrift connection to localhost(127.0.0.1):9160
12:27:48.842 [main] DEBUG m.p.c.c.client.HThriftClient - Creating a new thrift connection to localhost(127.0.0.1):9160
12:27:48.842 [main] DEBUG m.p.c.c.client.HThriftClient - Creating a new thrift connection to localhost(127.0.0.1):9160
12:27:48.842 [main] DEBUG m.p.c.c.client.HThriftClient - Creating a new thrift connection to localhost(127.0.0.1):9160
12:27:48.843 [main] DEBUG m.p.c.c.client.HThriftClient - Creating a new thrift connection to localhost(127.0.0.1):9160
12:27:48.843 [main] DEBUG m.p.c.c.client.HThriftClient - Creating a new thrift connection to localhost(127.0.0.1):9160
12:27:48.843 [main] DEBUG m.p.c.c.ConcurrentHClientPool - Concurrent Host pool started with 16 active clients; max: 50 exhausted wait: 0
12:27:48.941 [Service Thread] DEBUG o.a.cassandra.service.GCInspector - PS Scavenge GC in 16ms.  PS Eden Space: 262132864 -> 0; PS Old Gen: 12287344 -> 15184472; PS Survivor Space: 0 -> 18854656
12:27:48.942 [Service Thread] DEBUG o.a.cassandra.service.GCInspector - PS MarkSweep GC in 68ms.  Compressed Class Space: 4378256 -> 4377512; Metaspace: 35890448 -> 35889008; PS Old Gen: 15184472 -> 25295912; PS Survivor Space: 18854656 -> 0
12:27:48.956 [main] DEBUG m.p.c.c.client.HThriftClient - Closing client CassandraClient<localhost:9160-1>
12:27:48.962 [main] ERROR m.p.c.connection.HConnectionManager - MARK HOST AS DOWN TRIGGERED for host localhost(127.0.0.1):9160
12:27:48.962 [main] ERROR m.p.c.connection.HConnectionManager - Pool state on shutdown: <ConcurrentCassandraClientPoolByHost>:{localhost(127.0.0.1):9160}; IsActive?: true; Active: 1; Blocked: 0; Idle: 15; NumBeforeExhausted: 49
12:27:48.962 [main] INFO  m.p.c.c.ConcurrentHClientPool - Shutdown triggered on <ConcurrentCassandraClientPoolByHost>:{localhost(127.0.0.1):9160}
12:27:48.964 [main] DEBUG m.p.c.c.client.HThriftClient - Closing client CassandraClient<localhost:9160-10>
12:27:48.965 [main] DEBUG m.p.c.c.client.HThriftClient - Closing client CassandraClient<localhost:9160-15>
12:27:48.965 [main] DEBUG m.p.c.c.client.HThriftClient - Closing client CassandraClient<localhost:9160-16>
12:27:48.965 [main] DEBUG m.p.c.c.client.HThriftClient - Closing client CassandraClient<localhost:9160-2>
12:27:48.965 [main] DEBUG m.p.c.c.client.HThriftClient - Closing client CassandraClient<localhost:9160-11>
12:27:48.965 [main] DEBUG m.p.c.c.client.HThriftClient - Closing client CassandraClient<localhost:9160-5>
12:27:48.965 [main] DEBUG m.p.c.c.client.HThriftClient - Closing client CassandraClient<localhost:9160-3>
12:27:48.965 [main] DEBUG m.p.c.c.client.HThriftClient - Closing client CassandraClient<localhost:9160-4>
12:27:48.965 [main] DEBUG m.p.c.c.client.HThriftClient - Closing client CassandraClient<localhost:9160-13>
12:27:48.965 [main] DEBUG m.p.c.c.client.HThriftClient - Closing client CassandraClient<localhost:9160-12>
12:27:48.965 [main] DEBUG m.p.c.c.client.HThriftClient - Closing client CassandraClient<localhost:9160-14>
12:27:48.966 [main] DEBUG m.p.c.c.client.HThriftClient - Closing client CassandraClient<localhost:9160-9>
12:27:48.966 [main] DEBUG m.p.c.c.client.HThriftClient - Closing client CassandraClient<localhost:9160-6>
12:27:48.966 [main] DEBUG m.p.c.c.client.HThriftClient - Closing client CassandraClient<localhost:9160-7>
12:27:48.966 [main] DEBUG m.p.c.c.client.HThriftClient - Closing client CassandraClient<localhost:9160-8>
12:27:48.966 [main] INFO  m.p.c.c.ConcurrentHClientPool - Shutdown complete on <ConcurrentCassandraClientPoolByHost>:{localhost(127.0.0.1):9160}
12:27:48.966 [main] INFO  m.p.c.c.CassandraHostRetryService - Host detected as down was added to retry queue: localhost(127.0.0.1):9160
12:27:48.967 [main] WARN  m.p.c.connection.HConnectionManager - Could not fullfill request on this host CassandraClient<localhost:9160-1>
12:27:48.968 [main] WARN  m.p.c.connection.HConnectionManager - Exception: 
me.prettyprint.hector.api.exceptions.HectorTransportException: org.apache.thrift.transport.TTransportException
at me.prettyprint.cassandra.service.ExceptionsTranslatorImpl.translate(ExceptionsTranslatorImpl.java:39) ~[hector-core-1.1-4.jar:na]
at me.prettyprint.cassandra.service.AbstractCluster$1.execute(AbstractCluster.java:132) ~[hector-core-1.1-4.jar:na]
at me.prettyprint.cassandra.service.AbstractCluster$1.execute(AbstractCluster.java:126) ~[hector-core-1.1-4.jar:na]
at me.prettyprint.cassandra.service.Operation.executeAndSetResult(Operation.java:104) ~[hector-core-1.1-4.jar:na]
at me.prettyprint.cassandra.connection.HConnectionManager.operateWithFailover(HConnectionManager.java:253) ~[hector-core-1.1-4.jar:na]
at me.prettyprint.cassandra.service.AbstractCluster.describeKeyspaces(AbstractCluster.java:136) [hector-core-1.1-4.jar:na]
at org.cassandraunit.utils.EmbeddedCassandraServerHelper.dropKeyspaces(EmbeddedCassandraServerHelper.java:157) [cassandra-unit-2.0.2.2.jar:na]
at org.cassandraunit.utils.EmbeddedCassandraServerHelper.cleanEmbeddedCassandra(EmbeddedCassandraServerHelper.java:148) [cassandra-unit-2.0.2.2.jar:na]
at com.worksap.company.access.testCassandraUnit.end(testCassandraUnit.java:42) [test-classes/:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_20]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_20]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_20]
at java.lang.reflect.Method.invoke(Method.java:483) ~[na:1.8.0_20]
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) [junit-4.11.jar:na]
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) [junit-4.11.jar:na]
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) [junit-4.11.jar:na]
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:33) [junit-4.11.jar:na]
at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:68) [spring-test-4.1.2.RELEASE.jar:4.1.2.RELEASE]
at org.junit.runners.ParentRunner.run(ParentRunner.java:309) [junit-4.11.jar:na]
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:163) [spring-test-4.1.2.RELEASE.jar:4.1.2.RELEASE]
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50) [.cp/:na]
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) [.cp/:na]
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459) [.cp/:na]
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675) [.cp/:na]
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382) [.cp/:na]
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192) [.cp/:na]
Caused by: org.apache.thrift.transport.TTransportException: null
at org.apache.thrift.transport.TIOStreamTransport.read(TIOStreamTransport.java:132) ~[libthrift-0.7.0.jar:0.7.0]
at org.apache.thrift.transport.TTransport.readAll(TTransport.java:84) ~[libthrift-0.7.0.jar:0.7.0]
at org.apache.thrift.transport.TFramedTransport.readFrame(TFramedTransport.java:129) ~[libthrift-0.7.0.jar:0.7.0]
at org.apache.thrift.transport.TFramedTransport.read(TFramedTransport.java:101) ~[libthrift-0.7.0.jar:0.7.0]
at org.apache.thrift.transport.TTransport.readAll(TTransport.java:84) ~[libthrift-0.7.0.jar:0.7.0]
at org.apache.thrift.protocol.TBinaryProtocol.readAll(TBinaryProtocol.java:378) ~[libthrift-0.7.0.jar:0.7.0]
at org.apache.thrift.protocol.TBinaryProtocol.readI32(TBinaryProtocol.java:297) ~[libthrift-0.7.0.jar:0.7.0]
at org.apache.thrift.protocol.TBinaryProtocol.readMessageBegin(TBinaryProtocol.java:204) ~[libthrift-0.7.0.jar:0.7.0]
at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:69) ~[libthrift-0.7.0.jar:0.7.0]
at org.apache.cassandra.thrift.Cassandra$Client.recv_describe_keyspaces(Cassandra.java:1076) ~[cassandra-thrift-1.2.11.jar:2.1.0]
at org.apache.cassandra.thrift.Cassandra$Client.describe_keyspaces(Cassandra.java:1064) ~[cassandra-thrift-1.2.11.jar:2.1.0]
at me.prettyprint.cassandra.service.AbstractCluster$1.execute(AbstractCluster.java:130) ~[hector-core-1.1-4.jar:na]
... 24 common frames omitted
12:27:48.970 [main] INFO  m.p.c.connection.HConnectionManager - Client CassandraClient<localhost:9160-1> released to inactive or dead pool. Closing.
12:27:48.970 [main] DEBUG m.p.c.c.client.HThriftClient - Closing client CassandraClient<localhost:9160-1>
12:27:48.970 [Thrift:1] ERROR o.a.c.service.CassandraDaemon - Exception in thread Thread[Thrift:1,5,main]
java.lang.NoSuchMethodError: org.apache.cassandra.thrift.CfDef.setMin_index_interval(I)Lorg/apache/cassandra/thrift/CfDef;
at org.apache.cassandra.config.CFMetaData.toThrift(CFMetaData.java:1337) ~[cassandra-all-2.1.0.jar:2.1.0]
at org.apache.cassandra.config.KSMetaData.toThrift(KSMetaData.java:195) ~[cassandra-all-2.1.0.jar:2.1.0]
at org.apache.cassandra.thrift.CassandraServer.describe_keyspace(CassandraServer.java:1128) ~[cassandra-all-2.1.0.jar:2.1.0]
at org.apache.cassandra.thrift.CassandraServer.describe_keyspaces(CassandraServer.java:1392) ~[cassandra-all-2.1.0.jar:2.1.0]
at org.apache.cassandra.thrift.Cassandra$Processor$describe_keyspaces.getResult(Cassandra.java:3714) ~[cassandra-thrift-1.2.11.jar:2.1.0]
at org.apache.cassandra.thrift.Cassandra$Processor$describe_keyspaces.getResult(Cassandra.java:3702) ~[cassandra-thrift-1.2.11.jar:2.1.0]
at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:32) ~[libthrift-0.7.0.jar:0.7.0]
at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:34) ~[libthrift-0.7.0.jar:0.7.0]
at org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:201) ~[cassandra-all-2.1.0.jar:2.1.0]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[na:1.8.0_20]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[na:1.8.0_20]
at java.lang.Thread.run(Thread.java:745) ~[na:1.8.0_20]
12:27:48.970 [Hector.me.prettyprint.cassandra.connection.CassandraHostRetryService-1] DEBUG m.p.c.c.client.HThriftClient - Creating a new thrift connection to localhost(127.0.0.1):9160
12:27:48.976 [Thrift:3] DEBUG o.a.c.thrift.CustomTThreadPoolServer - Thrift transport error occurred during processing of message.
org.apache.thrift.transport.TTransportException: Cannot read. Remote side has closed. Tried to read 4 bytes, but only got 0 bytes. (This is often indicative of an internal error on the server side. Please check your server logs.)
at org.apache.thrift.transport.TTransport.readAll(TTransport.java:86) ~[libthrift-0.7.0.jar:0.7.0]
at org.apache.thrift.protocol.TBinaryProtocol.readAll(TBinaryProtocol.java:378) ~[libthrift-0.7.0.jar:0.7.0]
at org.apache.thrift.protocol.TBinaryProtocol.readI32(TBinaryProtocol.java:297) ~[libthrift-0.7.0.jar:0.7.0]
at org.apache.thrift.protocol.TBinaryProtocol.readMessageBegin(TBinaryProtocol.java:204) ~[libthrift-0.7.0.jar:0.7.0]
at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:22) ~[libthrift-0.7.0.jar:0.7.0]
at org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:201) ~[cassandra-all-2.1.0.jar:2.1.0]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_20]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_20]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_20]
12:27:48.977 [Thrift:11] DEBUG o.a.c.thrift.CustomTThreadPoolServer - Thrift transport error occurred during processing of message.

Hope this helps!

Nate McCall

unread,
Feb 5, 2015, 9:50:51 AM2/5/15
to cassandra-...@googlegroups.com, Jérémy Sevellec
@Jérémy - what's still using Hector at this point? I thought you
ported to the java driver? If not, let me know and I might be able to
help you out porting.

This one is a class conflict on the cassandra-thrift (included
transitively). The class version mis-match triggers a bug (arguably a
feature) that takes down the host's connection as if the host were
down since you can't do anything useful with the connection at that
point anyway.

You may have to place exclusions within cassandra-unit for libthrift
and cassandra-thrift, then include those in test scope directly.

Everyone Note: We have put Hector in patch maintenance/dormant mode
over a year ago. And given that the Cassandra core team seems cool
with swapping out major dependencies mid version, these types of
issues will become increasingly common with Hector. If you are
comfortable with thrift, use Astyanax. If you are newish to Cassandra,
use the Java Driver.

Jérémy SEVELLEC

unread,
Feb 5, 2015, 9:57:24 AM2/5/15
to Nate McCall, cassandra-...@googlegroups.com
Hi Nate,

the old DataLoader (which is using the column family model and using json, xml input) is still using Hector to load data. 

The new DataLoader (wich is using CQL script) called CQLDataLoader is using the java driver.


the old way to load data is clearly deprecated but there are still users who are using it that way. I'm more and more thinking to remove it...

Jérémy


--
Jérémy

Nate McCall

unread,
Feb 5, 2015, 10:16:22 AM2/5/15
to Jérémy SEVELLEC, cassandra-...@googlegroups.com
Ok cool - I thought I saw that in the codebase the last time I looked.
Thanks Jérémy!

@Arun, It may be a pain to update the test schema and data definitions
if that's the reason for using DataLoader, but it will make this
dependency chain a lot simpler if you transition to CQLDataLoader now.
The by-product of that (If I remember correctly) is that you have a
stand-alone script you can just run via cqlsh if you need to which is
a huge help on occasion.

For example, when we build stuff out for clients, we start with the
CQL scripts while working on deployment automation. They usually run
in the last phase inserting some dummy data. Getting it there early
has the benefit of:
- verifying automated deployment ran correctly for CM systems like
chef and ansible
- works quite well when running Cassandra in Docker container for
isolating parallel Jenkins integration tests (yes this is possible and
everyone should take a week to do this right now because it will make
your lives 100x easier)
- both of the above keep the development team on the same page with ops
Reply all
Reply to author
Forward
0 new messages