java - GraphDatabaseFactory not found while compiling neo4j project with maven -


i'm trying compile simple project create database graphdatabasefactory command:

mvn compile

then, i'm getting success when trying execute file:

` package com.milanamos;  import java.io.file; import java.io.ioexception;  import org.neo4j.graphdb.graphdatabaseservice; import org.neo4j.graphdb.factory.graphdatabasefactory;   public class milanamoscmd {       public static void main(string[] args) throws ioexception {         final int n = 10;         graphdatabasefactory dbfactory = new graphdatabasefactory();         graphdatabaseservice db= dbfactory.newembeddeddatabase(new file("c:/documents"));             long t2 = system.currenttimemillis();             ............              long t3 = system.currenttimemillis();             system.out.println("generate "+ (t3-t2) +"ms");             system.out.println("done successfully");     }  }` 

i got this:

` [info] --- exec-maven-plugin:1.6.0:java (default-cli) @ planetoptim-neo4j --- [warning] java.lang.noclassdeffounderror: org/neo4j/graphdb/factory/graphdatabasefactory         @ com.milanamos.milanamoscmd.main(milanamoscmd.java:24)         @ sun.reflect.nativemethodaccessorimpl.invoke0(native method)         @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:62)         @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43)         @ java.lang.reflect.method.invoke(method.java:498)         @ org.codehaus.mojo.exec.execjavamojo$1.run(execjavamojo.java:282)         @ java.lang.thread.run(thread.java:748) caused by: java.lang.classnotfoundexception: org.neo4j.graphdb.factory.graphdatabasefactory         @ java.net.urlclassloader.findclass(urlclassloader.java:381)         @ java.lang.classloader.loadclass(classloader.java:424)         @ java.lang.classloader.loadclass(classloader.java:357)         ... 7 more [info] ------------------------------------------------------------------------ [info] build failure [info] ------------------------------------------------------------------------ [info] total time: 0.919 s [info] finished at: 2017-09-10t19:56:10+02:00 [info] final memory: 19m/609m [info] ------------------------------------------------------------------------ [error] failed execute goal org.codehaus.mojo:exec-maven-plugin:1.6.0:java (default-cli) on project planetoptim-neo4j: exception occured while executing java class. org/neo4j/graphdb/factory/graphdatabasefactory: org.neo4j.graphdb.factory.graphdatabasefactory -> ` 

any please.

thank you


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -