- edited description
Compilation 5.0.21 with JDK 17 fails
Hi, i am new to WiseMapping and trying to setup it for your NGO. I messed a lot with it and got to compile, however a few errors occure, which i just want to document here:
we have a system up and running with Ubuntu 20, amd64, JDK 17, using Tomcat 10
cd /opt
git clone https://bitbucket.org/wisemapping/wisemapping-open-source.git wisemapping
cd /opt/wisemapping/
mvn clean install
With JDK 17 i cannot compile at all:
[ERROR] Error executing Maven.
[ERROR] java.lang.IllegalStateException: Unable to load cache item
[ERROR] Caused by: Unable to load cache item
[ERROR] Caused by: Could not initialize class com.google.inject.internal.cglib.core.$MethodWrapper
[ERROR] Caused by: Exception com.google.inject.internal.cglib.core.$CodeGenerationException: java.lang.reflect.InaccessibleObjectException-->Unable to make protected final java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) throws java.lang.ClassFormatError accessible: module java.base does not "opens java.lang" to unnamed module @69a10787 [in thread "main"]
then i change to JDK 11:
export JAVA_HOME=/usr/lib/jvm/java-1.11.0-openjdk-amd64 #falls es mit JDK 17 failt
mvn clean install
Compiling again:
[INFO] Reactor Summary for WiseMapping Project 5.0.21-SNAPSHOT:
[INFO]
[INFO] WiseMapping Project ................................ SUCCESS [ 0.257 s]
[INFO] WiseMapping Frontend ............................... SUCCESS [ 7.609 s]
[INFO] WiseMapping Webapp ................................. FAILURE [ 34.963 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 42.963 s
[INFO] Finished at: 2023-07-17T22:22:05+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.jacoco:jacoco-maven-plugin:0.8.8:check (default-check) on project wise-webapp: Coverage checks have not been met. See log for details. -> [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
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <args> -rf :wise-webapp
then i remove jacoco plugin from pom.xml
again compiling:
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for WiseMapping Project 5.0.21-SNAPSHOT:
[INFO]
[INFO] WiseMapping Project ................................ SUCCESS [ 0.246 s]
[INFO] WiseMapping Frontend ............................... SUCCESS [ 4.506 s]
[INFO] WiseMapping Webapp ................................. FAILURE [ 33.318 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 38.185 s
[INFO] Finished at: 2023-07-17T22:23:33+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-failsafe-plugin:2.12:verify (default) on project wise-webapp: There are test failures.
[ERROR]
[ERROR] Please refer to /opt/wisemapping/wise-webapp/target/failsafe-reports for the individual test results.
[ERROR] -> [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/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <args> -rf :wise-webapp
removing failsafe from pom.xml
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for WiseMapping Project 5.0.21-SNAPSHOT:
[INFO]
[INFO] WiseMapping Project ................................ SUCCESS [ 0.272 s]
[INFO] WiseMapping Frontend ............................... SUCCESS [ 4.627 s]
[INFO] WiseMapping Webapp ................................. SUCCESS [ 31.076 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 36.095 s
[INFO] Finished at: 2023-07-17T22:24:45+02:00
[INFO] ------------------------------------------------------------------------
How to compile with JDK 17, and how to avoid the problems wie jacoco and failsafe deps?
cheers, Mario
ps: problems occure less or more with develop branch, master branch, older commits as well (depending on the plugins in pom.xml. jacoco joined some month ago)
Comments (4)
-
reporter -
Thanks for the feedback. I’m working on support for Tomcat 10 + Spring 6 + Java 1.7. I should be able to complete this in a couple of weeks. If you care intested, you take a look at: https://bitbucket.org/wisemapping/wisemapping-open-source/branch/feature/update_spring
-
- changed status to open
-
- changed status to resolved
Changes merged to develop.
- Log in to comment