neo4j drwho数据集升级到3.0无法正常工作

时间:2016-06-15 09:41:06

标签: neo4j dataset upgrade

我正试图在我的Mac OSX中使用来自http://neo4j.com/developer/example-data/的“Jim Webber的Doctor Who数据集”和Neo4j 3.0.1社区。

我正在执行这些步骤(doc是here):

  1. 将zip数据文件下载到导入目录中(为方便起见),并将其重命名为graph.db
  2. dbms.allow_format_migration=true
  3. 中设置$NEO4J_HOME/conf/neo4j.conf
  4. 使用$NEO4J_HOME/bin/neo4j-admin import --mode=database --database=graph.db --from=$NEO4J_HOME/import/graph.db/
  5. 导入数据
  6. 启动neo4j服务器
  7. neo4j控制台无法启动,并显示以下错误消息:

    bin/neo4j console
    Starting Neo4j. 
    2016-06-15 09:24:11.371+0000 INFO  Starting...
    2016-06-15 09:24:12.084+0000 INFO  Bolt enabled on localhost:7687.
    2016-06-15 09:24:12.296+0000 INFO  Starting upgrade of database
    2016-06-15 09:24:12.315+0000 ERROR Failed to start Neo4j: Starting  Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabase@51f07bf0' was successfully initialized, but failed to start. Please see attached cause exception. Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabase@51f07bf0' was successfully initialized, but failed to start. Please see attached cause exception.
    org.neo4j.server.ServerStartupException: Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabase@51f07bf0' was successfully initialized, but failed to start. Please see attached cause exception.
    at org.neo4j.server.exception.ServerStartupErrors.translateToServerStartupError(ServerStartupErrors.java:68)
    at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:217)
    at org.neo4j.server.ServerBootstrapper.start(ServerBootstrapper.java:81)
    at org.neo4j.server.ServerBootstrapper.start(ServerBootstrapper.java:60)
    at org.neo4j.server.CommunityEntryPoint.main(CommunityEntryPoint.java:28)
    Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.server.database.LifecycleManagingDatabase@51f07bf0' was successfully initialized, but failed to start. Please see attached cause exception.
    at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:444)
    at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:107)
    at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:189)
    ... 3 more
    Caused by: java.lang.RuntimeException: Error starting org.neo4j.kernel.impl.factory.CommunityFacadeFactory, /Users/miro/Documents/dev/neo4j/neo4j-community-3.0.1/data/databases/graph.db
    at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.newFacade(GraphDatabaseFacadeFactory.java:144)
    at org.neo4j.kernel.impl.factory.CommunityFacadeFactory.newFacade(CommunityFacadeFactory.java:40)
    at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.newFacade(GraphDatabaseFacadeFactory.java:108)
    at org.neo4j.server.CommunityNeoServer.lambda$static$32(CommunityNeoServer.java:55)
    at org.neo4j.server.database.LifecycleManagingDatabase.start(LifecycleManagingDatabase.java:89)
    at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:434)
    ... 5 more
    Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.NeoStoreDataSource@7b464635' was successfully initialized, but failed to start. Please see attached cause exception.
    at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:444)
    at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:107)
    at org.neo4j.kernel.impl.transaction.state.DataSourceManager.start(DataSourceManager.java:99)
    at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:434)
    at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:107)
    at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.newFacade(GraphDatabaseFacadeFactory.java:140)
    ... 10 more
    Caused by: org.neo4j.kernel.impl.storemigration.StoreUpgrader$UnexpectedUpgradingStoreVersionException: '/Users/miro/Documents/dev/neo4j/neo4j-community-3.0.1/data/databases/graph.db/neostore' has a store version 'v0.A.0' that we cannot upgrade from.
    at org.neo4j.kernel.impl.storemigration.UpgradableDatabase.checkUpgradeable(UpgradableDatabase.java:122)
    at org.neo4j.kernel.impl.storemigration.StoreUpgrader.migrateIfNeeded(StoreUpgrader.java:129)
    at org.neo4j.kernel.impl.storemigration.DatabaseMigrator.migrate(DatabaseMigrator.java:98)
    at org.neo4j.kernel.NeoStoreDataSource.upgradeStore(NeoStoreDataSource.java:554)
    at org.neo4j.kernel.NeoStoreDataSource.start(NeoStoreDataSource.java:433)
    at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:434)
    ... 15 more
    

    是否有人知道如何修复它?有没有人设法使用doc中的数据集? 谢谢!

1 个答案:

答案 0 :(得分:4)

Neo4j 3.0允许从任何干净关闭的Neo4j 2.x数据集直接升级。然而,您所指的DrWho数据集来自Neo4j 1.9(甚至更早)的旧时代。因此,您需要两步升级过程:

  1. 下载Neo4j 2.3.3(或任何新的2.x版本)
  2. 将drwho.zip解压缩到data/graph.db
  3. allow_store_upgrade=true
  4. 中设置conf/neo4j.properties
  5. 启动数据库并正常停止
  6. unpack neo4j 3.0.x
  7. data/graph.db从Neo4j 2.x复制到data/databases/graph.db
  8. dbms.allow_format_migration=true
  9. 中设置conf/neo4j.conf
  10. 启动Neo4j 3.0.x