BatchInserter初始化产生ArrayIndexOutOfBounds和ExceptionInInitializationError [英] BatchInserter initialization yields ArrayIndexOutOfBounds and ExceptionInInitializationError

查看:156
本文介绍了BatchInserter初始化产生ArrayIndexOutOfBounds和ExceptionInInitializationError的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要做的只是以下事情:

All I'm trying to do is the following:

    BatchInserter ins = BatchInserters.inserter("target/batchinserter-example");

其中,"target/batchinserter-example"是给定的商店目录.编译正常,但是我得到了:

where "target/batchinserter-example" is a given store directory. It compiles fine, but I get:

Exception in thread "main" java.lang.ExceptionInInitializerError
    at org.neo4j.unsafe.batchinsert.BatchInserterImpl.rejectAutoUpgrade(BatchInserterImpl.java:556)
    at org.neo4j.unsafe.batchinsert.BatchInserterImpl.<init>(BatchInserterImpl.java:219)
    at org.neo4j.unsafe.batchinsert.BatchInserters.inserter(BatchInserters.java:94)
    at org.neo4j.unsafe.batchinsert.BatchInserters.inserter(BatchInserters.java:88)
    at org.neo4j.unsafe.batchinsert.BatchInserters.inserter(BatchInserters.java:63)
    at org.neo4j.unsafe.batchinsert.BatchInserters.inserter(BatchInserters.java:51)
    at NeoBatchInserter.main(NeoBatchInserter.java:26)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
    at org.neo4j.graphdb.factory.GraphDatabaseSettings.<clinit>(GraphDatabaseSettings.java:69)
    ... 7 more

我不明白这是怎么工作的.我实际上只是在调用采用String的构造函数.我现在很沮丧.如果有更好的方法可以做到这一点,欢迎尝试.我想做的就是设置BatchInserter(从头开始),以便我可以开始工作.

I don't understand how this isn't working. I'm literally just calling a constructor that takes a String. I'm quite frustrated at the moment. If there is a better way to do this, I am welcome to trying it. All I want to do is set up a BatchInserter (from scratch) so that I can begin my work.

编辑: 我只是尝试从测试图中将其指向graph.db,但这仍然行不通...

EDIT: I just attempted to point it a graph.db from a test graph, and this still didn't work...

我也在使用kernel.2.1.3

I'm also using kernel.2.1.3

编辑2 : 由于我的服务器是2.1.2,因此我将jars更改为2.1.2版本,但仍然遇到相同的错误.

EDIT 2: Since my server is 2.1.2, I changed my jars to the 2.1.2 version, yet I still get the same error.

推荐答案

创建目录所使用的Neo4j版本是什么?我很确定您不能在早期版本中使用2.1.3的batchinserter.

What version of Neo4j was the directory created with? I'm pretty sure that you cannot use batchinserter of 2.1.3 with an earlier version.

安装2.1.3,在neo4j.properties中设置allow_store_upgrade=true,启动服务器并关闭它.干净关机至关重要.然后使用您的batchinserter代码.

Install 2.1.3, set allow_store_upgrade=true in neo4j.properties, start the server and shut it down. It's crucial to have a clean shutdown. Then use your batchinserter code.

这篇关于BatchInserter初始化产生ArrayIndexOutOfBounds和ExceptionInInitializationError的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