cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michaël Figuière (JIRA) <j...@apache.org>
Subject [jira] [Comment Edited] (CASSANDRA-6030) java.lang.IncompatibleClassChangeError when starting EmbeddedCassandraService
Date Fri, 13 Sep 2013 23:38:52 GMT

    [ https://issues.apache.org/jira/browse/CASSANDRA-6030?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13767166#comment-13767166
] 

Michaël Figuière edited comment on CASSANDRA-6030 at 9/13/13 11:37 PM:
-----------------------------------------------------------------------

I believe this is due to the fact you're using a wrong version of LZ4.

In 1.0, {{LZ4Decompressor}} is an interface:
https://github.com/jpountz/lz4-java/blob/1.0/src/java/net/jpountz/lz4/LZ4Decompressor.java

In 1.1 it's an abstract class:
https://github.com/jpountz/lz4-java/blob/1.1/src/java/net/jpountz/lz4/LZ4Decompressor.java

In 1.2 it's an interface:
https://github.com/jpountz/lz4-java/blob/1.2/src/java/net/jpountz/lz4/LZ4Decompressor.java

Cassandra 2.0.0 depends on 1.1 (see http://repo1.maven.org/maven2/org/apache/cassandra/cassandra-all/2.0.0/cassandra-all-2.0.0.pom)
and DataStax Java Driver 2.0.0-beta1 depends on 1.2.

If you need to use {{cassandra-all}} and the Java Driver, then I can only suggest you to rebuild
the driver 2.0.0-beta1 as found at https://github.com/datastax/java-driver/tree/2.0.0-beta1
with the appropriate dependency. We'll consider fixing this conflict in the next beta of the
driver.
Note that this is normally not a problem as the Java Driver doesn't depends (anymore) on {{cassandra-all}}.
So when using the {{EmbeddedCassandraService}} be sure to force {{net.jpountz.lz4 1.1}} in
the dependencies of your application.
                
      was (Author: mfiguiere):
    I believe this is due to the fact you're using a wrong version of LZ4.

In 1.0, {{LZ4Decompressor}} is an interface:
https://github.com/jpountz/lz4-java/blob/1.0/src/java/net/jpountz/lz4/LZ4Decompressor.java

In 1.1 it's an abstract class:
https://github.com/jpountz/lz4-java/blob/1.1/src/java/net/jpountz/lz4/LZ4Decompressor.java

In 1.2 it's an interface:
https://github.com/jpountz/lz4-java/blob/1.2/src/java/net/jpountz/lz4/LZ4Decompressor.java

Cassandra 2.0.0 depends on 1.1 (see http://repo1.maven.org/maven2/org/apache/cassandra/cassandra-all/2.0.0/cassandra-all-2.0.0.pom)
and DataStax Java Driver 2.0.0-beta1 depends on 1.2.
Note that this is normally not a problem as the Java Driver doesn't depends (anymore) on {{cassandra-all}}.
So when using the {{EmbeddedCassandraService}} be sure to force {{net.jpountz.lz4 1.1}} in
the dependencies of your application.
                  
> java.lang.IncompatibleClassChangeError when starting EmbeddedCassandraService
> -----------------------------------------------------------------------------
>
>                 Key: CASSANDRA-6030
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-6030
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core, Documentation & website
>         Environment: Linux 64 bit Ubuntu, JAVA 1.7
>            Reporter: Jinder Aujla
>         Attachments: jar hell.png
>
>
> When I try to start EmbeddedCassandraService thus:
> EmbeddedCassandraService cassandra = new EmbeddedCassandraService();
> cassandra.start();
> I get the following exception
> java.lang.IncompatibleClassChangeError: Found interface net.jpountz.lz4.LZ4Decompressor,
but class was expected
> 	at org.apache.cassandra.io.compress.LZ4Compressor.uncompress(LZ4Compressor.java:84)
> 	at org.apache.cassandra.io.compress.CompressedRandomAccessReader.decompressChunk(CompressedRandomAccessReader.java:116)
> 	at org.apache.cassandra.io.compress.CompressedRandomAccessReader.reBuffer(CompressedRandomAccessReader.java:85)
> 	at org.apache.cassandra.io.util.RandomAccessReader.seek(RandomAccessReader.java:275)
> 	at org.apache.cassandra.io.util.PoolingSegmentedFile.getSegment(PoolingSegmentedFile.java:42)
> 	at org.apache.cassandra.io.sstable.SSTableReader.getFileDataInput(SSTableReader.java:1093)
> 	at org.apache.cassandra.db.columniterator.SimpleSliceReader.<init>(SimpleSliceReader.java:57)
> 	at org.apache.cassandra.db.columniterator.SSTableSliceIterator.createReader(SSTableSliceIterator.java:65)
> 	at org.apache.cassandra.db.columniterator.SSTableSliceIterator.<init>(SSTableSliceIterator.java:42)
> 	at org.apache.cassandra.db.filter.SliceQueryFilter.getSSTableColumnIterator(SliceQueryFilter.java:171)
> 	at org.apache.cassandra.db.filter.QueryFilter.getSSTableColumnIterator(QueryFilter.java:62)
> 	at org.apache.cassandra.db.CollationController.collectAllData(CollationController.java:269)
> 	at org.apache.cassandra.db.CollationController.getTopLevelColumns(CollationController.java:53)
> 	at org.apache.cassandra.db.ColumnFamilyStore.getTopLevelColumns(ColumnFamilyStore.java:1469)
> 	at org.apache.cassandra.db.ColumnFamilyStore.getColumnFamily(ColumnFamilyStore.java:1295)
> 	at org.apache.cassandra.db.Keyspace.getRow(Keyspace.java:332)
> 	at org.apache.cassandra.db.SliceFromReadCommand.getRow(SliceFromReadCommand.java:65)
> 	at org.apache.cassandra.cql3.statements.SelectStatement.readLocally(SelectStatement.java:231)
> 	at org.apache.cassandra.cql3.statements.SelectStatement.executeInternal(SelectStatement.java:249)
> 	at org.apache.cassandra.cql3.statements.SelectStatement.executeInternal(SelectStatement.java:56)
> 	at org.apache.cassandra.cql3.QueryProcessor.processInternal(QueryProcessor.java:151)
> 	at org.apache.cassandra.db.SystemKeyspace.checkHealth(SystemKeyspace.java:459)
> 	at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:227)
> 	at org.apache.cassandra.service.CassandraDaemon.init(CassandraDaemon.java:377)
> 	at org.apache.cassandra.service.EmbeddedCassandraService.start(EmbeddedCassandraService.java:52)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message