3

Has anyone managed to start Payara 5 using Java 9?

  • Payara version: 5.184

  • JDK version: 9.0.4

java 9.0.4 Java(TM) SE Runtime Environment (build 9.0.4+11) Java HotSpot(TM) 64-Bit Server VM (build 9.0.4+11, mixed mode)

  • OS: Windows 10, version 1709 (OS Build: 16299.309)

When issuing command:

asadmin start-domain

I got the following exception:

Exception in thread "main" java.lang.NullPointerException at com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl.initializeServiceLocator(AbstractModulesRegistryImpl.java:152) at com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl.newServiceLocator(AbstractModulesRegistryImpl.java:144) at com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl.createServiceLocator(AbstractModulesRegistryImpl.java:218) at com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl.createServiceLocator(AbstractModulesRegistryImpl.java:224) at com.sun.enterprise.module.single.StaticModulesRegistry.createServiceLocator(StaticModulesRegistry.java:88) at com.sun.enterprise.admin.cli.CLIContainer.getServiceLocator(CLIContainer.java:212) at com.sun.enterprise.admin.cli.CLIContainer.getLocalCommand(CLIContainer.java:244) at com.sun.enterprise.admin.cli.CLICommand.getCommand(CLICommand.java:229) at com.sun.enterprise.admin.cli.AdminMain.executeCommand(AdminMain.java:362) at com.sun.enterprise.admin.cli.AdminMain.doMain(AdminMain.java:298) at org.glassfish.admin.cli.AsadminMain.main(AsadminMain.java:56)

I have also tried

asadmin start-domain --debug payaradomain

with the same result.

I see there are some persons that tested this combination successfully: https://github.com/IQSS/dataverse/issues/4217#issuecomment-340582621.

Others say that Payara will focus on Java 11, since it is a LTS version.

Naman
  • 27,789
  • 26
  • 218
  • 353
  • 1
    Seems to be already reported https://github.com/payara/Payara/issues/3001 to them. – Naman Dec 13 '18 at 12:59
  • I'm a Dataverse developer and that issue 4217 you linked actually says, "Glassfish 4.1 itself is unable to detect the JDK version for Java 9. Glassfish needs to be set to explicitly use Java 8." That is to say, we have actually had no success running Glassfish (or Payara) on anything newer than Java 8. Here is my writeup from last month of my attempt: https://github.com/IQSS/dataverse/issues/5512#issuecomment-462957172 – Philip Durbin Mar 30 '19 at 12:58

2 Answers2

2

At the moment of writing, initial JDK 11 compatibility is targeted for Payara 5.192. The branch to look at is https://github.com/payara/Payara/tree/JDK11

This branch passes most of e.g. the Java EE samples (https://github.com/javaee-samples/javaee7-samples and http://github.com/javaee-samples/javaee8-samples). People can already try it out by building that branch themselves.

It's essentially done via

mvn clean install

from the root.

The server can then be found in appserver/distributions/payara/target/payara.zip

See the following blog post for more info on this topic:

Arjan Tijms
  • 37,782
  • 12
  • 108
  • 140
1

Payara will not start on any version of Java newer than Java 8. My understanding is that this is the issue to track: https://github.com/payara/Payara/issues/2296

As you probably know, Payara is derived from GlassFish and there has been discussion of running GlassFish on versions of Java newer than Java 8 at https://github.com/eclipse-ee4j/glassfish/issues/22130

Philip Durbin
  • 4,042
  • 2
  • 25
  • 36