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

MOA devel docker image fails to build with Java 8 #275

Open
nuwangunasekara opened this issue Apr 4, 2023 · 1 comment
Open

MOA devel docker image fails to build with Java 8 #275

nuwangunasekara opened this issue Apr 4, 2023 · 1 comment

Comments

@nuwangunasekara
Copy link
Collaborator

nuwangunasekara commented Apr 4, 2023

MOA docker image fail to build with Java 8.

docker/devel-gui.Dockerfile:

      openjdk-8-jdk \

where meka-1.9.7.jar is build with version 55.0 (Java SE 11)

jar xf meka-1.9.7.jar
cd meka
find ./ -name 'Metrics.class'
.//core/Metrics.class

file .//core/Metrics.class                  
.//core/Metrics.class: compiled Java class data, version 55.0 (Java SE 11)

Hence, the build inside the docker devel image fails with below error (full log):

#10 54.78 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:2.8.1:jar (attach-javadocs) on project moa: MavenReportException: Error while creating archive: 
#10 54.78 [ERROR] Exit code: 1 - /app/moa/moa/src/main/java/moa/classifiers/multilabel/meta/OzaBagAdwinML.java:34: error: cannot access Metrics
#10 54.78 [ERROR] import meka.core.Metrics;
#10 54.78 [ERROR]                 ^
#10 54.78 [ERROR]   bad class file: /root/.m2/repository/net/sf/meka/meka/1.9.7/meka-1.9.7.jar(meka/core/Metrics.class)
#10 54.78 [ERROR]     class file has wrong version 55.0, should be 52.0
#10 54.78 [ERROR]     Please remove or make sure it appears in the correct subdirectory of the classpath.
#10 54.78 [ERROR] 
#10 54.78 [ERROR] Command line was: /usr/bin/javadoc @options @packages
#10 54.78 [ERROR] 
#10 54.78 [ERROR] Refer to the generated Javadoc files in '/app/moa/moa/target/apidocs' dir.
#10 54.78 [ERROR] 
#10 54.78 [ERROR] -> [Help 1]
#10 54.78 [ERROR] 
#10 54.78 [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
#10 54.78 [ERROR] Re-run Maven using the -X switch to enable full debug logging.
#10 54.78 [ERROR] 
#10 54.78 [ERROR] For more information about the errors and possible solutions, please read the following articles:
#10 54.78 [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
#10 54.78 [ERROR] 
#10 54.78 [ERROR] After correcting the problems, you can resume the build with the command
#10 54.78 [ERROR]   mvn <goals> -rf :moa
#10 ERROR: process "/bin/sh -c cd moa &&     export JAVA_HOME=\"/usr\" &&     mvn clean install -DskipTests=true &&     mvn -f release.xml package -DskipTests=true" did not complete successfully: exit code: 1
------
 > [ 7/12] RUN cd moa &&     export JAVA_HOME="/usr" &&     mvn clean install -DskipTests=true &&     mvn -f release.xml package -DskipTests=true:
#10 54.78 [ERROR] -> [Help 1]
#10 54.78 [ERROR] 
#10 54.78 [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
#10 54.78 [ERROR] Re-run Maven using the -X switch to enable full debug logging.
#10 54.78 [ERROR] 
#10 54.78 [ERROR] For more information about the errors and possible solutions, please read the following articles:
#10 54.78 [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
#10 54.78 [ERROR] 
#10 54.78 [ERROR] After correcting the problems, you can resume the build with the command
#10 54.78 [ERROR]   mvn <goals> -rf :moa
------
devel-gui.Dockerfile:27
--------------------
  26 |     
  27 | >>> RUN cd moa && \
  28 | >>>     export JAVA_HOME="/usr" && \
  29 | >>>     mvn clean install -DskipTests=true && \
  30 | >>>     mvn -f release.xml package -DskipTests=true
  31 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c cd moa &&     export JAVA_HOME=\"/usr\" &&     mvn clean install -DskipTests=true &&     mvn -f release.xml package -DskipTests=true" did not complete successfully: exit code: 1
Error: buildx failed with: ERROR: failed to solve: process "/bin/sh -c cd moa &&     export JAVA_HOME=\"/usr\" &&     mvn clean install -DskipTests=true &&     mvn -f release.xml package -DskipTests=true" did not complete successfully: exit code: 1

We need to bump the Java version in the docker image to fix this

@nuwangunasekara
Copy link
Collaborator Author

Fixed via commit 5a1d26b

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

1 participant