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

Bug Report: Failed to deploy war with @Stateless in Payara Micro 6.2023.7 / FISH-7722 #6337

Closed
brunogptavares opened this issue Jul 13, 2023 · 19 comments
Assignees
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

Comments

@brunogptavares
Copy link

Brief Summary

Failed to deploy a Jakarta EE 10 aplication that have the anotation @Stateless or @Singleton in Payara Micro 6.2023.7.
Works fine in Payara-micro 6.2023.6.

Expected Outcome

The application should deploy and run normally.

Current Outcome


[2023-07-13T15:36:10.358+0100] [] [SEVERE] [NCLS-CORE-00026] [javax.enterprise.system.core] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1689258970358] [levelValue: 1000] [[
  Exception during lifecycle processing
java.lang.ExceptionInInitializerError
	at org.glassfish.pfl.dynamic.codegen.spi.Wrapper$PackageContext.<init>(Wrapper.java:477)
	at org.glassfish.pfl.dynamic.codegen.spi.Wrapper$Environment._clear(Wrapper.java:693)
	at org.glassfish.pfl.dynamic.codegen.spi.Wrapper$Environment.<init>(Wrapper.java:688)
	at java.base/java.lang.ThreadLocal$SuppliedThreadLocal.initialValue(ThreadLocal.java:305)
	at java.base/java.lang.ThreadLocal.setInitialValue(ThreadLocal.java:195)
	at java.base/java.lang.ThreadLocal.get(ThreadLocal.java:172)
	at org.glassfish.pfl.dynamic.codegen.spi.Wrapper.env(Wrapper.java:886)
	at org.glassfish.pfl.dynamic.codegen.spi.Wrapper._clear(Wrapper.java:1142)
	at org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplication.java:242)
	at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:286)
	at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:104)
	at org.glassfish.internal.data.ModuleInfo.load(ModuleInfo.java:218)
	at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:334)
	at com.sun.enterprise.v3.server.ApplicationLifecycle.prepare(ApplicationLifecycle.java:577)
	at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:613)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:556)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:552)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/javax.security.auth.Subject.doAs(Subject.java:376)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:551)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:582)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:574)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/javax.security.auth.Subject.doAs(Subject.java:376)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:573)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1497)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1879)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1755)
	at com.sun.enterprise.admin.cli.embeddable.DeployerImpl.deploy(DeployerImpl.java:131)
	at com.sun.enterprise.admin.cli.embeddable.DeployerImpl.deploy(DeployerImpl.java:104)
	at fish.payara.micro.impl.PayaraMicroImpl.deployAll(PayaraMicroImpl.java:1739)
	at fish.payara.micro.impl.PayaraMicroImpl.bootStrap(PayaraMicroImpl.java:1092)
	at fish.payara.micro.impl.PayaraMicroImpl.create(PayaraMicroImpl.java:236)
	at fish.payara.micro.impl.PayaraMicroImpl.main(PayaraMicroImpl.java:223)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at fish.payara.micro.boot.loader.MainMethodRunner.run(MainMethodRunner.java:50)
	at fish.payara.micro.boot.loader.Launcher.launch(Launcher.java:114)
	at fish.payara.micro.boot.loader.Launcher.launch(Launcher.java:73)
	at fish.payara.micro.boot.PayaraMicroLauncher.create(PayaraMicroLauncher.java:88)
	at fish.payara.micro.boot.PayaraMicroLauncher.main(PayaraMicroLauncher.java:72)
	at fish.payara.micro.PayaraMicro.main(PayaraMicro.java:467)
Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make private static java.lang.ClassLoader java.io.ObjectInputStream.latestUserDefinedLoader() accessible: module java.base does not "opens java.io" to unnamed module @3fb6a447
	at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354)
	at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
	at java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:199)
	at java.base/java.lang.reflect.Method.setAccessible(Method.java:193)
	at org.glassfish.pfl.basic.reflection.Bridge$1.run(Bridge.java:90)
	at org.glassfish.pfl.basic.reflection.Bridge$1.run(Bridge.java:82)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:318)
	at org.glassfish.pfl.basic.reflection.Bridge.getLatestUserDefinedLoaderMethod(Bridge.java:81)
	at org.glassfish.pfl.basic.reflection.Bridge.<init>(Bridge.java:129)
	at org.glassfish.pfl.basic.reflection.Bridge.get(Bridge.java:154)
	at org.glassfish.pfl.dynamic.copyobject.impl.ClassCopierOrdinaryImpl$1.run(ClassCopierOrdinaryImpl.java:58)
	at org.glassfish.pfl.dynamic.copyobject.impl.ClassCopierOrdinaryImpl$1.run(ClassCopierOrdinaryImpl.java:55)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:318)
	at org.glassfish.pfl.dynamic.copyobject.impl.ClassCopierOrdinaryImpl.<clinit>(ClassCopierOrdinaryImpl.java:54)
	... 44 more
]]

