Cassandra和Titan图形连接失败
我正在使用datastax社区服务器Cassandra和Titan图形连接失败,cassandra,gremlin,titan,Cassandra,Gremlin,Titan,我正在使用datastax社区服务器1.2.13和Titan 0.4.2。如果我使用下面的命令 gremlin> g = TitanFactory.open('conf/titan-cassandra-es.properties') ==>titangraph[cassandrathrift:127.0.0.1] 它没有显示任何错误,但当我在java代码中使用以下内容时: Configuration conf = new BaseConfiguration(); conf.setP
1.2.13
和Titan 0.4.2
。如果我使用下面的命令
gremlin> g = TitanFactory.open('conf/titan-cassandra-es.properties')
==>titangraph[cassandrathrift:127.0.0.1]
它没有显示任何错误,但当我在java代码中使用以下内容时:
Configuration conf = new BaseConfiguration();
conf.setProperty("storage.backend","cassandra");
conf.setProperty("storage.hostname","127.0.0.1");
conf.setProperty("storage.port","9160");
TitanGraph g = TitanFactory.open(conf);
它显示以下异常:
Exception in thread "main" java.lang.IllegalArgumentException: Could not find implementation class: com.thinkaurelius.titan.diskstorage.cassandra.astyanax.AstyanaxStoreManager
at com.thinkaurelius.titan.diskstorage.Backend.instantiate(Backend.java:347)
at com.thinkaurelius.titan.diskstorage.Backend.getImplementationClass(Backend.java:367)
at com.thinkaurelius.titan.diskstorage.Backend.getStorageManager(Backend.java:311)
at com.thinkaurelius.titan.diskstorage.Backend.<init>(Backend.java:121)
at com.thinkaurelius.titan.graphdb.configuration.GraphDatabaseConfiguration.getBackend(GraphDatabaseConfiguration.java:1163)
at com.thinkaurelius.titan.graphdb.database.StandardTitanGraph.<init>(StandardTitanGraph.java:75)
at com.thinkaurelius.titan.core.TitanFactory.open(TitanFactory.java:40)
at newpackage.TitanTest.main(TitanTest.java:24)
为什么?这个错误让我觉得你没有下载Titan的正确包装。如果你没有下载这个,也许你应该试试。我下载了
titan-server-0.4.2
并在Ubantutian中编译。server是一个预打包的系统,在两个不同的JVM中运行Rexster和Cassandra。也就是说,我希望所有的Cassandra LIB都会出现,这样您就可以按照您试图引用它的方式使用它。这让我想知道是否有些东西没有正确地“编译”,尽管我不知道为什么你需要编译任何东西,因为下载zip已经构建好了一切,可以开始了。我建议下载我引用的预编译版本(或预打包的Titan Server zip)并尝试一下。如果我使用Titan all
它说我在datastax社区服务器1.2.13、1.2.8上尝试过的cassandra版本不兼容。听起来你的项目对java代码有依赖性问题?我看到你也在邮件列表中发布了你的问题。我想丹尼尔是对的。您需要仔细检查项目的依赖关系…缺少什么?你的项目是基于maven的吗?已经完成了…我的应用程序中缺少了titan cassandra
和titan all
jars
Exception in thread "main" java.lang.IllegalArgumentException: Could not find implementation class: com.thinkaurelius.titan.diskstorage.cassandra.thrift.CassandraThriftStoreManager
at com.thinkaurelius.titan.diskstorage.Backend.instantiate(Backend.java:347)
at com.thinkaurelius.titan.diskstorage.Backend.getImplementationClass(Backend.java:367)
at com.thinkaurelius.titan.diskstorage.Backend.getStorageManager(Backend.java:311)
at com.thinkaurelius.titan.diskstorage.Backend.<init>(Backend.java:121)
at com.thinkaurelius.titan.graphdb.configuration.GraphDatabaseConfiguration.getBackend(GraphDatabaseConfiguration.java:1163)
at com.thinkaurelius.titan.graphdb.database.StandardTitanGraph.<init>(StandardTitanGraph.java:75)
at com.thinkaurelius.titan.core.TitanFactory.open(TitanFactory.java:40)
at newpackage.TitanTest.main(TitanTest.java:24)