javaee-samples / javaee8-samples

Java EE 8 Samples
Other
376 stars 238 forks source link

Failing with Payara 5.181 #20

Closed CSchulz closed 5 years ago

CSchulz commented 6 years ago

I have noticed that the samples are failing when updating to 5.181, the default domain was renamed to default1 and the container doesn't start correctly:

[INFO] Running org.javaee8.servlet.http2.Http2Test
Starting container using command: [java, -jar, /Users/ich/Documents/Daten/javaee8-samples/target/payara5/glassfish/modules/admin-cli.jar, start-domain, domain1, -t]
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:216)
    at com.sun.enterprise.admin.cli.CLIContainer.getLocalCommand(CLIContainer.java:254)
    at com.sun.enterprise.admin.cli.CLICommand.getCommand(CLICommand.java:231)
    at com.sun.enterprise.admin.cli.AdminMain.executeCommand(AdminMain.java:370)
    at com.sun.enterprise.admin.cli.AdminMain.doMain(AdminMain.java:305)
    at com.sun.enterprise.admin.cli.AdminMain.main(AdminMain.java:207)
CSchulz commented 6 years ago

Seems to be related with Java 9.

dmatej commented 6 years ago

Current status (edited 31. 7. 2018 20:20 CEST): fails with:

passes with (with JDK8 in AS_JAVA and JAVA_HOME env properties):

arjantijms commented 6 years ago

payara-micro-managed (hangs, missing JAXB classes - another issue, indeed JDK9/10)

I briefly tried getting the repo to work with JDK9 a while back, but it kept failing. For now everything is JDK 8 only, but I'd really like to get everything running on at least JDK 11 when that comes out soon.

dmatej commented 6 years ago

I expect there will be a bunch of work with the classloaders in Payara, they protect their contexts before each other and it is very complicated (and OSGI between that). But I think Payara team will move it soon ... I have a question: which technologies should be supported also with Tomcat? Many modules crash, f.e. jaxrs - I'm not sure if it should be skipped or if I should add jersey-client and then find out how to fix it (perhaps together with the embedded-glassfish which ends up in same state then).

The problem with payara-micro-managed is that it seems it uses default java program from the OS, it should use (in this priority order) ${AS_JAVA}/bin/java or ${JAVA_HOME}/bin/java or default java.