Glassfish error starting domain. endorsed directories not supported

1.6k Views Asked by At

I have a problem starting glassfish on Mac Os X 10.14.6.

I installed it with

brew install glassfish

then I added

AS_JAVA="/Library/Java/JavaVirtualMachines/jdk1.8.0_202.jdk/Contents/Home"

in asenv.conf in order to solve a java null pointer exception.

and now I receive the following error:

$ ./asadmin start-domain domain1

Waiting for domain1 to start .Error starting domain domain1.
The server exited prematurely with exit code 1.
Before it died, it produced the following output:

-Djava.endorsed.dirs=/usr/local/Cellar/glassfish/5.1.0/libexec/glassfish/modules/endorsed:/usr/local/Cellar/glassfish/5.1.0/libexec/glassfish/lib/endorsed is not supported. Endorsed standards and standalone APIs
in modular form will be supported via the concept of upgradeable modules.
Java HotSpot(TM) 64-Bit Server VM warning: Ignoring option MaxPermSize; support was removed in 8.0
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

Command start-domain failed.

Does anyone know how to solve this issue?

1

There are 1 best solutions below

0
Christoph John On BEST ANSWER

The endorsed directories have been removed since Java 9. So the error message suggests that you are running with at least Java 9.

You need to use Java 8 for this to work. If I remember correctly then Glassfish does not support Java 9 and higher.