Could you share your pom.xml? Michael
On Wed, Dec 10, 2014 at 5:06 PM, Abderraouf Mehdi Bouhali < [email protected]> wrote: > I take the same post as is in StackOverflow > <http://stackoverflow.com/questions/27403948/neo4j-2-1-6-hello-world-in-netbeans-maven-project> > > > I'm new to Neo4j and my configuration is : > > * OS : Windows 8 > * Neo4j community 2.1.6 (latest stable) > * IDE : NetBeans 8.0.2 (latest) > * java -version > > java version "1.8.0_25"Java(TM) SE Runtime Environment (build > 1.8.0_25-b18)Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode) > > > 1. I created a maven Java project and put the Hello world example > provided by Neo4j guys > <http://neo4j.com/docs/2.1.6/tutorials-java-embedded-hello-world.html> for > the appropriate version. > 2. I added all the main dependencies (neo4j-kernel 2.1.6) and maven > transitively added the remaining dependencies. > 3. Build process is 100% OK > > I still get a the following exception at runtime : > > Exception in thread "main" java.lang.RuntimeException: Error starting > org.neo4j.kernel.EmbeddedGraphDatabase, > C:\Users\Mehdy\Documents\NetBeansProjects\neo4j-example\target\neo4j-hello-db > > I looked in the stack trace and I found $EmbeddedGraphDatabase constructor > is deprecated. > > Here's the whole console output : > > ------------------------------------------------------------------------Building > neo4j-example > 1.0-SNAPSHOT------------------------------------------------------------------------ > --- exec-maven-plugin:1.2.1:exec (default-cli) @ neo4j-example ---Exception > in thread "main" java.lang.RuntimeException: Error starting > org.neo4j.kernel.EmbeddedGraphDatabase, > C:\Users\Mehdy\Documents\NetBeansProjects\neo4j-example\target\neo4j-hello-db > at > org.neo4j.kernel.InternalAbstractGraphDatabase.run(InternalAbstractGraphDatabase.java:366) > at > org.neo4j.kernel.EmbeddedGraphDatabase.<init>(EmbeddedGraphDatabase.java:59) > at > org.neo4j.graphdb.factory.GraphDatabaseFactory$1.newDatabase(GraphDatabaseFactory.java:91) > at > org.neo4j.graphdb.factory.GraphDatabaseBuilder.newGraphDatabase(GraphDatabaseBuilder.java:181) > at > org.neo4j.graphdb.factory.GraphDatabaseFactory.newEmbeddedDatabase(GraphDatabaseFactory.java:71) > at com.lirmm.neo4j.example.Hello.createDb(Hello.java:51) > at com.lirmm.neo4j.example.Hello.main(Hello.java:41)Caused by: > org.neo4j.kernel.lifecycle.LifecycleException: Component > 'org.neo4j.kernel.impl.transaction.XaDataSourceManager@53f65459' was > successfully initialized, but failed to start. Please see attached cause > exception. > at > org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:513) > at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:115) > at > org.neo4j.kernel.InternalAbstractGraphDatabase.run(InternalAbstractGraphDatabase.java:343) > ... 6 moreCaused by: org.neo4j.kernel.lifecycle.LifecycleException: > Component 'org.neo4j.kernel.impl.nioneo.xa.NeoStoreXaDataSource@4d95d2a2' was > successfully initialized, but failed to start. Please see attached cause > exception. > at > org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:513) > at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:115) > at > org.neo4j.kernel.impl.transaction.XaDataSourceManager.start(XaDataSourceManager.java:164) > at > org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:507) > ... 8 moreCaused by: java.lang.IllegalArgumentException: No schema index > provider org.neo4j.kernel.api.index.SchemaIndexProvider found. Kernel > extensions available on classpath: > Class path entries: > C:\Users\Mehdy\Documents\NetBeansProjects\neo4j-example\target\classes > > C:\Users\Mehdy\.m2\repository\org\neo4j\neo4j-kernel\2.1.6\neo4j-kernel-2.1.6.jar > > C:\Users\Mehdy\.m2\repository\org\neo4j\neo4j-primitive-collections\2.1.6\neo4j-primitive-collections-2.1.6.jar > > C:\Users\Mehdy\.m2\repository\org\apache\geronimo\specs\geronimo-jta_1.1_spec\1.1.1\geronimo-jta_1.1_spec-1.1.1.jar > at > org.neo4j.kernel.api.index.SchemaIndexProvider$2.select(SchemaIndexProvider.java:140) > at > org.neo4j.kernel.extension.KernelExtensions.resolveDependency(KernelExtensions.java:206) > at > org.neo4j.kernel.InternalAbstractGraphDatabase$DependencyResolverImpl.resolveDependency(InternalAbstractGraphDatabase.java:1524) > at > org.neo4j.kernel.impl.nioneo.xa.NeoStoreXaDataSource.start(NeoStoreXaDataSource.java:337) > at > org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:507) > ... 11 > more------------------------------------------------------------------------ > BUILD > FAILURE------------------------------------------------------------------------Total > time: 10.883sFinished at: Wed Dec 10 12:55:47 CET 2014Final Memory: > 5M/72M------------------------------------------------------------------------Failed > to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (default-cli) > on project neo4j-example: Command execution failed. Process exited with an > error: 1 (Exit value: 1) -> [Help 1] > org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute > goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (default-cli) on project > neo4j-example: Command execution failed. > at > org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217) > 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:84) > at > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) > at > org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) > at > org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) > at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320) > at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) > at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537) > at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196) > at org.apache.maven.cli.MavenCli.main(MavenCli.java:141) > 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:483) > at > org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290) > at > org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230) > at > org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409) > at > org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)Caused > by: org.apache.maven.plugin.MojoExecutionException: Command execution failed. > at org.codehaus.mojo.exec.ExecMojo.execute(ExecMojo.java:362) > at > org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101) > at > org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209) > ... 19 moreCaused by: org.apache.commons.exec.ExecuteException: Process > exited with an error: 1 (Exit value: 1) > at > org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:377) > at > org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:160) > at org.codehaus.mojo.exec.ExecMojo.executeCommandLine(ExecMojo.java:610) > at org.codehaus.mojo.exec.ExecMojo.execute(ExecMojo.java:352) > ... 21 more > Re-run Maven using the -X switch to enable full debug logging. > For more information about the errors and possible solutions, please read the > following articles:[Help 1] > http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException > > I don't think it's a dependency problem but the use of a deprecated method. > How can I get rid of this code snippet and use something compatible with > neo4j 2.1.6 ? > > I tried different solutions found in both StackOverflow and this group, > but still the same result. > What should I do to make this work ? > > -- > You received this message because you are subscribed to the Google Groups > "Neo4j" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Neo4j" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
