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

The domain.xml java-home is not honored in version-specific jvm-options PAYARA-3911 #4025

Closed
vlumi opened this issue Jun 10, 2019 · 4 comments · Fixed by #4034
Closed

The domain.xml java-home is not honored in version-specific jvm-options PAYARA-3911 #4025

vlumi opened this issue Jun 10, 2019 · 4 comments · Fixed by #4034
Labels
Status: Accepted Confirmed defect or accepted improvement to implement, issue has been escalated to Platform Dev Type: Bug Label issue as a bug defect
Milestone

Comments

@vlumi
Copy link
Contributor

vlumi commented Jun 10, 2019

Description


On domain.xml, all the jvm-options are filtered according to the JDK used to run asadmin -- not the one configured to be used with the domain. This will result in errors if the arguments are not valid for the JDK set for the domain, especially using JDK before and after 9.

Expected Outcome

Using JDK 1.8 to run asadmin, and JDK 11 configured in domains.xml, the domain should start normally, running on JDK 11.

Current Outcome

The execution will fail with the following output:

Waiting for domain1 to start .Error starting domain domain1.
The server exited prematurely with exit code 1.
Before it died, it produced the following output:

-Xbootclasspath/p is no longer a supported option.
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

Command start-domain failed.

Steps to reproduce (Only for bug reports)

  1. Update the domain.xml, pointing the java-home to a JDK 11 installation, e.g.

  2. Make sure to use JDK 1.8 for asadmin

    $ java -version
    java version "1.8.0_211"
    Java(TM) SE Runtime Environment (build 1.8.0_211-b12)
    Java HotSpot(TM) 64-Bit Server VM (build 25.211-b12, mixed mode)

  3. Leave the AS_JAVA unset (default value on glassfish/config/asenv.conf)

  4. Use JDK 1.8 to start the domain

    ./asadmin start-domain domain1

Context (Optional)

This issue came up when trying to start Payara 5.192 with JDK 11 from IntelliJ IDEA, with the system default JDK still being 1.8 (set on .bash_properties).

Environment

  • Payara Version: 5.192
  • Edition: Full
  • JDK Version: 1.8.0_211 and 11.0.1
  • Operating System: Mac
vlumi added a commit to vlumi/Payara that referenced this issue Jun 11, 2019
vlumi added a commit to vlumi/Payara that referenced this issue Jun 11, 2019
vlumi added a commit to vlumi/Payara that referenced this issue Jun 11, 2019
@OndroMih OndroMih added 0:Triaged Type: Bug Label issue as a bug defect and removed 0:Triaged labels Jun 11, 2019
@OndroMih
Copy link
Contributor

I confirm the behavior with a fresh domain1 domain on v5.192:

  1. install both JDK 8 and 11, JDK 8 is the default system Java version
  2. start domain
  3. run the following to set path to JDK 11:
asadmin set configs.config.server-config.java-config.java-home=/path/to/jdk11
  1. stop domain
  2. starting domain results in an error as described

@OndroMih
Copy link
Contributor

@vlumi, can you create a pull request with your changes in vlumi@b1b21c5?

@OndroMih OndroMih changed the title The domain.xml java-home is not honored in version-specific jvm-options The domain.xml java-home is not honored in version-specific jvm-options PAYARA-3911 Jun 11, 2019
@OndroMih OndroMih added Status: Accepted Confirmed defect or accepted improvement to implement, issue has been escalated to Platform Dev and removed 1:Investigating labels Jun 11, 2019
@smillidge
Copy link
Contributor

#4034 is the PR?

@vlumi
Copy link
Contributor Author

vlumi commented Jun 12, 2019

Yes, I created the pull request #4034 for this already.

arjantijms added a commit that referenced this issue Jul 4, 2019
PAYARA-3911 Fix domain.xml java-home is not honored in version-specific jvm-options (#4025)
@arjantijms arjantijms added this to the 5.193 milestone Jul 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Accepted Confirmed defect or accepted improvement to implement, issue has been escalated to Platform Dev Type: Bug Label issue as a bug defect
Projects
None yet
4 participants