java 无法创建与Janus的连接以定义模式

5us2dqdw  于 2022-12-28  发布在  Java
关注(0)|答案(1)|浏览(149)

无法创建与Janus的连接以定义模式。

JanusGraph graph = JanusGraphFactory.build().set("storage.backend", "cql")//.set("storage.cql.keyspace", "janusgraph")
                .set("storage.hostname", "url").open();

错误:

java.lang.IllegalArgumentException: Could not find implementation class: org.janusgraph.diskstorage.cql.CQLStoreManager
    at org.janusgraph.util.system.ConfigurationUtil.instantiate(ConfigurationUtil.java:75)
    at org.janusgraph.diskstorage.Backend.getImplementationClass(Backend.java:530)
    at org.janusgraph.diskstorage.Backend.getStorageManager(Backend.java:494)

可以使用以下配置进行正常的tinkerpop gremlin查询

@Bean
public Cluster cluster() {
    return Cluster.build()
            .addContactPoint(dbUrl)
            .port(dbPort)
            .serializer(new GraphBinaryMessageSerializerV1())
            .maxConnectionPoolSize(5)
            .maxInProcessPerConnection(1)
            .maxSimultaneousUsagePerConnection(10)
            .create();
}

@Bean
public GraphTraversalSource g(Cluster cluster) throws Exception {
    //return traversal().withRemote(DriverRemoteConnection.using(cluster));
     return traversal().withRemote("conf/remote-graph.properties");
}

希望在应用程序启动期间定义架构,尝试使用openManagement

js4nwp54

js4nwp541#

使用janusgraph编写java应用程序时,可以选择embedding janusgraph in your applicationconnecting to a janusgraph server,您的代码表明您正在尝试嵌入选项,因此您可以从提供的链接中的示例开始。

相关问题