Reputation: 11
I am trying to implement Cassandra Custom Data type with JAVA , source code i used is at http://java.dzone.com/articles/custom-cassandra-data-types
with only difference , that package is cqltypes.
created the jar file file and placed it in installation lib directory, as mentioned by article.
But , when i call it in cqlsh: CREATE TABEL test2.state2(state 'cqltypes.UnitedStatesState');
I get an error << ErrorMessage code=2000 [Syntax error in CQL query] message = "Error setting type cqltypes.UnitedStatesState: Unable to find abstract-type class 'cqltypes.UnitedStatesState' " >>
Upvotes: 1
Views: 317
Reputation: 989
CREATE TABLE test2.state2 (state text , "cqltypes.UnitedStatesState" text, PRIMARY KEY (state));
Upvotes: 0
Reputation: 11
Hope someone could be benefited from this:
I was trying to install on windows, there in order to get any jar file change reflected u need to restart service.
One problem in windows cassandra is you cannot stop it, u have to restart the machine. Even if u do, custom jars are not getting picked up by cassandra during boot. For that, u need to stop the server and restart it.
For this.
go to apache-cassandra/bin : run stop-server.bat then run cassandra.bat
Upvotes: 0