JPro-one / HelloJPro-Maven

HelloWorld for JPro using Maven
https://www.jpro.one
14 stars 7 forks source link

[ERROR] Failed to execute goal com.sandec.jpro:jpro-maven-plugin:2021.1.1:run (default-cli) on project hellojpro-maven: Error while starting the server.: Cannot run program "home:bin:java" #16

Open boualimed opened 3 years ago

boualimed commented 3 years ago

Hello, I'm new to JPRO, I've started with HelloJPro, unfortunately, I have got a compilation error. what is the cause of this error?

sudo mvn compile jpro:run WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/usr/share/maven/lib/guice.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1 WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release [INFO] Scanning for projects... [INFO] [INFO] ------------------< com.sandec.jpro:hellojpro-maven >------------------- [INFO] Building Hello JPro! 1.0-SNAPSHOT [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ hellojpro-maven --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 5 resources [INFO] [INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ hellojpro-maven --- [INFO] Nothing to compile - all classes are up to date [INFO] [INFO] >>> jpro-maven-plugin:2021.1.1:run (default-cli) > compile @ hellojpro-maven >>> [INFO] [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ hellojpro-maven --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 5 resources [INFO] [INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ hellojpro-maven --- [INFO] Nothing to compile - all classes are up to date [INFO] [INFO] <<< jpro-maven-plugin:2021.1.1:run (default-cli) < compile @ hellojpro-maven <<< [INFO] [INFO] [INFO] --- jpro-maven-plugin:2021.1.1:run (default-cli) @ hellojpro-maven --- [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1.765 s [INFO] Finished at: 2021-05-31T09:12:03+02:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal com.sandec.jpro:jpro-maven-plugin:2021.1.1:run (default-cli) on project hellojpro-maven: Error while starting the server.: Cannot run program "home:bin:java" (in directory "/home/bouali/Java/HelloJPro-Maven"): error=2, No such file or directory -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

FlorianKirmaier commented 3 years ago

Hi @boualimed

Thank you for the report. Which OS are you using?

I guess your JAVA_HOME isn't set, but only the java command from the command line is available. Since the latest version, we use the java command from the JAVA_HOME variable. We should probably use the java command from the command line, when the JAVA_HOME isn't set. Can you try it with JPro Version 2021.1.0?

boualimed commented 3 years ago

Thank you @FlorianKirmaier for your response. I'm using Wsl2 win10 home. JAVA_HOME is correctly set. The same thing has happened with eclipse maven win10. Ok, I will try JPro Version 2021.1.0.