[2023-07-13T15:36:10.358+0100] [] [SEVERE] [] [javax.enterprise.system.core] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1689258970358] [levelValue: 1000] Exception while loading the app

[2023-07-13T15:36:10.368+0100] [] [SEVERE] [] [javax.enterprise.system.core] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1689258970368] [levelValue: 1000] [[
  Exception while loading the app
java.lang.reflect.InaccessibleObjectException: Unable to make private static java.lang.ClassLoader java.io.ObjectInputStream.latestUserDefinedLoader() accessible: module java.base does not "opens java.io" to unnamed module @3fb6a447
	at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354)
	at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
	at java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:199)
	at java.base/java.lang.reflect.Method.setAccessible(Method.java:193)
	at org.glassfish.pfl.basic.reflection.Bridge$1.run(Bridge.java:90)
	at org.glassfish.pfl.basic.reflection.Bridge$1.run(Bridge.java:82)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:318)
	at org.glassfish.pfl.basic.reflection.Bridge.getLatestUserDefinedLoaderMethod(Bridge.java:81)
	at org.glassfish.pfl.basic.reflection.Bridge.<init>(Bridge.java:129)
	at org.glassfish.pfl.basic.reflection.Bridge.get(Bridge.java:154)
	at org.glassfish.pfl.dynamic.copyobject.impl.ClassCopierOrdinaryImpl$1.run(ClassCopierOrdinaryImpl.java:58)
	at org.glassfish.pfl.dynamic.copyobject.impl.ClassCopierOrdinaryImpl$1.run(ClassCopierOrdinaryImpl.java:55)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:318)
	at org.glassfish.pfl.dynamic.copyobject.impl.ClassCopierOrdinaryImpl.<clinit>(ClassCopierOrdinaryImpl.java:54)
	at org.glassfish.pfl.dynamic.codegen.spi.Wrapper$PackageContext.<init>(Wrapper.java:477)
	at org.glassfish.pfl.dynamic.codegen.spi.Wrapper$Environment._clear(Wrapper.java:693)
	at org.glassfish.pfl.dynamic.codegen.spi.Wrapper$Environment.<init>(Wrapper.java:688)
	at java.base/java.lang.ThreadLocal$SuppliedThreadLocal.initialValue(ThreadLocal.java:305)
	at java.base/java.lang.ThreadLocal.setInitialValue(ThreadLocal.java:195)
	at java.base/java.lang.ThreadLocal.get(ThreadLocal.java:172)
	at org.glassfish.pfl.dynamic.codegen.spi.Wrapper.env(Wrapper.java:886)
	at org.glassfish.pfl.dynamic.codegen.spi.Wrapper._clear(Wrapper.java:1142)
	at org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplication.java:242)
	at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:286)
	at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:104)
	at org.glassfish.internal.data.ModuleInfo.load(ModuleInfo.java:218)
	at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:334)
	at com.sun.enterprise.v3.server.ApplicationLifecycle.prepare(ApplicationLifecycle.java:577)
	at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:613)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:556)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:552)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/javax.security.auth.Subject.doAs(Subject.java:376)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:551)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:582)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:574)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/javax.security.auth.Subject.doAs(Subject.java:376)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:573)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1497)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1879)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1755)
	at com.sun.enterprise.admin.cli.embeddable.DeployerImpl.deploy(DeployerImpl.java:131)
	at com.sun.enterprise.admin.cli.embeddable.DeployerImpl.deploy(DeployerImpl.java:104)
	at fish.payara.micro.impl.PayaraMicroImpl.deployAll(PayaraMicroImpl.java:1739)
	at fish.payara.micro.impl.PayaraMicroImpl.bootStrap(PayaraMicroImpl.java:1092)
	at fish.payara.micro.impl.PayaraMicroImpl.create(PayaraMicroImpl.java:236)
	at fish.payara.micro.impl.PayaraMicroImpl.main(PayaraMicroImpl.java:223)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at fish.payara.micro.boot.loader.MainMethodRunner.run(MainMethodRunner.java:50)
	at fish.payara.micro.boot.loader.Launcher.launch(Launcher.java:114)
	at fish.payara.micro.boot.loader.Launcher.launch(Launcher.java:73)
	at fish.payara.micro.boot.PayaraMicroLauncher.create(PayaraMicroLauncher.java:88)
	at fish.payara.micro.boot.PayaraMicroLauncher.main(PayaraMicroLauncher.java:72)
	at fish.payara.micro.PayaraMicro.main(PayaraMicro.java:467)
]]

