cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lars Wunderlich (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-2263) cql driver jar
Date Sat, 28 May 2011 19:46:47 GMT


Lars Wunderlich commented on CASSANDRA-2263:

I don't know whether this issue should be documented in a separate bug for 0.8.0-rc1, but
since this one deals with separation of jar file, I add the comment here.

The following code fails on my machine:

Connection c = DriverManager.getConnection("jdbc:cassandra:/@localhost:9160/testspace");

As of apache-cassandra-0.8.0-rc1 together with apache-cassandra-cql-1.0.2.jar the connection
to local host couldn't be established, even though it was running and the keyspace was fine,
because of the following reasons:

1.) cql jar requires direct classpath relationship to apache-cassandra-0.8.0-rc1.jar, without
it cannot run at all, what contradicts server implementation encapsulation/secret in my mind
to attach core jar file: 

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/cassandra/db/marshal/AbstractType
	at org.apache.cassandra.cql.jdbc.Connection.execute(
	at org.apache.cassandra.cql.jdbc.Connection.execute(
	at org.apache.cassandra.cql.jdbc.CassandraConnection.<init>(
	at org.apache.cassandra.cql.jdbc.CassandraDriver.connect(
	at java.sql.DriverManager.getConnection(Unknown Source)
	at java.sql.DriverManager.getConnection(Unknown Source)
	at TestConnection.main(

2.) apache-cassandra-0.8.0-rc1.jar internally contains org.apache.cassandra.cql.jdbc package
a second time, which might conflict with the cql standalone jar version of the driver in terms
of class compatibility.

3.) Using CassandraDriver from core apache-cassandra-0.8.0-rc1.jar results in an error message
that cassandra.yaml couldn't be found, but cassandra.yaml is not required from my point of
view for clients anyway.

Cannot locate cassandra.yaml
Fatal configuration error; unable to start server.  See log for stacktrace.

> cql driver jar
> --------------
>                 Key: CASSANDRA-2263
>                 URL:
>             Project: Cassandra
>          Issue Type: Bug
>          Components: API
>    Affects Versions: 0.8 beta 1
>            Reporter: Eric Evans
>            Priority: Minor
>              Labels: cql
>             Fix For: 1.0
>   Original Estimate: 0h
>  Remaining Estimate: 0h
> Work was done in CASSANDRA-1848  to create a jar for the CQL Java driver.  The generated
Thrfit code was broken out into it's own jar as well, since that is a dependency for both
servers and clients. However, based on the work currently happening in CASSANDRA-2262 and
CASSANDRA-2124, it seems that additional dependencies will exist, and new jar(s) will need
to be created.
> The easiest way to fix this will probably be to put copies of all of {{o.a.c.db.marshal}}
and {{o.a.c.utils}}, and a copy of {{o.a.c.config.ConfigurationException}} into the CQL driver
jar (a split along those lines to create another jar doesn't make sense IMO).

This message is automatically generated by JIRA.
For more information on JIRA, see:

View raw message