Apache NetBeans version
Apache NetBeans 18
What happened
Attempted to run a very simple Java enterprise application client against a glassfish 7.0.6 server. The application deploys but won't run because the JVM can't be created. The log shows:
Djava.endorsed.dirs=/Applications/glassfish7/glassfish/lib/endorsed:/Applications/glassfish7/glassfish/modules/endorsed is not supported. Endorsed standards and standalone APIs in modular form will be supported via the concept of upgradeable modules.
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
The full Netbeans output from the run command is attached.
The Java version is 17, so modularised.
The use of -Djava.endorsed.dirs appears to be introduced in the build.impl file created by Netbeans. The file is attached. There are clear references to the endorsed directory in the file but I don't pretend to understand the file's operation. The directory referenced in the final generated JVM option reported above (/Applications/glassfish7/glassfish/lib/endorsed) does not exist in the glassfish 7 installation so the build.impl can't be right for the target.
build.impl.txt
Netbeans output.txt
How to reproduce
It is not clear what the real prerequisites are to this issue. I would think that running Netbeans 18 in a Java 17 environment will be sufficient. It is the build.impl generated in the environment that appears to be the problem. There has to be a JEE server to run against but I doubt the actual target will make very much difference provided the enterprise application client deploys to the server (it has to deploy before execution of the app client can be attempted).
I suggest trying to reproduce the problem with whatever is readily to hand.
Simple source of an interface, a web application, an application client, and a non-application client are attached.
RemoteCalculatorInterface is the interface. It has no dependencies.
RemoteCalculatorBean is the (very simple) web application that is a bean on the interface.
GF7RemoteDependencyDeployReproducerNonAppClient is a non-enterprise client that can be used to prove that the web app has been correctly deployed. See the dependencies in the source.
GF7RemoteDependencyDeployReproducerAppClient is an enterprise client that can be used to reproduce the problem. See the dependencies in the source.
To reproduce the problem:
- Compile RemoteCalculatorInterface as a class library
- Compile RemoteCalculatorBean as a web application, with the interface above in the class path
- Deploy the web app to the target server
- Adjust the lookup string in GF7RemoteDependencyDeployReproducerNonAppClient based on the portable JNDI name of the deployed remote calculator bean
- Compile GF7RemoteDependencyDeployReproducerNonAppClient with the interface and run it to show the web application is properly deployed
- Compile GF7RemoteDependencyDeployReproducerAppClient with the interface and attempt to run it to demonstrate the problem.
Netbeans output.txt
build.impl.txt
GF7RemoteDependencyDeployReproducerAppClient.txt
GF7RemoteDependencyDeployReproducerNonAppClient.txt
RemoteCalculatorBean.txt
RemoteCalculatorInterface.txt
Did this work correctly in an earlier version?
No / Don't know
Operating System
Mac OS 12.4 (Monterey)
JDK
java version "17.0.7" 2023-04-18 LTS Java(TM) SE Runtime Environment (build 17.0.7+8-LTS-224) Java HotSpot(TM) 64-Bit Server VM (build 17.0.7+8-LTS-224, mixed mode, sharing)
Apache NetBeans packaging
Apache NetBeans provided installer
Anything else
Problem is reliably reproducible.
Are you willing to submit a pull request?
No
Apache NetBeans version
Apache NetBeans 18
What happened
Attempted to run a very simple Java enterprise application client against a glassfish 7.0.6 server. The application deploys but won't run because the JVM can't be created. The log shows:
Djava.endorsed.dirs=/Applications/glassfish7/glassfish/lib/endorsed:/Applications/glassfish7/glassfish/modules/endorsed is not supported. Endorsed standards and standalone APIs in modular form will be supported via the concept of upgradeable modules.
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
The full Netbeans output from the run command is attached.
The Java version is 17, so modularised.
The use of -Djava.endorsed.dirs appears to be introduced in the build.impl file created by Netbeans. The file is attached. There are clear references to the endorsed directory in the file but I don't pretend to understand the file's operation. The directory referenced in the final generated JVM option reported above (/Applications/glassfish7/glassfish/lib/endorsed) does not exist in the glassfish 7 installation so the build.impl can't be right for the target.
build.impl.txt
Netbeans output.txt
How to reproduce
It is not clear what the real prerequisites are to this issue. I would think that running Netbeans 18 in a Java 17 environment will be sufficient. It is the build.impl generated in the environment that appears to be the problem. There has to be a JEE server to run against but I doubt the actual target will make very much difference provided the enterprise application client deploys to the server (it has to deploy before execution of the app client can be attempted).
I suggest trying to reproduce the problem with whatever is readily to hand.
Simple source of an interface, a web application, an application client, and a non-application client are attached.
RemoteCalculatorInterface is the interface. It has no dependencies.
RemoteCalculatorBean is the (very simple) web application that is a bean on the interface.
GF7RemoteDependencyDeployReproducerNonAppClient is a non-enterprise client that can be used to prove that the web app has been correctly deployed. See the dependencies in the source.
GF7RemoteDependencyDeployReproducerAppClient is an enterprise client that can be used to reproduce the problem. See the dependencies in the source.
To reproduce the problem:
Netbeans output.txt
build.impl.txt
GF7RemoteDependencyDeployReproducerAppClient.txt
GF7RemoteDependencyDeployReproducerNonAppClient.txt
RemoteCalculatorBean.txt
RemoteCalculatorInterface.txt
Did this work correctly in an earlier version?
No / Don't know
Operating System
Mac OS 12.4 (Monterey)
JDK
java version "17.0.7" 2023-04-18 LTS Java(TM) SE Runtime Environment (build 17.0.7+8-LTS-224) Java HotSpot(TM) 64-Bit Server VM (build 17.0.7+8-LTS-224, mixed mode, sharing)
Apache NetBeans packaging
Apache NetBeans provided installer
Anything else
Problem is reliably reproducible.
Are you willing to submit a pull request?
No