Reproducer

Just create a EJB class.

import jakarta.ejb.Stateless;

@Stateless
public class DemoService {
}

Operating System

Windows 11 Pro

JDK Version

Eclipse Temurim 17.0.4

Payara Distribution

Payara Micro

@brunogptavares brunogptavares added Status: Open Issue has been triaged by the front-line engineers and is being worked on verification Type: Bug Label issue as a bug defect labels Jul 13, 2023
@lprimak
Copy link
Contributor

lprimak commented Jul 14, 2023

Workaround:

asadmin create-jvm-options --add-opens=java.base/java.io=ALL-UNNAMED
asadmin restart-domain

@avbravo
Copy link

avbravo commented Jul 14, 2023

In PayaraMicro
< javaCommandLineOptions>

--add-opens
java.base/java.io=ALL-UNNAMED

</ javaCommandLineOptions>

@YotillaAntoni
Copy link

Same problem here. Thanks for the workaround @lprimak .

In our case we also had to add java.base/java.time and java.base/java.math as we use remote EJBs with value classes that have fields of typeBigInteger and java.time.*DateTime. Otherwise CORBA fails.

@Elifzeynepedman
Copy link

Hi @brunogptavares,

We have escalated this to the platform development team as FISH-7722.

Thank you,
Elif

@Elifzeynepedman Elifzeynepedman changed the title Bug Report: Failed to deploy war with @Stateless in Payara Micro 6.2023.7 Bug Report: Failed to deploy war with @Stateless in Payara Micro 6.2023.7 / FISH-7722 Aug 9, 2023
@Elifzeynepedman Elifzeynepedman added Status: Accepted Confirmed defect or accepted improvement to implement, issue has been escalated to Platform Dev and removed Status: Open Issue has been triaged by the front-line engineers and is being worked on verification labels Aug 9, 2023
@poikilotherm
Copy link
Contributor

Just to let y'all know, we see exactly this exception when using Payara Server Full Profile, JRE 17 and trying to deploy Dataverse (which is full of all sorts of EJBs). Please note that in the log, we see the typical "Portable JNDI names for EJB" outputs. After that, this exception is thrown:

