Neo4j:空指针异常

时间:2015-05-27 14:53:30

标签: nullpointerexception transactions neo4j graph-databases

我正在研究neo4j,以便从RDF文件中形成图形数据库。以下是代码:

public class neo4j {

private GraphDatabaseService db;

public neo4j(String graphpath) {

        try{
        this.db = new GraphDatabaseFactory().newEmbeddedDatabase(graphpath);
        registerShutdownHook(db);
        }catch(Exception e){
            File file = new File(graphpath+"/tm_tx_log.1");
            file.delete();
        }

}

private static void registerShutdownHook(final GraphDatabaseService graphDb) {
        Runtime.getRuntime().addShutdownHook(new Thread() {
            @Override
            public void run() {
                graphDb.shutdown();
            }
        });
    }   

public void shutDown() {
        System.out.println();
        System.out.println("Shutting down database ...");
        db.shutdown();
    }

public void clearDb(String graphpath) throws IOException {
    File files = new File(graphpath);
    for(File file : files.listFiles()){
        FileDeleteStrategy.FORCE.delete(file);
    }
    }

public GraphDatabaseService getgdbservice(){
    return this.db;
}

private enum Reltypes implements RelationshipType{
Predicate_of,Subject_of,Object_of;
}

public void graphdbform(GraphDatabaseService graphdb, String rdfpath) {
    jena jenaobject=new jena();
    Node subjectnode = null;
    Node objectnode = null;
    Node predicatenode = null; 
    StmtIterator iter = jena.jena(rdfpath);
    ResourceIterator<Node> nodeindex;
    try (Transaction tx = graphdb.beginTx()) {
        try {
            while ( iter.hasNext() ) {

            /*****The formation of label nodes and relationships******/

           }
            System.out.println();                
        }finally {
        if ( iter != null ) iter.close();
    } 
        tx.success();
    }
}

}

这是我的主要方法:编辑:

public static void main(String[] args) throws IOException {
    String graphpath="XYZ/data";
    String rdfpath="XYZ/resources/example.ttl";
    neo4j graphdb = new neo4j(graphpath);
    GraphDatabaseService gdb=graphdb.getgdbservice();
    graphdb.graphdbform(gdb, rdfpath);
}

