add edge in tinkerpop using java client throws java.lang.NegativeArraySizeException -


i have problem running chunk of code, code read csv file, , each line in file, there 2 vertexes , edge, i'm using file construct graph, can create vertexes, , when comes create edge, system gives me exception:

io.netty.handler.codec.decoderexception: org.apache.tinkerpop.gremlin.driver.ser.serializationexception: org.apache.tinkerpop.shaded.kryo.kryoexception: java.lang.negativearraysizeexception

code

graph graph = emptygraph.instance(); graphtraversalsource g = graph.traversal().withremote("remote-graph.properties"); iterator<string> lineit = fileutils.lineiterator(new file(args[0])); while (lineit.hasnext()) {     string line = lineit.next();     string[] cols = line.split(",");     system.out.println(cols[0]);     system.out.println(cols.length);     g.addv().property("poiid", cols[0]).property("name", cols[1]).property("type", cols[2]).as("a").addv()             .property("poiid", cols[3]).property("name", cols[4]).property("type", cols[5]).as("b").adde("hehe").from("a").to("b").next(); } g.close(); 


Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -