Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copy store not working with v3.2.6 #23

Open
amadfida opened this issue Oct 15, 2017 · 2 comments
Open

Copy store not working with v3.2.6 #23

amadfida opened this issue Oct 15, 2017 · 2 comments

Comments

@amadfida
Copy link

amadfida commented Oct 15, 2017

Running following command on a 3.2.6 database, with updated dependency to 3.2.6 neo4j.version.

./copy-store.sh community graph.db target.db

Caused by: java.lang.IllegalArgumentException: Can not set final org.neo4j.unsafe.batchinsert.DirectRecordAccessSet field org.neo4j.unsafe.batchinsert.internal.BatchInserterImpl.recordAccess to org.neo4j.unsafe.batchinsert.internal.FileSystemClosingBatchInserter at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:167) at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:171) at sun.reflect.UnsafeFieldAccessorImpl.ensureObj(UnsafeFieldAccessorImpl.java:58) at sun.reflect.UnsafeQualifiedObjectFieldAccessorImpl.get(UnsafeQualifiedObjectFieldAccessorImpl.java:38) at java.lang.reflect.Field.get(Field.java:393) at org.neo4j.tool.StoreCopy.getFlusher(StoreCopy.java:96) at org.neo4j.tool.StoreCopy.copyStore(StoreCopy.java:76) at org.neo4j.tool.StoreCopy.main(StoreCopy.java:47)

@amadfida
Copy link
Author

amadfida commented Oct 15, 2017

this can be fixed with the following changes in StoreCopy.java copystore method,

        DefaultFileSystemAbstraction fileSystem = new DefaultFileSystemAbstraction();
        Iterable kernelExtensions = Service.load(KernelExtensionFactory.class);

        Pair<Long, Long> highestIds = getHighestNodeId(source);
        String pageCacheSize = getProperty("dbms.pagecache.memory", "2G");
        BatchInserter targetDb = BatchInserters.inserter(target, stringMap("dbms.pagecache.memory", pageCacheSize));
        BatchInserter sourceDb = BatchInserters.inserter(source,
                                                         fileSystem,
                                                         stringMap("dbms.pagecache.memory",
                                                                   getProperty("dbms.pagecache.memory.source", pageCacheSize)),
                                                         kernelExtensions);

@mdantonio
Copy link

Same problem here, with version 3.2.2

[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.1:java (default-cli) on project store-util: An exception occured while executing the Java class. null: Invo
cationTargetException: Can not set final org.neo4j.unsafe.batchinsert.DirectRecordAccessSet field org.neo4j.unsafe.batchinsert.internal.BatchInserterImpl.recordAccess to org.ne
o4j.unsafe.batchinsert.internal.FileSystemClosingBatchInserter -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.1:java (default-cli) on project store-util: An exception oc
cured while executing the Java class. null
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
        at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: An exception occured while executing the Java class. null
        at org.codehaus.mojo.exec.ExecJavaMojo.execute(ExecJavaMojo.java:345)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
        ... 20 more
Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:290)
        at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.IllegalArgumentException: Can not set final org.neo4j.unsafe.batchinsert.DirectRecordAccessSet field org.neo4j.unsafe.batchinsert.internal.BatchInserterImpl.recordAccess to org.neo4j.unsafe.batchinsert.internal.FileSystemClosingBatchInserter
        at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:167)
        at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:171)
        at sun.reflect.UnsafeFieldAccessorImpl.ensureObj(UnsafeFieldAccessorImpl.java:58)
        at sun.reflect.UnsafeQualifiedObjectFieldAccessorImpl.get(UnsafeQualifiedObjectFieldAccessorImpl.java:38)
        at java.lang.reflect.Field.get(Field.java:393)
        at org.neo4j.tool.StoreCopy.getFlusher(StoreCopy.java:96)
        at org.neo4j.tool.StoreCopy.copyStore(StoreCopy.java:76)
        at org.neo4j.tool.StoreCopy.main(StoreCopy.java:47)
        ... 6 more

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants