Hi Dear all,
I try to code to export graph to XML file.
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import javax.xml.stream.XMLStreamException;
import com.tinkerpop.blueprints.pgm.impls.orientdb.OrientGraph;
import com.tinkerpop.blueprints.pgm.util.graphml.GraphMLReader;
import com.tinkerpop.blueprints.pgm.util.graphml.GraphMLWriter;
public class TestLoadGraph {
public static void main(String[] args) throws Exception {
OrientGraph g = new OrientGraph("local:C:/orientdb-graphed-1.0rc8/databases/Test_3");
GraphMLReader.inputGraph(g, new FileInputStream(
"C:/orientdb-graphed-1.0rc8/data/Test_3.xml"));
g.shutdown();
g = new OrientGraph("local:C:/orientdb-graphed-1.0rc8/databases/Test_3");
FileOutputStream fo = new FileOutputStream("C:/orientdb-graphed-1.0rc8/data/Test_5.xml");
GraphMLWriter.outputGraph(g, fo);
g.shutdown();
}
}
But the following error occurs. How can i solve this problem?
Exception in thread "main" java.lang.NoSuchMethodError: com.orientechnologies.orient.core.record.impl.ODocument.fieldNames()Ljava/util/Set;
at com.tinkerpop.blueprints.pgm.impls.orientdb.OrientElement.getPropertyKeys(OrientElement.java:96)
at com.tinkerpop.blueprints.pgm.impls.orientdb.OrientVertex.getPropertyKeys(OrientVertex.java:60)
at com.tinkerpop.blueprints.pgm.util.graphml.GraphMLWriter.outputGraph(GraphMLWriter.java:76)
at com.tinkerpop.blueprints.pgm.util.graphml.GraphMLWriter.outputGraph(GraphMLWriter.java:250)
at TestLoadGraph.main(TestLoadGraph.java:20)
Thanks,
--