我試圖在新機器上加載一個現有的neo4j數據庫。舊機器運行1.9.M05,而新機器運行1.9RC1。我只是將data/graph.db文件從舊安裝複製到新安裝。嵌入式GraphDatabaseServer Neo4j屬性解析錯誤
服務器啓動正常,webadmin界面看起來像一切正常運行。
但是,當我試圖從Java訪問數據庫作爲嵌入數據庫時,出現下面的錯誤,說它無法分析mapped_memory參數。當我在代碼庫和neo4j源代碼中尋找「94M」的「壞值」時,我找不到任何提及它的地方。 webadmin接口報告mapped_memory屬性設置爲45M。
如果在db文件中存儲了一個錯誤的值,有沒有辦法在之前強制指定的.props文件加載已損壞的設置?
調用代碼:
GraphDatabaseFactory factory =
new org.neo4j.graphdb.factory.GraphDatabaseFactory();
GraphDatabaseService graphDb = factory
.newEmbeddedDatabaseBuilder(DB_PATH)
.loadPropertiesFromFile(NEO_HOME + "conf/neo4j.properties")
.newGraphDatabase();
例外:
[java] Exception in thread "main" java.lang.IllegalArgumentException: Bad value '-94M' for setting 'neostore.propertystore.db.strings.mapped_memory': value does not match expression:\d+[kmgKMG]?
[java] at org.neo4j.helpers.Settings$DefaultSetting.apply(Settings.java:788)
[java] at org.neo4j.helpers.Settings$DefaultSetting.apply(Settings.java:708)
[java] at org.neo4j.graphdb.factory.GraphDatabaseSetting$SettingWrapper.apply(GraphDatabaseSetting.java:215)
[java] at org.neo4j.graphdb.factory.GraphDatabaseSetting$SettingWrapper.apply(GraphDatabaseSetting.java:189)
[java] at org.neo4j.kernel.configuration.ConfigurationValidator.validate(ConfigurationValidator.java:50)
[java] at org.neo4j.kernel.configuration.Config.applyChanges(Config.java:121)
[java] at org.neo4j.kernel.InternalAbstractGraphDatabase.create(InternalAbstractGraphDatabase.java:337)
[java] at org.neo4j.kernel.InternalAbstractGraphDatabase.run(InternalAbstractGraphDatabase.java:254)
[java] at org.neo4j.kernel.EmbeddedGraphDatabase.<init>(EmbeddedGraphDatabase.java:90)
[java] at org.neo4j.graphdb.factory.GraphDatabaseFactory$1.newDatabase(GraphDatabaseFactory.java:85)
[java] at org.neo4j.graphdb.factory.GraphDatabaseBuilder.newGraphDatabase(GraphDatabaseBuilder.java:205)
[java] at com.mycompany.CMDRunner.printNeoSegments(CMDRunner.java:27)
你能告訴'neo4j.properties'這裏還是送我到電子郵件? – Evgenii 2013-04-30 13:30:30