dev_dataverse> [#|2023-08-17T23:02:35.554+0000|SEVERE|Payara 6.2023.7|javax.enterprise.system.core|_ThreadID=33;_ThreadName=RunLevelControllerThread-1692313317719;_TimeMillis=1692313355554;_LevelValue=1000;_MessageID=NCLS-CORE-00026;|
dev_dataverse>   Exception during lifecycle processing
dev_dataverse> java.lang.ExceptionInInitializerError
dev_dataverse> 	at org.glassfish.pfl.dynamic.codegen.spi.Wrapper$PackageContext.<init>(Wrapper.java:477)
dev_dataverse> 	at org.glassfish.pfl.dynamic.codegen.spi.Wrapper$Environment._clear(Wrapper.java:693)
dev_dataverse> 	at org.glassfish.pfl.dynamic.codegen.spi.Wrapper$Environment.<init>(Wrapper.java:688)
dev_dataverse> 	at java.base/java.lang.ThreadLocal$SuppliedThreadLocal.initialValue(Unknown Source)
dev_dataverse> 	at java.base/java.lang.ThreadLocal.setInitialValue(Unknown Source)
dev_dataverse> 	at java.base/java.lang.ThreadLocal.get(Unknown Source)
dev_dataverse> 	at org.glassfish.pfl.dynamic.codegen.spi.Wrapper.env(Wrapper.java:886)
dev_dataverse> 	at org.glassfish.pfl.dynamic.codegen.spi.Wrapper._clear(Wrapper.java:1142)
dev_dataverse> 	at org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplication.java:242)
dev_dataverse> 	at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:286)
dev_dataverse> 	at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:104)
dev_dataverse> 	at org.glassfish.internal.data.ModuleInfo.load(ModuleInfo.java:218)
dev_dataverse> 	at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:334)
dev_dataverse> 	at com.sun.enterprise.v3.server.ApplicationLifecycle.prepare(ApplicationLifecycle.java:577)
dev_dataverse> 	at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:613)
dev_dataverse> 	at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:556)
dev_dataverse> 	at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:552)
dev_dataverse> 	at java.base/java.security.AccessController.doPrivileged(Unknown Source)
dev_dataverse> 	at java.base/javax.security.auth.Subject.doAs(Unknown Source)
dev_dataverse> 	at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:551)
dev_dataverse> 	at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:582)
dev_dataverse> 	at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:574)
dev_dataverse> 	at java.base/java.security.AccessController.doPrivileged(Unknown Source)
dev_dataverse> 	at java.base/javax.security.auth.Subject.doAs(Unknown Source)
dev_dataverse> 	at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:573)
dev_dataverse> 	at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1497)
dev_dataverse> 	at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1879)
dev_dataverse> 	at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1755)
dev_dataverse> 	at com.sun.enterprise.admin.cli.embeddable.CommandExecutorImpl.executeCommand(CommandExecutorImpl.java:183)
dev_dataverse> 	at com.sun.enterprise.admin.cli.embeddable.CommandExecutorImpl.run(CommandExecutorImpl.java:96)
dev_dataverse> 	at fish.payara.boot.runtime.BootCommand.execute(BootCommand.java:69)
dev_dataverse> 	at fish.payara.boot.runtime.BootCommands.executeCommands(BootCommands.java:166)
dev_dataverse> 	at fish.payara.boot.runtime.BootCommands.executeCommands(BootCommands.java:160)
dev_dataverse> 	at com.sun.enterprise.v3.bootstrap.BootCommandService.doBootCommands(BootCommandService.java:81)
dev_dataverse> 	at com.sun.enterprise.v3.bootstrap.BootCommandService.postConstruct(BootCommandService.java:91)
dev_dataverse> 	at org.jvnet.hk2.internal.ClazzCreator.postConstructMe(ClazzCreator.java:303)
dev_dataverse> 	at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:351)
dev_dataverse> 	at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:466)
dev_dataverse> 	at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:281)
dev_dataverse> 	at org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelContext.java:65)
dev_dataverse> 	at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2103)
dev_dataverse> 	at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:93)
dev_dataverse> 	at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:67)
dev_dataverse> 	at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.oneJob(CurrentTaskFuture.java:1213)
dev_dataverse> 	at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.run(CurrentTaskFuture.java:1144)
dev_dataverse> 	at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$UpOneLevel.run(CurrentTaskFuture.java:762)
dev_dataverse> 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
dev_dataverse> 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
dev_dataverse> 	at java.base/java.lang.Thread.run(Unknown Source)
dev_dataverse> Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make private static java.lang.ClassLoader java.io.ObjectInputStream.latestUserDefinedLoader() accessible: module java.base does not "opens java.io" to unnamed module @37d85261
dev_dataverse> 	at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(Unknown Source)
dev_dataverse> 	at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(Unknown Source)
dev_dataverse> 	at java.base/java.lang.reflect.Method.checkCanSetAccessible(Unknown Source)
dev_dataverse> 	at java.base/java.lang.reflect.Method.setAccessible(Unknown Source)
dev_dataverse> 	at org.glassfish.pfl.basic.reflection.Bridge$1.run(Bridge.java:90)
dev_dataverse> 	at org.glassfish.pfl.basic.reflection.Bridge$1.run(Bridge.java:82)
dev_dataverse> 	at java.base/java.security.AccessController.doPrivileged(Unknown Source)
dev_dataverse> 	at org.glassfish.pfl.basic.reflection.Bridge.getLatestUserDefinedLoaderMethod(Bridge.java:81)
dev_dataverse> 	at org.glassfish.pfl.basic.reflection.Bridge.<init>(Bridge.java:129)
dev_dataverse> 	at org.glassfish.pfl.basic.reflection.Bridge.get(Bridge.java:154)
dev_dataverse> 	at org.glassfish.pfl.dynamic.copyobject.impl.ClassCopierOrdinaryImpl$1.run(ClassCopierOrdinaryImpl.java:58)
dev_dataverse> 	at org.glassfish.pfl.dynamic.copyobject.impl.ClassCopierOrdinaryImpl$1.run(ClassCopierOrdinaryImpl.java:55)
dev_dataverse> 	at java.base/java.security.AccessController.doPrivileged(Unknown Source)
dev_dataverse> 	at org.glassfish.pfl.dynamic.copyobject.impl.ClassCopierOrdinaryImpl.<clinit>(ClassCopierOrdinaryImpl.java:54)
dev_dataverse> 	... 49 more
dev_dataverse> |#]
dev_dataverse> 
dev_dataverse> [#|2023-08-17T23:02:35.555+0000|SEVERE|Payara 6.2023.7|javax.enterprise.system.core|_ThreadID=33;_ThreadName=RunLevelControllerThread-1692313317719;_TimeMillis=1692313355555;_LevelValue=1000;|
dev_dataverse>   Exception while loading the app|#]
dev_dataverse> 
dev_dataverse> [#|2023-08-17T23:02:35.557+0000|WARNING|Payara 6.2023.7|jakarta.enterprise.web.util|_ThreadID=33;_ThreadName=RunLevelControllerThread-1692313317719;_TimeMillis=1692313355557;_LevelValue=900;|
dev_dataverse>   The web application [unknown] registered the JDBC driver [org.postgresql.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.|#]
dev_dataverse> 
dev_dataverse> [#|2023-08-17T23:02:35.570+0000|SEVERE|Payara 6.2023.7|javax.enterprise.system.core|_ThreadID=33;_ThreadName=RunLevelControllerThread-1692313317719;_TimeMillis=1692313355570;_LevelValue=1000;|
dev_dataverse>   Exception while loading the app
dev_dataverse> java.lang.reflect.InaccessibleObjectException: Unable to make private static java.lang.ClassLoader java.io.ObjectInputStream.latestUserDefinedLoader() accessible: module java.base does not "opens java.io" to unnamed module @37d85261
dev_dataverse> 	at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(Unknown Source)
dev_dataverse> 	at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(Unknown Source)
dev_dataverse> 	at java.base/java.lang.reflect.Method.checkCanSetAccessible(Unknown Source)
dev_dataverse> 	at java.base/java.lang.reflect.Method.setAccessible(Unknown Source)
dev_dataverse> 	at org.glassfish.pfl.basic.reflection.Bridge$1.run(Bridge.java:90)
dev_dataverse> 	at org.glassfish.pfl.basic.reflection.Bridge$1.run(Bridge.java:82)
dev_dataverse> 	at java.base/java.security.AccessController.doPrivileged(Unknown Source)
dev_dataverse> 	at org.glassfish.pfl.basic.reflection.Bridge.getLatestUserDefinedLoaderMethod(Bridge.java:81)
dev_dataverse> 	at org.glassfish.pfl.basic.reflection.Bridge.<init>(Bridge.java:129)
dev_dataverse> 	at org.glassfish.pfl.basic.reflection.Bridge.get(Bridge.java:154)
dev_dataverse> 	at org.glassfish.pfl.dynamic.copyobject.impl.ClassCopierOrdinaryImpl$1.run(ClassCopierOrdinaryImpl.java:58)
dev_dataverse> 	at org.glassfish.pfl.dynamic.copyobject.impl.ClassCopierOrdinaryImpl$1.run(ClassCopierOrdinaryImpl.java:55)
dev_dataverse> 	at java.base/java.security.AccessController.doPrivileged(Unknown Source)
dev_dataverse> 	at org.glassfish.pfl.dynamic.copyobject.impl.ClassCopierOrdinaryImpl.<clinit>(ClassCopierOrdinaryImpl.java:54)
dev_dataverse> 	at org.glassfish.pfl.dynamic.codegen.spi.Wrapper$PackageContext.<init>(Wrapper.java:477)
dev_dataverse> 	at org.glassfish.pfl.dynamic.codegen.spi.Wrapper$Environment._clear(Wrapper.java:693)
dev_dataverse> 	at org.glassfish.pfl.dynamic.codegen.spi.Wrapper$Environment.<init>(Wrapper.java:688)
dev_dataverse> 	at java.base/java.lang.ThreadLocal$SuppliedThreadLocal.initialValue(Unknown Source)
dev_dataverse> 	at java.base/java.lang.ThreadLocal.setInitialValue(Unknown Source)
dev_dataverse> 	at java.base/java.lang.ThreadLocal.get(Unknown Source)
dev_dataverse> 	at org.glassfish.pfl.dynamic.codegen.spi.Wrapper.env(Wrapper.java:886)
dev_dataverse> 	at org.glassfish.pfl.dynamic.codegen.spi.Wrapper._clear(Wrapper.java:1142)
dev_dataverse> 	at org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplication.java:242)
dev_dataverse> 	at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:286)
dev_dataverse> 	at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:104)
dev_dataverse> 	at org.glassfish.internal.data.ModuleInfo.load(ModuleInfo.java:218)
dev_dataverse> 	at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:334)
dev_dataverse> 	at com.sun.enterprise.v3.server.ApplicationLifecycle.prepare(ApplicationLifecycle.java:577)
dev_dataverse> 	at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:613)
dev_dataverse> 	at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:556)
dev_dataverse> 	at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:552)
dev_dataverse> 	at java.base/java.security.AccessController.doPrivileged(Unknown Source)
dev_dataverse> 	at java.base/javax.security.auth.Subject.doAs(Unknown Source)
dev_dataverse> 	at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:551)
dev_dataverse> 	at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:582)
dev_dataverse> 	at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:574)
dev_dataverse> 	at java.base/java.security.AccessController.doPrivileged(Unknown Source)
dev_dataverse> 	at java.base/javax.security.auth.Subject.doAs(Unknown Source)
dev_dataverse> 	at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:573)
dev_dataverse> 	at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1497)
dev_dataverse> 	at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1879)
dev_dataverse> 	at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1755)
dev_dataverse> 	at com.sun.enterprise.admin.cli.embeddable.CommandExecutorImpl.executeCommand(CommandExecutorImpl.java:183)
dev_dataverse> 	at com.sun.enterprise.admin.cli.embeddable.CommandExecutorImpl.run(CommandExecutorImpl.java:96)
dev_dataverse> 	at fish.payara.boot.runtime.BootCommand.execute(BootCommand.java:69)
dev_dataverse> 	at fish.payara.boot.runtime.BootCommands.executeCommands(BootCommands.java:166)
dev_dataverse> 	at fish.payara.boot.runtime.BootCommands.executeCommands(BootCommands.java:160)
dev_dataverse> 	at com.sun.enterprise.v3.bootstrap.BootCommandService.doBootCommands(BootCommandService.java:81)
dev_dataverse> 	at com.sun.enterprise.v3.bootstrap.BootCommandService.postConstruct(BootCommandService.java:91)
dev_dataverse> 	at org.jvnet.hk2.internal.ClazzCreator.postConstructMe(ClazzCreator.java:303)
dev_dataverse> 	at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:351)
dev_dataverse> 	at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:466)
dev_dataverse> 	at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:281)
dev_dataverse> 	at org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelContext.java:65)
dev_dataverse> 	at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2103)
dev_dataverse> 	at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:93)
dev_dataverse> 	at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:67)
dev_dataverse> 	at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.oneJob(CurrentTaskFuture.java:1213)
dev_dataverse> 	at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.run(CurrentTaskFuture.java:1144)
dev_dataverse> 	at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$UpOneLevel.run(CurrentTaskFuture.java:762)
dev_dataverse> 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
dev_dataverse> 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
dev_dataverse> 	at java.base/java.lang.Thread.run(Unknown Source)
dev_dataverse> |#]
dev_dataverse> 
dev_dataverse> [#|2023-08-17T23:02:35.576+0000|WARNING|Payara 6.2023.7|fish.payara.boot.runtime.BootCommand|_ThreadID=33;_ThreadName=RunLevelControllerThread-1692313317719;_TimeMillis=1692313355576;_LevelValue=900;|
dev_dataverse>   Boot Command deploy failed PlainTextActionReporterFAILUREDescription: deploy AdminCommandError occurred during deployment: Exception while loading the app. Please see server.log for more details.
dev_dataverse>     [name=dataverse
dev_dataverse>

Adding the --add-opens workaround works to get things moving for us, too.

@pdurbin
Copy link

pdurbin commented Aug 18, 2023

This (merged) PR has --add-opens=java.base/java.io=ALL-UNNAMED stuff in it:

@luiseufrasio is it a fix for this issue (#6337)? Thanks.

@eduarddrenth
Copy link

same problem here using payara/server-web:6.2023.8-jdk17, workaround helps

@claussni
Copy link

claussni commented Sep 25, 2023

Same issue with Docker image payara/server-full:6.2023.8-jdk17. Had to add some more --add-opens to my Testcontainers setup to get it to start the application.

String[] openModules = {
                "java.base/java.io",
                "java.base/jdk.internal.misc",
                "java.management/javax.management.openmbean",
                "java.management/javax.management"
        };
        addEnv("JVM_ARGS", Arrays.stream(openModules)
                .map("--add-opens=%s=ALL-UNNAMED "::formatted)
                .collect(Collectors.joining()));

@eduarddrenth
Copy link

on 6.2023.9 I don't see this issue anymore and do not need the workaround

@supersonic-potato
Copy link

supersonic-potato commented Sep 27, 2023

In PayaraMicro < javaCommandLineOptions> --add-opens java.base/java.io=ALL-UNNAMED </ javaCommandLineOptions>

Where did you apply this workaround ? Is it in pom.xml or elsewhere ? @avbravo

@avbravo
Copy link

avbravo commented Sep 27, 2023

I add it to the pom.xml file . @supersonic-potato

           <plugin>
                <groupId>fish.payara.maven.plugins</groupId>
                <artifactId>payara-micro-maven-plugin</artifactId>
                <configuration>
                    <payaraVersion>${payara.version}</payaraVersion>
                    <deployWar>false</deployWar>
                    <commandLineOptions>
                        <option>
                            <key>--autoBindHttp</key>
                        </option>
       
                       <option>
                            <key>--deploy</key>
                            <value>${project.build.directory}/${project.build.finalName}</value>
                        </option>
                    </commandLineOptions>
                    
                     <!--
                        JDK 17+ Soluciona error con EJB
                        -->                         
                        <javaCommandLineOptions>
                            <option>
                                <key>--add-opens</key>
                                <value>java.base/java.io=ALL-UNNAMED</value>
                            </option>
                        </javaCommandLineOptions>    
                </configuration>
                <version>2.0</version>
            </plugin>

@YotillaAntoni
Copy link

Current version doesn't need the add opens on java.base/java.io, but still, using some classes like java.time.LocalDateTime or java.math.BigInteger as part of parameters/return types with remote EJBs causes CORBA errors like this:

Caused by: jakarta.ejb.EJBException: java.rmi.RemoteException: CORBA UNKNOWN 1330446338 Maybe; nested exception is: 
2023-09-29T11:30:37.673044693Z 	org.omg.CORBA.UNKNOWN: ----------BEGIN server-side stack trace----------
2023-09-29T11:30:37.673047880Z org.omg.CORBA.UNKNOWN: WARNING: 00010002: Unknown user exception thrown by the server - exception: java.lang.reflect.InaccessibleObjectException; message: Unable to make private java.lang.Object java.time.LocalDateTime.writeReplace() accessible: module java.base does not "opens java.time" to unnamed module @25dcdcd0  vmcid: OMG  minor code: 2 completed: Maybe
2023-09-29T11:30:37.673051336Z 	at jdk.proxy76/jdk.proxy76.$Proxy414.runtimeexception(Unknown Source)
2023-09-29T11:30:37.673054037Z 	at com.sun.corba.ee.impl.protocol.MessageMediatorImpl.convertThrowableToSystemException(MessageMediatorImpl.java:1758)
2023-09-29T11:30:37.673057572Z 	at com.sun.corba.ee.impl.protocol.MessageMediatorImpl.handleThrowableDuringServerDispatch(MessageMediatorImpl.java:1709)
2023-09-29T11:30:37.673062066Z 	at com.sun.corba.ee.impl.protocol.MessageMediatorImpl.handleThrowableDuringServerDispatch(MessageMediatorImpl.java:1673)
2023-09-29T11:30:37.673066725Z 	at com.sun.corba.ee.impl.protocol.ServerRequestDispatcherImpl.dispatch(ServerRequestDispatcherImpl.java:229)
2023-09-29T11:30:37.673071046Z 	at com.sun.corba.ee.impl.protocol.MessageMediatorImpl.handleRequestRequest(MessageMediatorImpl.java:1544)
2023-09-29T11:30:37.673075741Z 	at com.sun.corba.ee.impl.protocol.SharedCDRClientRequestDispatcherImpl.marshalingComplete(SharedCDRClientRequestDispatcherImpl.java:99)
2023-09-29T11:30:37.673080752Z 	at com.sun.corba.ee.impl.protocol.ClientDelegateImpl.invoke(ClientDelegateImpl.java:238)
2023-09-29T11:30:37.673085537Z 	at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.privateInvoke(StubInvocationHandlerImpl.java:168)
2023-09-29T11:30:37.673090103Z 	at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:119)
2023-09-29T11:30:37.673163308Z 

So we still need to manually add -add-opens=java.base/java.time=ALL-UNNAMED --add-opens=java.base/java.math=ALL-UNNAMED

This worked fine with previous versions.

@seinecle
Copy link

seinecle commented Oct 4, 2023

I see this with payara community edition, 6.2023.9

@AndrewG10i
Copy link

I see this issue still reproduces on Payara Micro 6.2023.9, and it seems because Payara Micro still doesn't have opens for java.base/java.io. Thanks!

@supersonic-potato
Copy link

supersonic-potato commented Oct 10, 2023

Anyone else still facing that issue with payara micro 6.2023.9 despite applying the workaround on the pom.xml ?

@AndrewG10i
Copy link

AndrewG10i commented Oct 10, 2023

Anyone else still facing that issue with payara micro 6.2023.9 despite applying the workaround on the pom.xml ?

In case it is related to my previous post then I should clarify: I mean in my case Payara Micro 6.2023.9 with applied workaround by adding jvm-param starts and works well. What I'm saying that seems opens for java.base/java.io was not added to Payara Micro 6.2023.9, whereas it was added to Payara 6.2023.9 Full- and Web- profiles.

@claussni
Copy link

Can confirm: No need for extra --add-opens after upgrading Docker image from payara/server-full:6.2023.8-jdk17 to payara/server-full:6.2023.9-jdk17.

@brunogptavares
Copy link
Author

I can confirm that works well in Payara Micro 6.2022.10, i think is related to FISH-7817.

@AndrewG10i
Copy link

I see this issue still reproduces on Payara Micro 6.2023.9, and it seems because Payara Micro still doesn't have opens for java.base/java.io. Thanks!

Confirmed that with Payara Micro 6.2023.10 issue is resolved now. Thanks Payara Team! ;)

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
Development

No branches or pull requests