adejanovski / cassandra-jdbc-wrapper

A JDBC wrapper for the Datastax Java Driver for Cassandra
Apache License 2.0
53 stars 36 forks source link

Cluster connect format not supported #12

Closed kedvsk closed 7 years ago

kedvsk commented 8 years ago

Using something like jdbc:cassandra://192.168.56.201--192.168.56.202:9042/key1 doesn't work:

JDBC-Driver: cassandra-jdbc-wrapper-3.0.3.jar Product: DbVisualizer Free 9.5.2 [Build #2598] OS: Windows 7 OS Version: 6.1 OS Arch: x86 Java Version: 1.8.0_77 Java VM: Java HotSpot(TM) Client VM Java Vendor: Oracle Corporation

An error occurred while establishing the connection:

Long Message: Connection url must specify a host, e.g., jdbc:cassandra://localhost:9042/Keyspace1

Arerad commented 8 years ago

Facing the same problem. Driver cannot parse url with "host1--host2:9042" correctly and throws and exception described above: Connection url must specify a host, e.g., jdbc:cassandra://localhost:9042/Keyspace1

adejanovski commented 7 years ago

Actually Java does not allow hostnames with both ip addresses and hyphens (-).

It works with hostnames though, so you should be able to use either : jdbc:cassandra://192.168.56.201:9042/key1 or jdbc:cassandra://hostname1--hostname2:9042/key1