NullPointerException после обновления Neo4j 3.3.1 при доступе к Index - PullRequest
0 голосов
/ 26 июня 2018

Я обновил Neo4j с 2.3.8 до 3.3.1. При доступе к hit = index.query (query); я получаю исключение nullPointerException. Ниже мой код.

protected Record getNext() throws Exception {          
Transaction tx=neo.beginTx();
try {
    if (hits == null) {
        if (query!=null) {
        hits = index.query(query);
      tx.success();       
    } 
    }
    T next = hits.next();
    if (next == null) {
        return finished();
    } else {
        return nodeToRecord.call(next);
    }
}

Вы можете проверить код, указанный выше. Я проверяю запрос! = Null, но все еще получаю нулевой указатель. Проблема с индексом?

Ниже приведена ошибка

 Unexpected error : java.lang.NullPointerException
    at au.com.graph.NodeIterator.getNext(GraphNodeIterator.java:64)
    at au.com.graph.NodeIterator.getNext.getNext(GraphNodeIterator.java:22)
    at com.googlecode.totallylazy.iterators.StatefulIterator.hasNext(StatefulIterator.java:23)
    at com.googlecode.totallylazy.iterators.StatefulIterator.next(StatefulIterator.java:36)
    at com.googlecode.totallylazy.Computation$2.call(Computation.java:80)
    at com.googlecode.totallylazy.callables.LazyCallable.get(LazyCallable.java:19)
    at com.googlecode.totallylazy.Lazy.call(Lazy.java:22)
    at com.googlecode.totallylazy.Computation.isEmpty(Computation.java:121)
...