Andrei Roșu-Cojocaru
Andrei Roșu-Cojocaru

Reputation: 509

Payara 5 compatibility with Java 9

Has anyone managed to start Payara 5 using Java 9?

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)

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.

Upvotes: 3

Views: 983

Answers (2)

Arjan Tijms
Arjan Tijms

Reputation: 38163

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:

Upvotes: 2

Philip Durbin
Philip Durbin

Reputation: 4072

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

Upvotes: 1

Related Questions