I am using 0.3.1 version of JanusGraph. I try to create template configuration via using gremlin console with remote connection.
gremlin> map = new HashMap
gremlin> map.put("storage.backend", "hbase");
gremlin> map.put("storage.hostname", "FusionInsight1,FusionInsight2,FusionInsight3");
gremlin> ConfiguredGraphFactory.createTemplateConfiguration(new MapConfiguration(map));
Property value [[FusionInsight1, FusionInsight2, FusionInsight3]] is of type class java.util.ArrayList is not supported
Also i try to create template configuration via JAVA API and get same error.
my properties file :
gremlin.graph=org.janusgraph.core.ConfiguredGraphFactory
storage.backend=hbase
graph.graphname=ConfigurationManagementGraph
storage.hostname=FusionInsight1,FusionInsight2,FusionInsight3
stack trace :
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.huawei.kg.manager.service.impl.ManagerServiceImpl]: Constructor threw exception; nested exception is java.lang.IllegalArgumentException: Property value [[FusionInsight1, FusionInsight2, FusionInsight3]] is of type class java.util.ArrayList is not supported
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:182) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE]
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:117) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE]
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:275) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE]
... 18 more
Caused by: java.lang.IllegalArgumentException: Property value [[FusionInsight1, FusionInsight2, FusionInsight3]] is of type class java.util.ArrayList is not supported
at org.apache.tinkerpop.gremlin.structure.Property$Exceptions.dataTypeOfPropertyValueNotSupported(Property.java:163) ~[gremlin-core-3.3.3.jar:3.3.3]
at org.apache.tinkerpop.gremlin.structure.Property$Exceptions.dataTypeOfPropertyValueNotSupported(Property.java:159) ~[gremlin-core-3.3.3.jar:3.3.3]
at org.janusgraph.graphdb.transaction.StandardJanusGraphTx.verifyAttribute(StandardJanusGraphTx.java:564) ~[janusgraph-core-0.3.1.jar:?]
at org.janusgraph.graphdb.transaction.StandardJanusGraphTx.addProperty(StandardJanusGraphTx.java:756) ~[janusgraph-core-0.3.1.jar:?]
at org.janusgraph.graphdb.transaction.StandardJanusGraphTx.addProperty(StandardJanusGraphTx.java:745) ~[janusgraph-core-0.3.1.jar:?]
at org.janusgraph.graphdb.vertices.AbstractVertex.property(AbstractVertex.java:152) ~[janusgraph-core-0.3.1.jar:?]
at org.janusgraph.core.JanusGraphVertex.property(JanusGraphVertex.java:72) ~[janusgraph-core-0.3.1.jar:?]
at org.janusgraph.core.JanusGraphVertex.property(JanusGraphVertex.java:33) ~[janusgraph-core-0.3.1.jar:?]
at org.janusgraph.graphdb.management.ConfigurationManagementGraph.lambda$createTemplateConfiguration$1(ConfigurationManagementGraph.java:144) ~[janusgraph-core-0.3.1.jar:?]
at java.util.Map.forEach(Map.java:630) ~[?:1.8.0_171]
at org.janusgraph.graphdb.management.ConfigurationManagementGraph.createTemplateConfiguration(ConfigurationManagementGraph.java:144) ~[janusgraph-core-0.3.1.jar:?]
at org.janusgraph.core.ConfiguredGraphFactory.createTemplateConfiguration(ConfiguredGraphFactory.java:194) ~[janusgraph-core-0.3.1.jar:?]
at com.huawei.kg.util.ManagerUtil.connectionServer(ManagerUtil.java:78) ~[classes/:?]
at com.huawei.kg.util.ManagerUtil.(ManagerUtil.java:37) ~[classes/:?]
at com.huawei.kg.manager.service.impl.ManagerServiceImpl.(ManagerServiceImpl.java:30) ~[classes/:?]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_171]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:1.8.0_171]
The line checking type of that:
https://github.com/JanusGraph/janusgraph/blob/4682509e753f7934dc6fd9da30989248181d758f/janusgraph-core/src/main/java/org/janusgraph/graphdb/transaction/StandardJanusGraphTx.java#L564
Looks to me like the Mutability Level is wrong for this ConfigOption could this be the root cause? If so it may be good to also update the 'storage.port' ConfigOption.
https://github.com/JanusGraph/janusgraph/blob/4d78781f35482e954f26737c68db184195ffaa2d/janusgraph-core/src/main/java/org/janusgraph/graphdb/configuration/GraphDatabaseConfiguration.java#L512
Recently, I came across the same problem. The delimiterParsingDisabled should be set to true, and then string "ip1,ip2,ip3" is no longer converted to list.
map = new HashMap<String, Object>();
map.put("storage.backend", "cassandrathrift");
map.put("storage.hostname", "ip1,ip2,ip3");
map.put("graph.graphname", "graph_test1");
conf = new MapConfiguration(map);
conf.setDelimiterParsingDisabled(true);
ConfiguredGraphFactory.createConfiguration(conf);
Most helpful comment
Recently, I came across the same problem. The delimiterParsingDisabled should be set to true, and then string "ip1,ip2,ip3" is no longer converted to list.