异常的堆栈跟踪,Null指针

            Collected project classpath [/home/enigmatus/NetBeansProjects/KeywordSearch/target/classes]
        dealing with org.apache.jena:jena-core:jar:2.13.0:compile
        dealing with org.slf4j:slf4j-api:jar:1.7.6:compile
        dealing with org.apache.jena:jena-iri:jar:1.1.2:compile
        dealing with xerces:xercesImpl:jar:2.11.0:compile
        dealing with xml-apis:xml-apis:jar:1.4.01:compile
        dealing with org.slf4j:slf4j-log4j12:jar:1.7.6:compile
        dealing with log4j:log4j:jar:1.2.17:compile
        dealing with org.neo4j:neo4j:jar:2.2.1:compile
        dealing with org.neo4j:neo4j-kernel:jar:2.2.1:compile
        dealing with org.neo4j:neo4j-primitive-collections:jar:2.2.1:compile
        dealing with org.neo4j:neo4j-unsafe:jar:2.2.1:compile
        dealing with org.neo4j:neo4j-io:jar:2.2.1:compile
        dealing with org.neo4j:neo4j-csv:jar:2.2.1:compile
        dealing with org.neo4j:neo4j-lucene-index:jar:2.2.1:compile
        dealing with org.neo4j:neo4j-graph-algo:jar:2.2.1:compile
        dealing with org.neo4j:neo4j-udc:jar:2.2.1:compile
        dealing with org.neo4j:neo4j-graph-matching:jar:2.2.1:compile
        dealing with org.neo4j:neo4j-cypher:jar:2.2.1:compile
        dealing with org.scala-lang:scala-library:jar:2.10.5:compile
        dealing with org.scala-lang:scala-reflect:jar:2.10.5:compile
        dealing with org.neo4j:neo4j-cypher-compiler-1.9:jar:2.0.4:compile
        dealing with org.neo4j:neo4j-cypher-compiler-2.0:jar:2.0.4:compile
        dealing with org.neo4j:neo4j-cypher-compiler-2.1:jar:2.1.7:compile
        dealing with org.neo4j:neo4j-cypher-compiler-2.2:jar:2.2.1:compile
        dealing with org.parboiled:parboiled-scala_2.10:jar:1.1.7:compile
        dealing with org.parboiled:parboiled-core:jar:1.1.7:compile
        dealing with net.sf.opencsv:opencsv:jar:2.3:compile
        dealing with com.googlecode.concurrentlinkedhashmap:concurrentlinkedhashmap-lru:jar:1.4:compile
        dealing with org.neo4j:neo4j-jmx:jar:2.2.1:compile
        dealing with org.neo4j:neo4j-consistency-check:jar:2.2.1:compile
        dealing with org.elasticsearch:elasticsearch:jar:1.4.0:compile
        dealing with org.apache.lucene:lucene-core:jar:4.10.2:compile
        dealing with org.apache.lucene:lucene-analyzers-common:jar:4.10.2:compile
        dealing with org.apache.lucene:lucene-queries:jar:4.10.2:compile
        dealing with org.apache.lucene:lucene-memory:jar:4.10.2:compile
        dealing with org.apache.lucene:lucene-highlighter:jar:4.10.2:compile
        dealing with org.apache.lucene:lucene-queryparser:jar:4.10.2:compile
        dealing with org.apache.lucene:lucene-sandbox:jar:4.10.2:compile
        dealing with org.apache.lucene:lucene-suggest:jar:4.10.2:compile
        dealing with org.apache.lucene:lucene-misc:jar:4.10.2:compile
        dealing with org.apache.lucene:lucene-join:jar:4.10.2:compile
        dealing with org.apache.lucene:lucene-grouping:jar:4.10.2:compile
        dealing with org.apache.lucene:lucene-spatial:jar:4.10.2:compile
        dealing with com.spatial4j:spatial4j:jar:0.4.1:compile
        dealing with org.antlr:antlr-runtime:jar:3.5:compile
        dealing with org.ow2.asm:asm:jar:4.1:compile
        dealing with org.ow2.asm:asm-commons:jar:4.1:compile
        dealing with commons-io:commons-io:jar:2.2:compile
        Toolchains are ignored, 'executable' parameter is set to /usr/lib/jvm/default-java/bin/java
        Executing command line: /usr/lib/jvm/default-java/bin/java -classpath /home/enigmatus/NetBeansProjects/KeywordSearch/target/classes:/home/enigmatus/.m2/repository/org/apache/jena/jena-core/2.13.0/jena-core-2.13.0.jar:/home/enigmatus/.m2/repository/org/slf4j/slf4j-api/1.7.6/slf4j-api-1.7.6.jar:/home/enigmatus/.m2/repository/org/apache/jena/jena-iri/1.1.2/jena-iri-1.1.2.jar:/home/enigmatus/.m2/repository/xerces/xercesImpl/2.11.0/xercesImpl-2.11.0.jar:/home/enigmatus/.m2/repository/xml-apis/xml-apis/1.4.01/xml-apis-1.4.01.jar:/home/enigmatus/.m2/repository/org/slf4j/slf4j-log4j12/1.7.6/slf4j-log4j12-1.7.6.jar:/home/enigmatus/.m2/repository/log4j/log4j/1.2.17/log4j-1.2.17.jar:/home/enigmatus/.m2/repository/org/neo4j/neo4j/2.2.1/neo4j-2.2.1.jar:/home/enigmatus/.m2/repository/org/neo4j/neo4j-kernel/2.2.1/neo4j-kernel-2.2.1.jar:/home/enigmatus/.m2/repository/org/neo4j/neo4j-primitive-collections/2.2.1/neo4j-primitive-collections-2.2.1.jar:/home/enigmatus/.m2/repository/org/neo4j/neo4j-unsafe/2.2.1/neo4j-unsafe-2.2.1.jar:/home/enigmatus/.m2/repository/org/neo4j/neo4j-io/2.2.1/neo4j-io-2.2.1.jar:/home/enigmatus/.m2/repository/org/neo4j/neo4j-csv/2.2.1/neo4j-csv-2.2.1.jar:/home/enigmatus/.m2/repository/org/neo4j/neo4j-lucene-index/2.2.1/neo4j-lucene-index-2.2.1.jar:/home/enigmatus/.m2/repository/org/neo4j/neo4j-graph-algo/2.2.1/neo4j-graph-algo-2.2.1.jar:/home/enigmatus/.m2/repository/org/neo4j/neo4j-udc/2.2.1/neo4j-udc-2.2.1.jar:/home/enigmatus/.m2/repository/org/neo4j/neo4j-graph-matching/2.2.1/neo4j-graph-matching-2.2.1.jar:/home/enigmatus/.m2/repository/org/neo4j/neo4j-cypher/2.2.1/neo4j-cypher-2.2.1.jar:/home/enigmatus/.m2/repository/org/scala-lang/scala-library/2.10.5/scala-library-2.10.5.jar:/home/enigmatus/.m2/repository/org/scala-lang/scala-reflect/2.10.5/scala-reflect-2.10.5.jar:/home/enigmatus/.m2/repository/org/neo4j/neo4j-cypher-compiler-1.9/2.0.4/neo4j-cypher-compiler-1.9-2.0.4.jar:/home/enigmatus/.m2/repository/org/neo4j/neo4j-cypher-compiler-2.0/2.0.4/neo4j-cypher-compiler-2.0-2.0.4.jar:/home/enigmatus/.m2/repository/org/neo4j/neo4j-cypher-compiler-2.1/2.1.7/neo4j-cypher-compiler-2.1-2.1.7.jar:/home/enigmatus/.m2/repository/org/neo4j/neo4j-cypher-compiler-2.2/2.2.1/neo4j-cypher-compiler-2.2-2.2.1.jar:/home/enigmatus/.m2/repository/org/parboiled/parboiled-scala_2.10/1.1.7/parboiled-scala_2.10-1.1.7.jar:/home/enigmatus/.m2/repository/org/parboiled/parboiled-core/1.1.7/parboiled-core-1.1.7.jar:/home/enigmatus/.m2/repository/net/sf/opencsv/opencsv/2.3/opencsv-2.3.jar:/home/enigmatus/.m2/repository/com/googlecode/concurrentlinkedhashmap/concurrentlinkedhashmap-lru/1.4/concurrentlinkedhashmap-lru-1.4.jar:/home/enigmatus/.m2/repository/org/neo4j/neo4j-jmx/2.2.1/neo4j-jmx-2.2.1.jar:/home/enigmatus/.m2/repository/org/neo4j/neo4j-consistency-check/2.2.1/neo4j-consistency-check-2.2.1.jar:/home/enigmatus/.m2/repository/org/elasticsearch/elasticsearch/1.4.0/elasticsearch-1.4.0.jar:/home/enigmatus/.m2/repository/org/apache/lucene/lucene-core/4.10.2/lucene-core-4.10.2.jar:/home/enigmatus/.m2/repository/org/apache/lucene/lucene-analyzers-common/4.10.2/lucene-analyzers-common-4.10.2.jar:/home/enigmatus/.m2/repository/org/apache/lucene/lucene-queries/4.10.2/lucene-queries-4.10.2.jar:/home/enigmatus/.m2/repository/org/apache/lucene/lucene-memory/4.10.2/lucene-memory-4.10.2.jar:/home/enigmatus/.m2/repository/org/apache/lucene/lucene-highlighter/4.10.2/lucene-highlighter-4.10.2.jar:/home/enigmatus/.m2/repository/org/apache/lucene/lucene-queryparser/4.10.2/lucene-queryparser-4.10.2.jar:/home/enigmatus/.m2/repository/org/apache/lucene/lucene-sandbox/4.10.2/lucene-sandbox-4.10.2.jar:/home/enigmatus/.m2/repository/org/apache/lucene/lucene-suggest/4.10.2/lucene-suggest-4.10.2.jar:/home/enigmatus/.m2/repository/org/apache/lucene/lucene-misc/4.10.2/lucene-misc-4.10.2.jar:/home/enigmatus/.m2/repository/org/apache/lucene/lucene-join/4.10.2/lucene-join-4.10.2.jar:/home/enigmatus/.m2/repository/org/apache/lucene/lucene-grouping/4.10.2/lucene-grouping-4.10.2.jar:/home/enigmatus/.m2/repository/org/apache/lucene/lucene-spatial/4.10.2/lucene-spatial-4.10.2.jar:/home/enigmatus/.m2/repository/com/spatial4j/spatial4j/0.4.1/spatial4j-0.4.1.jar:/home/enigmatus/.m2/repository/org/antlr/antlr-runtime/3.5/antlr-runtime-3.5.jar:/home/enigmatus/.m2/repository/org/ow2/asm/asm/4.1/asm-4.1.jar:/home/enigmatus/.m2/repository/org/ow2/asm/asm-commons/4.1/asm-commons-4.1.jar:/home/enigmatus/.m2/repository/commons-io/commons-io/2.2/commons-io-2.2.jar org.dbpedia.keywordsearch.uinterface.uiclass
        /home/enigmatus/GSOC/database5
        log4j:WARN No appenders could be found for logger (com.hp.hpl.jena.util.FileManager).
        log4j:WARN Please initialize the log4j system properly.
        log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
        Exception in thread "main" java.lang.NullPointerException
                at org.dbpedia.keywordsearch.importer.neo4j.graphdbform(neo4j.java:73)
                at org.dbpedia.keywordsearch.uinterface.uiclass.main(uiclass.java:38)   Collected project artifacts [org.apache.jena:jena-core:jar:2.13.0:compile, org.slf4j:slf4j-api:jar:1.7.6:compile, org.apache.jena:jena iri:jar:1.1.2:compile, xerces:xercesImpl:jar:2.11.0:compile, xml-apis:xml-apis:jar:1.4.01:compile, org.slf4j:slf4j-log4j12:jar:1.7.6:compile, log4j:log4j:jar:1.2.17:compile, org.neo4j:neo4j:jar:2.2.1:compile, org.neo4j:neo4j-kernel:jar:2.2.1:compile, org.neo4j:neo4j-primitive-collections:jar:2.2.1:compile, org.neo4j:neo4j-unsafe:jar:2.2.1:compile, org.neo4j:neo4j-io:jar:2.2.1:compile, org.neo4j:neo4j-csv:jar:2.2.1:compile, org.neo4j:neo4j-lucene-index:jar:2.2.1:compile, org.neo4j:neo4j-graph-algo:jar:2.2.1:compile, org.neo4j:neo4j-udc:jar:2.2.1:compile, org.neo4j:neo4j-graph-matching:jar:2.2.1:compile, org.neo4j:neo4j-cypher:jar:2.2.1:compile, org.scala-lang:scala-library:jar:2.10.5:compile, org.scala-lang:scala-reflect:jar:2.10.5:compile, org.neo4j:neo4j-cypher-compiler-1.9:jar:2.0.4:compile, org.neo4j:neo4j-cypher-compiler-2.0:jar:2.0.4:compile, org.neo4j:neo4j-cypher-compiler-2.1:jar:2.1.7:compile, org.neo4j:neo4j-cypher-compiler-2.2:jar:2.2.1:compile, org.parboiled:parboiled-scala_2.10:jar:1.1.7:compile, org.parboiled:parboiled-core:jar:1.1.7:compile, net.sf.opencsv:opencsv:jar:2.3:compile, com.googlecode.concurrentlinkedhashmap:concurrentlinkedhashmap-lru:jar:1.4:compile, org.neo4j:neo4j-jmx:jar:2.2.1:compile, org.neo4j:neo4j-consistency-check:jar:2.2.1:compile, org.elasticsearch:elasticsearch:jar:1.4.0:compile, org.apache.lucene:lucene-core:jar:4.10.2:compile, org.apache.lucene:lucene-analyzers-common:jar:4.10.2:compile, org.apache.lucene:lucene-queries:jar:4.10.2:compile, org.apache.lucene:lucene-memory:jar:4.10.2:compile, org.apache.lucene:lucene-highlighter:jar:4.10.2:compile, org.apache.lucene:lucene-queryparser:jar:4.10.2:compile, org.apache.lucene:lucene-sandbox:jar:4.10.2:compile, org.apache.lucene:lucene-suggest:jar:4.10.2:compile, org.apache.lucene:lucene-misc:jar:4.10.2:compile, org.apache.lucene:lucene-join:jar:4.10.2:compile, org.apache.lucene:lucene-grouping:jar:4.10.2:compile, org.apache.lucene:lucene-spatial:jar:4.10.2:compile, com.spatial4j:spatial4j:jar:0.4.1:compile, org.antlr:antlr-runtime:jar:3.5:compile, org.ow2.asm:asm:jar:4.1:compile, org.ow2.asm:asm-commons:jar:4.1:compile, commons-io:commons-io:jar:2.2:compile]
        Collected project classpath [/home/enigmatus/NetBeansProjects/KeywordSearch/target/classes]
        dealing with org.apache.jena:jena-core:jar:2.13.0:compile
        dealing with org.slf4j:slf4j-api:jar:1.7.6:compile
        dealing with org.apache.jena:jena-iri:jar:1.1.2:compile
        dealing with xerces:xercesImpl:jar:2.11.0:compile
        dealing with xml-apis:xml-apis:jar:1.4.01:compile
        dealing with org.slf4j:slf4j-log4j12:jar:1.7.6:compile
        dealing with log4j:log4j:jar:1.2.17:compile
        dealing with org.neo4j:neo4j:jar:2.2.1:compile
        dealing with org.neo4j:neo4j-kernel:jar:2.2.1:compile
        dealing with org.neo4j:neo4j-primitive-collections:jar:2.2.1:compile
        dealing with org.neo4j:neo4j-unsafe:jar:2.2.1:compile
        dealing with org.neo4j:neo4j-io:jar:2.2.1:compile
        dealing with org.neo4j:neo4j-csv:jar:2.2.1:compile
        dealing with org.neo4j:neo4j-lucene-index:jar:2.2.1:compile
        dealing with org.neo4j:neo4j-graph-algo:jar:2.2.1:compile
        dealing with org.neo4j:neo4j-udc:jar:2.2.1:compile
        dealing with org.neo4j:neo4j-graph-matching:jar:2.2.1:compile
        dealing with org.neo4j:neo4j-cypher:jar:2.2.1:compile
        dealing with org.scala-lang:scala-library:jar:2.10.5:compile
        dealing with org.scala-lang:scala-reflect:jar:2.10.5:compile
        dealing with org.neo4j:neo4j-cypher-compiler-1.9:jar:2.0.4:compile
        dealing with org.neo4j:neo4j-cypher-compiler-2.0:jar:2.0.4:compile
        dealing with org.neo4j:neo4j-cypher-compiler-2.1:jar:2.1.7:compile
        dealing with org.neo4j:neo4j-cypher-compiler-2.2:jar:2.2.1:compile
        dealing with org.parboiled:parboiled-scala_2.10:jar:1.1.7:compile
        dealing with org.parboiled:parboiled-core:jar:1.1.7:compile
        dealing with net.sf.opencsv:opencsv:jar:2.3:compile
        dealing with com.googlecode.concurrentlinkedhashmap:concurrentlinkedhashmap-lru:jar:1.4:compile
        dealing with org.neo4j:neo4j-jmx:jar:2.2.1:compile
        dealing with org.neo4j:neo4j-consistency-check:jar:2.2.1:compile
        dealing with org.elasticsearch:elasticsearch:jar:1.4.0:compile
        dealing with org.apache.lucene:lucene-core:jar:4.10.2:compile
        dealing with org.apache.lucene:lucene-analyzers-common:jar:4.10.2:compile
        dealing with org.apache.lucene:lucene-queries:jar:4.10.2:compile
        dealing with org.apache.lucene:lucene-memory:jar:4.10.2:compile
        dealing with org.apache.lucene:lucene-highlighter:jar:4.10.2:compile
        dealing with org.apache.lucene:lucene-queryparser:jar:4.10.2:compile
        dealing with org.apache.lucene:lucene-sandbox:jar:4.10.2:compile
        dealing with org.apache.lucene:lucene-suggest:jar:4.10.2:compile
        dealing with org.apache.lucene:lucene-misc:jar:4.10.2:compile
        dealing with org.apache.lucene:lucene-join:jar:4.10.2:compile
        dealing with org.apache.lucene:lucene-grouping:jar:4.10.2:compile
        dealing with org.apache.lucene:lucene-spatial:jar:4.10.2:compile
        dealing with com.spatial4j:spatial4j:jar:0.4.1:compile
        dealing with org.antlr:antlr-runtime:jar:3.5:compile
        dealing with org.ow2.asm:asm:jar:4.1:compile
        dealing with org.ow2.asm:asm-commons:jar:4.1:compile
        dealing with commons-io:commons-io:jar:2.2:compile
        Toolchains are ignored, 'executable' parameter is set to /usr/lib/jvm/default-java/bin/java
        Executing command line: /usr/lib/jvm/default-java/bin/java -classpath /home/enigmatus/NetBeansProjects/KeywordSearch/target/classes:/home/enigmatus/.m2/repository/org/apache/jena/jena-core/2.13.0/jena-core-2.13.0.jar:/home/enigmatus/.m2/repository/org/slf4j/slf4j-api/1.7.6/slf4j-api-1.7.6.jar:/home/enigmatus/.m2/repository/org/apache/jena/jena-iri/1.1.2/jena-iri-1.1.2.jar:/home/enigmatus/.m2/repository/xerces/xercesImpl/2.11.0/xercesImpl-2.11.0.jar:/home/enigmatus/.m2/repository/xml-apis/xml-apis/1.4.01/xml-apis-1.4.01.jar:/home/enigmatus/.m2/repository/org/slf4j/slf4j-log4j12/1.7.6/slf4j-log4j12-1.7.6.jar:/home/enigmatus/.m2/repository/log4j/log4j/1.2.17/log4j-1.2.17.jar:/home/enigmatus/.m2/repository/org/neo4j/neo4j/2.2.1/neo4j-2.2.1.jar:/home/enigmatus/.m2/repository/org/neo4j/neo4j-kernel/2.2.1/neo4j-kernel-2.2.1.jar:/home/enigmatus/.m2/repository/org/neo4j/neo4j-primitive-collections/2.2.1/neo4j-primitive-collections-2.2.1.jar:/home/enigmatus/.m2/repository/org/neo4j/neo4j-unsafe/2.2.1/neo4j-unsafe-2.2.1.jar:/home/enigmatus/.m2/repository/org/neo4j/neo4j-io/2.2.1/neo4j-io-2.2.1.jar:/home/enigmatus/.m2/repository/org/neo4j/neo4j-csv/2.2.1/neo4j-csv-2.2.1.jar:/home/enigmatus/.m2/repository/org/neo4j/neo4j-lucene-index/2.2.1/neo4j-lucene-index-2.2.1.jar:/home/enigmatus/.m2/repository/org/neo4j/neo4j-graph-algo/2.2.1/neo4j-graph-algo-2.2.1.jar:/home/enigmatus/.m2/repository/org/neo4j/neo4j-udc/2.2.1/neo4j-udc-2.2.1.jar:/home/enigmatus/.m2/repository/org/neo4j/neo4j-graph-matching/2.2.1/neo4j-graph-matching-2.2.1.jar:/home/enigmatus/.m2/repository/org/neo4j/neo4j-cypher/2.2.1/neo4j-cypher-2.2.1.jar:/home/enigmatus/.m2/repository/org/scala-lang/scala-library/2.10.5/scala-library-2.10.5.jar:/home/enigmatus/.m2/repository/org/scala-lang/scala-reflect/2.10.5/scala-reflect-2.10.5.jar:/home/enigmatus/.m2/repository/org/neo4j/neo4j-cypher-compiler-1.9/2.0.4/neo4j-cypher-compiler-1.9-2.0.4.jar:/home/enigmatus/.m2/repository/org/neo4j/neo4j-cypher-compiler-2.0/2.0.4/neo4j-cypher-compiler-2.0-2.0.4.jar:/home/enigmatus/.m2/repository/org/neo4j/neo4j-cypher-compiler-2.1/2.1.7/neo4j-cypher-compiler-2.1-2.1.7.jar:/home/enigmatus/.m2/repository/org/neo4j/neo4j-cypher-compiler-2.2/2.2.1/neo4j-cypher-compiler-2.2-2.2.1.jar:/home/enigmatus/.m2/repository/org/parboiled/parboiled-scala_2.10/1.1.7/parboiled-scala_2.10-1.1.7.jar:/home/enigmatus/.m2/repository/org/parboiled/parboiled-core/1.1.7/parboiled-core-1.1.7.jar:/home/enigmatus/.m2/repository/net/sf/opencsv/opencsv/2.3/opencsv-2.3.jar:/home/enigmatus/.m2/repository/com/googlecode/concurrentlinkedhashmap/concurrentlinkedhashmap-lru/1.4/concurrentlinkedhashmap-lru-1.4.jar:/home/enigmatus/.m2/repository/org/neo4j/neo4j-jmx/2.2.1/neo4j-jmx-2.2.1.jar:/home/enigmatus/.m2/repository/org/neo4j/neo4j-consistency-check/2.2.1/neo4j-consistency-check-2.2.1.jar:/home/enigmatus/.m2/repository/org/elasticsearch/elasticsearch/1.4.0/elasticsearch-1.4.0.jar:/home/enigmatus/.m2/repository/org/apache/lucene/lucene-core/4.10.2/lucene-core-4.10.2.jar:/home/enigmatus/.m2/repository/org/apache/lucene/lucene-analyzers-common/4.10.2/lucene-analyzers-common-4.10.2.jar:/home/enigmatus/.m2/repository/org/apache/lucene/lucene-queries/4.10.2/lucene-queries-4.10.2.jar:/home/enigmatus/.m2/repository/org/apache/lucene/lucene-memory/4.10.2/lucene-memory-4.10.2.jar:/home/enigmatus/.m2/repository/org/apache/lucene/lucene-highlighter/4.10.2/lucene-highlighter-4.10.2.jar:/home/enigmatus/.m2/repository/org/apache/lucene/lucene-queryparser/4.10.2/lucene-queryparser-4.10.2.jar:/home/enigmatus/.m2/repository/org/apache/lucene/lucene-sandbox/4.10.2/lucene-sandbox-4.10.2.jar:/home/enigmatus/.m2/repository/org/apache/lucene/lucene-suggest/4.10.2/lucene-suggest-4.10.2.jar:/home/enigmatus/.m2/repository/org/apache/lucene/lucene-misc/4.10.2/lucene-misc-4.10.2.jar:/home/enigmatus/.m2/repository/org/apache/lucene/lucene-join/4.10.2/lucene-join-4.10.2.jar:/home/enigmatus/.m2/repository/org/apache/lucene/lucene-grouping/4.10.2/lucene-grouping-4.10.2.jar:/home/enigmatus/.m2/repository/org/apache/lucene/lucene-spatial/4.10.2/lucene-spatial-4.10.2.jar:/home/enigmatus/.m2/repository/com/spatial4j/spatial4j/0.4.1/spatial4j-0.4.1.jar:/home/enigmatus/.m2/repository/org/antlr/antlr-runtime/3.5/antlr-runtime-3.5.jar:/home/enigmatus/.m2/repository/org/ow2/asm/asm/4.1/asm-4.1.jar:/home/enigmatus/.m2/repository/org/ow2/asm/asm-commons/4.1/asm-commons-4.1.jar:/home/enigmatus/.m2/repository/commons-io/commons-io/2.2/commons-io-2.2.jar org.dbpedia.keywordsearch.uinterface.uiclass
        /home/enigmatus/GSOC/database5
        log4j:WARN No appenders could be found for logger (com.hp.hpl.jena.util.FileManager).
        log4j:WARN Please initialize the log4j system properly.
        log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
        Exception in thread "main" java.lang.NullPointerException
            at org.dbpedia.keywordsearch.importer.neo4j.graphdbform(neo4j.java:73)
            at org.dbpedia.keywordsearch.uinterface.uiclass.main(uiclass.java:38)

在行

try (Transaction tx = graphdb.beginTx()) 

这意味着我的图形数据库服务不会被返回。但我无法理解它是如何可能的。 任何人都可以解释我犯错的地方。

由于

Aryaman

0 个答案:

没有答案