Java 8/11 JAVA_HOME Regression?

204 views
Skip to first unread message

Mike Ryan

unread,
Jun 29, 2021, 4:17:32 PM6/29/21
to Payara Forum
Hello,

I think payara-5.2021.4 has an issue related to


but I thought I'd check in here to see if this is a known issue or I'm missing something obvious, before I create an issue.

I have environment where the JAVA_HOME is Java 8, but I specify running Payara on Java 11 with the command

set 'server.java-config.java-home=/usr/lib/jvm/java-11'

When I run the environment set up script on a server where JAVA HOME is Java 11, there's no problems, but if I run in an environment where JAVE HOME is Java 8, I get an exception. Note, both 8 and 11 are installed, but 8 is the default Java version in the problem environment.

I hit the following:
remote failure: Error occurred during deployment: Class msr.MsrController has unsupported major or minor version numbers, which are greater than those found in the Java Runtime Environment version 1.8.0_292. Please see server.log for more details. Command deploy failed.

Once we set that environment's JAVA HOME to Java 11, I no longer had this issue.

Any thoughts? Thanks!

Mike

Petr Aubrecht

unread,
Aug 5, 2021, 3:06:27 PM8/5/21
to Payara Forum
Hello,
I tried to reproduce it. I'm working with the current payara-5.2021.5. I have both Java 8 and 11.

I started the domain and set the java home (different paths on Debian):
JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64 PATH=/usr/lib/jvm/java-8-openjdk-amd64/bin:$PATH ./asadmin
Use "exit" to exit and "help" for online help.
asadmin> set 'server.java-config.java-home=/usr/lib/jvm/java-11-openjdk-amd64'
server.java-config.java-home=/usr/lib/jvm/java-11-openjdk-amd64
Command set executed successfully.
asadmin> stop-domain
Waiting for the domain to stop ..
Command stop-domain executed successfully.
asadmin> start-domain
Waiting for domain1 to start ......................
Successfully started the domain : domain1
domain  Location: /.../payara5/glassfish/domains/domain1
Log File: /.../payara5/glassfish/domains/domain1/logs/server.log
Admin Port: 4848
Command start-domain executed successfully.

I verified via visualvm, that the asadmin is running on java 8, server on java 11, running web application compiled in java 11.

From what I see -- your Payara obviously run on Java 8. Did you restart the server, so it has a chance to use the new java home? What is the java path mentioned in the beginning of Payara log?

Petr

Mike Ryan

unread,
Aug 19, 2021, 11:23:12 AM8/19/21
to Payara Forum
Hi Petr,

Thanks so much for trying to reproduce! I think I'm good. 

Our production server moved over to default to Java 11, which was the only place where I saw the problem. If we go back to defaulting to Java 8, I'll try some extra restarts. As I noted in another issue I just posted, I had to restart our Payara service running in a cluster separately from my environment script. So, most likely the issue is on our end.

Thanks again,

Mike

Reply all
Reply to author
Forward
0 new messages