3

I have build a very simple project of hello world in

Payara 5 (5.181)
JSF 2.3
JDK 1.8
CDI 2.0
Maven

and encountered a problem

Unable to start server due following issues: Launch process failed with exit code 1

in console it throws an error of :

Error: Could not find or load main class server\payara5\glassfish.lib.grizzly-npn-bootstrap.jar

[PIC] Payara 5 Error

Rizwan
  • 2,369
  • 22
  • 27
Asad Kareem
  • 382
  • 3
  • 11
  • 1
    So if you make a small hello world test app without jsf and cdi, not created with maven, e.g. just a simple jsp page, it **does** work? – Kukeltje Jun 13 '18 at 11:45
  • 1
    i tried now i think payara have some bug incompatibility with eclipse that's why it is not blank running (not starting) without any project – Asad Kareem Jun 13 '18 at 12:19
  • 1
    Have you used [Payara Tools for Eclipse](https://marketplace.eclipse.org/content/payara-tools)? GlassFish tools don't work with Payara 5 – OndroMih Jun 19 '18 at 21:59
  • 1
    yes i am using payara Tools for Eclipse but still didn't get any solution – Asad Kareem Jun 20 '18 at 06:46
  • Perhaps [try downloading Payara 5.182](https://www.payara.fish/all_downloads). That is working for me with Payara Tools for Eclipse + Eclipse Photon + jdk1.8.0_172. Also see ["Payara Tools Unlocks Eclipse For Payara 5"](https://blog.payara.fish/payara-tools-unlocks-eclipse-for-payara-5) which mentions an issue with 5.181. – skomisa Jun 28 '18 at 04:44

3 Answers3

8

It seems that the Payara Tools for Eclipse suffer by several bugs that may cause this. In my case, the following workarounds helped:

  • The Payara installation path should not contain spaces (e.g. Program Files\Payara)
  • It seems that only Java 8 is supported at the time
  • Open the domain.xml configuration file for the domain you are trying to start (typically payara_install_path/glassfish/domains/domain1/config/domain1.xml) and search for "Xbootclasspath". You should find a couple of lines like <jvm-options>[1.8.0|1.8.0u120]-Xbootclasspath/p:${com.sun.aas.installRoot}/lib/grizzly-npn-bootstrap-1.6.jar</jvm-options> <jvm-options>[1.8.0u121|1.8.0u160]-Xbootclasspath/p:${com.sun.aas.installRoot}/lib/grizzly-npn-bootstrap-1.7.jar</jvm-options> <jvm-options>[1.8.0u161|1.8.0u190]-Xbootclasspath/p:${com.sun.aas.installRoot}/lib/grizzly-npn-bootstrap-1.8.jar</jvm-options> <jvm-options>[1.8.0u191|1.8.0u500]-Xbootclasspath/p:${com.sun.aas.installRoot}/lib/grizzly-npn-bootstrap-1.8.1.jar</jvm-options> Depending of your installed Java version (try running java --version) and choose the appropriate line (most likely the last one). Remove the remaining lines and remove the [...] part at the beginning of the chosen line so you will get something like <jvm-options>-Xbootclasspath/p:${com.sun.aas.installRoot}/lib/grizzly-npn-bootstrap-1.8.1.jar</jvm-options>

After this, the tools seem to start normally.

radkovo
  • 868
  • 6
  • 10
5

The Problem is with Java version. The grizzly-npn-bootstrap-1.8.1.jar Jar is placed in bootclasspath, thats why it requires proper java version to start payara server. So remove unnecessary bootstrap jar from domain.xml.

In Windows:

1) Go To ---C:\Users\xxxx\payara5\glassfish\domains\domain1\config\domain.xml

2) According to my java verson(java version "1.8.0_191") I deleted the following lines from domain.xml. So delete according to your java version.

<jvm-options>[1.8.0|1.8.0u120]-Xbootclasspath/p:${com.sun.aas.installRoot}/lib/grizzly-npn-bootstrap-1.6.jar</jvm-options>
        <jvm-options>[1.8.0u121|1.8.0u160]-Xbootclasspath/p:${com.sun.aas.installRoot}/lib/grizzly-npn-bootstrap-1.7.jar</jvm-options>
        <jvm-options>[1.8.0u161|1.8.0u190]-Xbootclasspath/p:${com.sun.aas.installRoot}/lib/grizzly-npn-bootstrap-1.8.jar</jvm-options>

3) Remove this [1.8.0u191|1.8.0u500] part from jvm-options & Edit the line in your domain.xml(w.r.t java -version) as shown below

<jvm-options>-Xbootclasspath/p:${com.sun.aas.installRoot}/lib/grizzly-npn-bootstrap-1.8.1.jar</jvm-options>

4) restart your server.

Narayan Yerrabachu
  • 1,714
  • 1
  • 19
  • 31
1

As Radkovo said, "The Payara installation path should not contain spaces (e.g. Program Files\Payara)", so I moved the Payara to the Documents folder. Problem solved!

Suzy Lau
  • 11
  • 1
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Dec 24 '22 at 18:38