Janusgraph: add a key named "ConfigurationManagementGraph" to the "graphs" property

Created on 26 Nov 2018  ·  5Comments  ·  Source: JanusGraph/janusgraph

Please help to have a look, thanks!
I've configured ConfigurationManagementGraph!But it still reported an error。
config:
image
image

my code is:
`
@Test
public void graphConfigurationShouldBeWhatWeExpectWhenUsingTemplateConfiguration()
throws Exception {

    try {

        JanusGraphManager gm;
        Settings set =new Settings();
        set.host="172.16.161.115";
        gm = new JanusGraphManager(set);
        final Map<String, Object> map = new HashMap<>();
        map.put(STORAGE_BACKEND.toStringWithoutRoot(), "hbase");
        map.put("storage.hostname", "172.16.161.115");
        //ConfiguredGraphFactory.createTemplateConfiguration(new MapConfiguration(map));
        ConfigurationManagementGraph instance = ConfigurationManagementGraph.getInstance();
        final StandardJanusGraph graph = (StandardJanusGraph) ConfiguredGraphFactory.create("ghlml");
        final StandardJanusGraph graph1 = (StandardJanusGraph) ConfiguredGraphFactory.open("ghlml");
        instance.createTemplateConfiguration(new MapConfiguration(map));
        Set<String> graphNames = ConfiguredGraphFactory.getGraphNames();
        for(String str:graphNames){
            System.out.println("---"+str);
        }
        assertNotNull(graph);
        assertEquals(graph, graph1);

        assertEquals("ghlml", graph.getConfiguration().getConfiguration().get(GRAPH_NAME));
       // assertEquals("inmemory", graph.getConfiguration().getConfiguration().get(STORAGE_BACKEND));

    } finally {
        //ConfiguredGraphFactory.removeConfiguration("graph1");
        //ConfiguredGraphFactory.close("graph1");
    }
}

`

error code:
`
org.janusgraph.graphdb.management.utils.ConfigurationManagementGraphNotEnabledException: Please add a key named "ConfigurationManagementGraph" to the "graphs" property in your YAML file and restart the server to be able to use the functionality of the ConfigurationManagementGraph class.
at org.janusgraph.graphdb.management.ConfigurationManagementGraph.getInstance(ConfigurationManagementGraph.java:97)
at pluradj.janusgraph.example.ConfiguredGraphFactoryTest.graphConfigurationShouldBeWhatWeExpectWhenUsingTemplateConfiguration(ConfiguredGraphFactoryTest.java:143)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.rules.ExpectedException$ExpectedExceptionStatement.evaluate(ExpectedException.java:239)
at org.junit.rules.RunRules.evaluate(RunRules.java:20)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)

java.lang.RuntimeException: org.janusgraph.graphdb.management.utils.ConfigurationManagementGraphNotEnabledException: Please add a key named "ConfigurationManagementGraph" to the "graphs" property in your YAML file and restart the server to be able to use the functionality of the ConfigurationManagementGraph class.
at org.janusgraph.core.ConfiguredGraphFactory.getConfigGraphManagementInstance(ConfiguredGraphFactory.java:169)
at org.janusgraph.core.ConfiguredGraphFactory.removeTemplateConfiguration(ConfiguredGraphFactory.java:258)
at pluradj.janusgraph.example.ConfiguredGraphFactoryTest.cleanUp(ConfiguredGraphFactoryTest.java:70)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:33)
at org.junit.rules.ExpectedException$ExpectedExceptionStatement.evaluate(ExpectedException.java:239)
at org.junit.rules.RunRules.evaluate(RunRules.java:20)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
Caused by: org.janusgraph.graphdb.management.utils.ConfigurationManagementGraphNotEnabledException: Please add a key named "ConfigurationManagementGraph" to the "graphs" property in your YAML file and restart the server to be able to use the functionality of the ConfigurationManagementGraph class.
at org.janusgraph.graphdb.management.ConfigurationManagementGraph.getInstance(ConfigurationManagementGraph.java:97)
at org.janusgraph.core.ConfiguredGraphFactory.getConfigGraphManagementInstance(ConfiguredGraphFactory.java:167)
... 27 more

`

kinbupossible

All 5 comments

I have the same problem with u. and I do not have ideas to handle it...

To prevent confusion we have recently added a default template for new issues containing the guidelines as to what belongs in issues. Usage, configuration, and general questions should be asked in gitter, stackoverflow, or the janusgraph-users google group. Github issues are for reporting bugs, requesting new features, and tracking the development of JanusGraph. If your issue is still outstanding please consult one of the communities mentioned. If you still feel like your issue belongs here and was closed in error please feel free to repoen it.

I do have the same problem, Can you give the solution

I have the same problem with JanusGraph 0.4.0, can anyone give a solution for this?

I have the same problem with JanusGraph 0.4.0, can anyone give a solution for this?

Did you find any solution ? :( I have the same issue with 0.4.1

Was this page helpful?
0 / 5 - 0 ratings