5

When I try to start a domain in Glassfish 4.1 from IntelliJ I'm presented with this error:

JVM failed to start: com.sun.enterprise.admin.launcher.GFLauncherException: The server exited prematurely with exit code 1.
Before it died, it produced the following output:

-Djava.endorsed.dirs=/opt/glassfish4/glassfish/modules/endorsed:/opt/glassfish4/glassfish/lib/endorsed is not supported. Endorsed standards and standalone APIs
in modular form will be supported via the concept of upgradeable modules.

I found that endorsed dirs have been deprecated in Java 9, so I checked my configurations, and all seems to be using Java 8.

I also tried to start from the command line, with the same output.

Patrícia Villela
  • 808
  • 4
  • 14
  • 38
  • The endorsed standards override mechanism was deprecated in a JDK 8 update and was removed in JDK 9. AFAIK, neither Glassfish 4.1 or 5 have been certified on JDK 9 yet. There are several issues in the Glassfish issue tracker on this topic. – Alan Bateman Dec 05 '17 at 09:37
  • Possible duplicate of [How to fix -Djava.endorsed.dirs not supported, that emerged after installing WTP in Eclipse?](https://stackoverflow.com/questions/49819110/how-to-fix-djava-endorsed-dirs-not-supported-that-emerged-after-installing-wtp) – Toastrackenigma Mar 11 '20 at 00:33
  • Surely it's not a duplicate of a question from 5 months after. – Patrícia Villela Mar 12 '20 at 03:02

1 Answers1

3

I had to remove all mentions of -Djava.endorsed.dirs and -Djava.ext.dirs from my config/domain.xml

Kuzeko
  • 1,545
  • 16
  • 39