I put together a sample project to demonstrate the issue I’m having.
Basically, I’m trying to launch my app via payara micro’s maven plugin during development. Here is the pom.xml
config:
<plugin>
<groupId>fish.payara.maven.plugins</groupId>
<artifactId>payara-micro-maven-plugin</artifactId>
<version>1.4.0</version>
<configuration>
<useUberJar>false</useUberJar>
<contextRoot>/myapp</contextRoot>
<payaraVersion>${version.payara}</payaraVersion>
<deployWar>false</deployWar>
<artifactItem>
<groupId>fish.payara.extras</groupId>
<artifactId>payara-micro</artifactId>
<version>${version.payara.micro}</version>
</artifactItem>
<javaCommandLineOptions>
<option>
<value>-Xdebug</value>
</option>
</javaCommandLineOptions>
<commandLineOptions>
<option>
<key>--autoBindHttp</key>
</option>
<option>
<key>--nocluster</key>
</option>
<option>
<key>--port</key>
<value>8095</value>
</option>
<option>
<key>--prebootcommandfile</key>
<value>${project.basedir}/src/main/resources/pre-boot-commands.txt</value>
</option>
<option>
<key>--postbootcommandfile</key>
<value>${project.basedir}/src/main/resources/post-boot-commands.txt</value>
</option>
<option>
<key>--deploy</key>
<value>${project.build.directory}/${project.build.finalName}</value>
</option>
</commandLineOptions>
</configuration>
</plugin>
The result is the following:
[2022-05-11T09:54:58.362-0400] [] [SEVERE] [] [org.eclipse.persistence.session./file:/path/to/payara-micro-plugin-group/payara-micro-plugin-example/target/payara-micro-plugin-example-1.0.0-SNAPSHOT/WEB-INF/classes/_MyAppPU.metadata] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1652277298362] [levelValue: 1000] [[
The java.lang.Object class was compiled with an unsupported JDK. Report this error to the EclipseLink open source project.
java.lang.ArrayIndexOutOfBoundsException: Index 8 out of bounds for length 0
at org.eclipse.persistence.internal.libraries.asm.ClassReader.readUnsignedShort(ClassReader.java:3573)
[2022-05-11T09:54:58.364-0400] [] [WARNING] [] [org.eclipse.persistence.session./file:/path/to/payara-micro-plugin-group/payara-micro-plugin-example/target/payara-micro-plugin-example-1.0.0-SNAPSHOT/WEB-INF/classes/_MyAppPU.metadata] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1652277298364] [levelValue: 900] [[
The java.lang.String class was compiled with an unsupported JDK. Report this error to the EclipseLink open source project.
java.lang.IllegalArgumentException: Unsupported class file major version 62
at org.eclipse.persistence.internal.libraries.asm.ClassReader.<init>(ClassReader.java:196)
[2022-05-11T09:54:58.372-0400] [] [WARNING] [] [org.eclipse.persistence.session./file:/path/to/payara-micro-plugin-group/payara-micro-plugin-example/target/payara-micro-plugin-example-1.0.0-SNAPSHOT/WEB-INF/classes/_MyAppPU.metadata] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1652277298372] [levelValue: 900] [[
The java.lang.Long class was compiled with an unsupported JDK. Report this error to the EclipseLink open source project.
java.lang.IllegalArgumentException: Unsupported class file major version 62
at org.eclipse.persistence.internal.libraries.asm.ClassReader.<init>(ClassReader.java:196)
[2022-05-11T09:54:58.379-0400] [] [WARNING] [] [org.eclipse.persistence.session./file:/path/to/payara-micro-plugin-group/payara-micro-plugin-example/target/payara-micro-plugin-example-1.0.0-SNAPSHOT/WEB-INF/classes/_MyAppPU.metadata] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1652277298379] [levelValue: 900] [[
The java.lang.Number class was compiled with an unsupported JDK. Report this error to the EclipseLink open source project.
java.lang.IllegalArgumentException: Unsupported class file major version 62
at org.eclipse.persistence.internal.libraries.asm.ClassReader.<init>(ClassReader.java:196)
The project is built with JDK 1.8, and maven is started with setting JAVA_HOME to JDK 1.8:
DATABASE_USER=user \
DATABASE_PASS=password \
DATABASE_NAME=MY_DB_NAME \
DATABASE_SERVER=localhost \
DATABASE_SERVER_PORT=1234 \
JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-amd64 \
M2_HOME=/usr/share/maven \
/usr/share/maven/bin/mvn payara-micro:start
Maven/JDK version:
$ JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-amd64 M2_HOME=/usr/share/maven /usr/share/maven/bin/mvn --version
Apache Maven 3.6.3
Maven home: /usr/share/maven
Java version: 1.8.0_312, vendor: Private Build, runtime: /usr/lib/jvm/java-8-openjdk-amd64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "5.15.0-27-generic", arch: "amd64", family: "unix"
System Java (this shouldn’t be playing a factor):
$ java -version
openjdk version "18-ea" 2022-03-22
OpenJDK Runtime Environment (build 18-ea+36-Ubuntu-1)
OpenJDK 64-Bit Server VM (build 18-ea+36-Ubuntu-1, mixed mode, sharing)
The system default is Java 18, but I don’t see how that can even come into play. All included application dependencies were compiled with JDK 1.8 or earlier (I checked each one).
Why would it be picking up major version 62?