Issue
I have created a project in netbeans ide, when I run the project a dialogue box comes with the title "information" and message "glassfish server start failed please check server admin user name and password properties also please check the server log file for other possible causes". I did not set any username or password for the glassfish server. When I open C:\Users\Robert Mdee\glassfish6\glassfish\domains\domain1\logs I find the server text document with the code
[2022-08-09T23:05:31.163+0300] [] [INFO] [NCLS-GFLAUNCHER-00005] [jakarta.enterprise.launcher] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1660075531163] [levelValue: 800] [[
JVM invocation command line:
C:\Program Files\Java\jdk-18.0.1.1\bin\java.exe
-cp
C:/Users/Robert Mdee/glassfish6/glassfish/modules/glassfish.jar
-XX:+UnlockDiagnosticVMOptions
-XX:NewRatio=2
-Xmx512m
-Xbootclasspath/a:C:\Users\Robert Mdee\glassfish6\glassfish/lib/grizzly-npn-api.jar
--add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED
--add-opens=java.base/sun.net.www.protocol.jrt=ALL-UNNAMED
--add-opens=java.base/java.lang=ALL-UNNAMED
--add-opens=java.base/java.util=ALL-UNNAMED
--add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
-javaagent:C:/Users/Robert Mdee/glassfish6/glassfish/lib/monitor/flashlight-agent.jar
-Djava.awt.headless=true
-Djdk.corba.allowOutputStreamSubclass=true
-Djdk.tls.rejectClientInitiatedRenegotiation=true
-Djavax.xml.accessExternalSchema=all
-Djava.security.policy=C:\Users\Robert Mdee\glassfish6\glassfish\domains\domain1/config/server.policy
-Djava.security.auth.login.config=C:\Users\Robert Mdee\glassfish6\glassfish\domains\domain1/config/login.conf
-Dcom.sun.enterprise.security.httpsOutboundKeyAlias=s1as
-Djavax.net.ssl.keyStore=C:\Users\Robert Mdee\glassfish6\glassfish\domains\domain1/config/keystore.jks
-Djavax.net.ssl.trustStore=C:\Users\Robert Mdee\glassfish6\glassfish\domains\domain1/config/cacerts.jks
-Djdbc.drivers=org.apache.derby.jdbc.ClientDriver
-DANTLR_USE_DIRECT_CLASS_LOADING=true
-Dcom.sun.enterprise.config.config_environment_factory_class=com.sun.enterprise.config.serverbeans.AppserverConfigEnvironmentFactory
-Dorg.glassfish.additionalOSGiBundlesToStart=org.apache.felix.shell,org.apache.felix.gogo.runtime,org.apache.felix.gogo.shell,org.apache.felix.gogo.command,org.apache.felix.shell.remote,org.apache.felix.fileinstall
-Dosgi.shell.telnet.port=6666
-Dosgi.shell.telnet.maxconn=1
-Dosgi.shell.telnet.ip=127.0.0.1
-Dgosh.args=--nointeractive
-Dfelix.fileinstall.dir=C:\Users\Robert Mdee\glassfish6\glassfish/modules/autostart/
-Dfelix.fileinstall.poll=5000
-Dfelix.fileinstall.log.level=2
-Dfelix.fileinstall.bundles.new.start=true
-Dfelix.fileinstall.bundles.startTransient=true
-Dfelix.fileinstall.disableConfigSave=false
-Dorg.glassfish.gmbal.no.multipleUpperBoundsException=true
-Dcom.ctc.wstx.returnNullForDefaultNamespace=true
-Dcom.sun.aas.instanceRoot=C:\Users\Robert Mdee\glassfish6\glassfish\domains\domain1
-Dcom.sun.aas.installRoot=C:\Users\Robert Mdee\glassfish6\glassfish
-Djava.library.path=C:/Users/Robert Mdee/glassfish6/glassfish/lib;C:/Program Files/Java/jdk-18.0.1.1/bin;C:/Windows/Sun/Java/bin;C:/Windows/System32;C:/Windows;C:/Program Files/Java/jdk-17/bin;C:/Program Files/Java/jdk-16.0.2/bin;C:/Program Files/Common Files/Oracle/Java/javapath;C:/Windows/System32/wbem;C:/Windows/System32/WindowsPowerShell/v1.0;C:/Windows/System32/OpenSSH;C:/Program Files/MiKTeX 2.9/miktex/bin/x64;C:/Program Files/MySQL/MySQL Shell 8.0/bin;C:/Users/Robert Mdee/AppData/Local/Microsoft/WindowsApps;C:/Users/Robert Mdee/glassfish6/glassfish/bin
com.sun.enterprise.glassfish.bootstrap.ASMain
-upgrade
false
-domaindir
C:/Users/Robert Mdee/glassfish6/glassfish/domains/domain1
-read-stdin
true
-asadmin-args
--host,,,localhost,,,--port,,,4848,,,--secure=false,,,--terse=false,,,--echo=false,,,--interactive=true,,,start-domain,,,--verbose=false,,,--watchdog=false,,,--debug=false,,,--domaindir,,,C:\Users\Robert Mdee\glassfish6\glassfish\domains,,,domain1
-domainname
domain1
-instancename
server
-type
DAS
-verbose
false
-asadmin-classpath
C:/Users/Robert Mdee/glassfish6/glassfish/lib/client/appserver-cli.jar
-debug
false
-asadmin-classname
com.sun.enterprise.admin.cli.AdminMain]]
[2022-08-09T23:15:49.174+0300] [] [INFO] [NCLS-GFLAUNCHER-00005] [jakarta.enterprise.launcher] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1660076149174] [levelValue: 800] [[
JVM invocation command line:
C:\Program Files\Java\jdk-18.0.1.1\bin\java.exe
-cp
C:/Users/Robert Mdee/glassfish6/glassfish/modules/glassfish.jar
-XX:+UnlockDiagnosticVMOptions
-XX:NewRatio=2
-Xmx512m
-Xbootclasspath/a:C:\Users\Robert Mdee\glassfish6\glassfish/lib/grizzly-npn-api.jar
--add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED
--add-opens=java.base/sun.net.www.protocol.jrt=ALL-UNNAMED
--add-opens=java.base/java.lang=ALL-UNNAMED
--add-opens=java.base/java.util=ALL-UNNAMED
--add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
-javaagent:C:/Users/Robert Mdee/glassfish6/glassfish/lib/monitor/flashlight-agent.jar
-Djava.awt.headless=true
-Djdk.corba.allowOutputStreamSubclass=true
-Djdk.tls.rejectClientInitiatedRenegotiation=true
-Djavax.xml.accessExternalSchema=all
-Djava.security.policy=C:\Users\Robert Mdee\glassfish6\glassfish\domains\domain1/config/server.policy
-Djava.security.auth.login.config=C:\Users\Robert Mdee\glassfish6\glassfish\domains\domain1/config/login.conf
-Dcom.sun.enterprise.security.httpsOutboundKeyAlias=s1as
-Djavax.net.ssl.keyStore=C:\Users\Robert Mdee\glassfish6\glassfish\domains\domain1/config/keystore.jks
-Djavax.net.ssl.trustStore=C:\Users\Robert Mdee\glassfish6\glassfish\domains\domain1/config/cacerts.jks
-Djdbc.drivers=org.apache.derby.jdbc.ClientDriver
-DANTLR_USE_DIRECT_CLASS_LOADING=true
-Dcom.sun.enterprise.config.config_environment_factory_class=com.sun.enterprise.config.serverbeans.AppserverConfigEnvironmentFactory
-Dorg.glassfish.additionalOSGiBundlesToStart=org.apache.felix.shell,org.apache.felix.gogo.runtime,org.apache.felix.gogo.shell,org.apache.felix.gogo.command,org.apache.felix.shell.remote,org.apache.felix.fileinstall
-Dosgi.shell.telnet.port=6666
-Dosgi.shell.telnet.maxconn=1
-Dosgi.shell.telnet.ip=127.0.0.1
-Dgosh.args=--nointeractive
-Dfelix.fileinstall.dir=C:\Users\Robert Mdee\glassfish6\glassfish/modules/autostart/
-Dfelix.fileinstall.poll=5000
-Dfelix.fileinstall.log.level=2
-Dfelix.fileinstall.bundles.new.start=true
-Dfelix.fileinstall.bundles.startTransient=true
-Dfelix.fileinstall.disableConfigSave=false
-Dorg.glassfish.gmbal.no.multipleUpperBoundsException=true
-Dcom.ctc.wstx.returnNullForDefaultNamespace=true
-Dcom.sun.aas.instanceRoot=C:\Users\Robert Mdee\glassfish6\glassfish\domains\domain1
-Dcom.sun.aas.installRoot=C:\Users\Robert Mdee\glassfish6\glassfish
-Djava.library.path=C:/Users/Robert Mdee/glassfish6/glassfish/lib;C:/Program Files/Java/jdk-18.0.1.1/bin;C:/Windows/Sun/Java/bin;C:/Windows/System32;C:/Windows;C:/Program Files/Java/jdk-17/bin;C:/Program Files/Java/jdk-16.0.2/bin;C:/Program Files/Common Files/Oracle/Java/javapath;C:/Windows/System32/wbem;C:/Windows/System32/WindowsPowerShell/v1.0;C:/Windows/System32/OpenSSH;C:/Program Files/MiKTeX 2.9/miktex/bin/x64;C:/Program Files/MySQL/MySQL Shell 8.0/bin;C:/Users/Robert Mdee/AppData/Local/Microsoft/WindowsApps;C:/Users/Robert Mdee/glassfish6/bin
com.sun.enterprise.glassfish.bootstrap.ASMain
-upgrade
false
-domaindir
C:/Users/Robert Mdee/glassfish6/glassfish/domains/domain1
-read-stdin
true
-asadmin-args
--host,,,localhost,,,--port,,,4848,,,--secure=false,,,--terse=false,,,--echo=false,,,--interactive=true,,,start-domain,,,--verbose=false,,,--watchdog=false,,,--debug=false,,,--domaindir,,,C:\Users\Robert Mdee\glassfish6\glassfish\domains,,,domain1
-domainname
domain1
-instancename
server
-type
DAS
-verbose
false
-asadmin-classpath
C:/Users/Robert Mdee/glassfish6/glassfish/lib/client/appserver-cli.jar
-debug
false
-asadmin-classname
com.sun.enterprise.admin.cli.AdminMain]]
[2022-08-09T23:18:16.179+0300] [] [INFO] [NCLS-GFLAUNCHER-00005] [jakarta.enterprise.launcher] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1660076296179] [levelValue: 800] [[
JVM invocation command line:
C:\Program Files\Java\jdk-18.0.1.1\bin\java.exe
-cp
C:/Users/Robert Mdee/glassfish6/glassfish/modules/glassfish.jar
-XX:+UnlockDiagnosticVMOptions
-XX:NewRatio=2
-Xmx512m
-Xbootclasspath/a:C:\Users\Robert Mdee\glassfish6\glassfish/lib/grizzly-npn-api.jar
--add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED
--add-opens=java.base/sun.net.www.protocol.jrt=ALL-UNNAMED
--add-opens=java.base/java.lang=ALL-UNNAMED
--add-opens=java.base/java.util=ALL-UNNAMED
--add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
-javaagent:C:/Users/Robert Mdee/glassfish6/glassfish/lib/monitor/flashlight-agent.jar
-Djava.awt.headless=true
-Djdk.corba.allowOutputStreamSubclass=true
-Djdk.tls.rejectClientInitiatedRenegotiation=true
-Djavax.xml.accessExternalSchema=all
-Djava.security.policy=C:\Users\Robert Mdee\glassfish6\glassfish\domains\domain1/config/server.policy
-Djava.security.auth.login.config=C:\Users\Robert Mdee\glassfish6\glassfish\domains\domain1/config/login.conf
-Dcom.sun.enterprise.security.httpsOutboundKeyAlias=s1as
-Djavax.net.ssl.keyStore=C:\Users\Robert Mdee\glassfish6\glassfish\domains\domain1/config/keystore.jks
-Djavax.net.ssl.trustStore=C:\Users\Robert Mdee\glassfish6\glassfish\domains\domain1/config/cacerts.jks
-Djdbc.drivers=org.apache.derby.jdbc.ClientDriver
-DANTLR_USE_DIRECT_CLASS_LOADING=true
-Dcom.sun.enterprise.config.config_environment_factory_class=com.sun.enterprise.config.serverbeans.AppserverConfigEnvironmentFactory
-Dorg.glassfish.additionalOSGiBundlesToStart=org.apache.felix.shell,org.apache.felix.gogo.runtime,org.apache.felix.gogo.shell,org.apache.felix.gogo.command,org.apache.felix.shell.remote,org.apache.felix.fileinstall
-Dosgi.shell.telnet.port=6666
-Dosgi.shell.telnet.maxconn=1
-Dosgi.shell.telnet.ip=127.0.0.1
-Dgosh.args=--nointeractive
-Dfelix.fileinstall.dir=C:\Users\Robert Mdee\glassfish6\glassfish/modules/autostart/
-Dfelix.fileinstall.poll=5000
-Dfelix.fileinstall.log.level=2
-Dfelix.fileinstall.bundles.new.start=true
-Dfelix.fileinstall.bundles.startTransient=true
-Dfelix.fileinstall.disableConfigSave=false
-Dorg.glassfish.gmbal.no.multipleUpperBoundsException=true
-Dcom.ctc.wstx.returnNullForDefaultNamespace=true
-Dcom.sun.aas.instanceRoot=C:\Users\Robert Mdee\glassfish6\glassfish\domains\domain1
-Dcom.sun.aas.installRoot=C:\Users\Robert Mdee\glassfish6\glassfish
-Djava.library.path=C:/Users/Robert Mdee/glassfish6/glassfish/lib;C:/Program Files/Java/jdk-18.0.1.1/bin;C:/Windows/Sun/Java/bin;C:/Windows/System32;C:/Windows;C:/Program Files/Java/jdk-17/bin;C:/Program Files/Java/jdk-16.0.2/bin;C:/Program Files/Common Files/Oracle/Java/javapath;C:/Windows/System32/wbem;C:/Windows/System32/WindowsPowerShell/v1.0;C:/Windows/System32/OpenSSH;C:/Program Files/MiKTeX 2.9/miktex/bin/x64;C:/Program Files/MySQL/MySQL Shell 8.0/bin;C:/Users/Robert Mdee/AppData/Local/Microsoft/WindowsApps;C:/Users/Robert Mdee/glassfish6/bin
com.sun.enterprise.glassfish.bootstrap.ASMain
-upgrade
false
-domaindir
C:/Users/Robert Mdee/glassfish6/glassfish/domains/domain1
-read-stdin
true
-asadmin-args
--host,,,localhost,,,--port,,,4848,,,--secure=false,,,--terse=false,,,--echo=false,,,--interactive=true,,,start-domain,,,--verbose=false,,,--watchdog=false,,,--debug=false,,,--domaindir,,,C:\Users\Robert Mdee\glassfish6\glassfish\domains,,,domain1
-domainname
domain1
-instancename
server
-type
DAS
-verbose
false
-asadmin-classpath
C:/Users/Robert Mdee/glassfish6/glassfish/lib/client/appserver-cli.jar
-debug
false
-asadmin-classname
com.sun.enterprise.admin.cli.AdminMain]]
What can I do to correct this error so the project can sucesfully run and open the browser.
Solution
You don't specify your precise version of Glassfish, but based on the directory path "...\glassfish6\glassfish..." in your log I'm assuming that you are running some implementation of GlassFish 6.
If so, these are the supported Java releases for Eclipse GlassFish 6.x:
GlassFish 6 requires JDK 8.
GlassFish 6.1 supports JDK 11
GlassFish 6.2.1 supports JDK 17
GlassFish 6.2.2 supports JDK 17
GlassFish 6.2.3 supports JDK 17
GlassFish 6.2.4 supports JDK 18
GlassFish 6.2.5 supports JDK 18
See the Eclipse GlassFish Downloads page for more details.
You also don't specify your version of NetBeans, but since you are running Java 18, your only valid options are NetBeans 13 or NetBeans 14.
To summarize, since the log shows that you are using JDK 18:
- You must use GlassFish 6.2.4 or GlassFish 6.2.5.
- You must use NetBeans 13 or NetBeans 14.
Note that the version of Java being used by NetBeans, as shown in the Help > About screen, will also be used to run GlassFish when started within NetBeans.
As a possibly related matter, I see that your java.library.path value includes entries for several JDK releases. You probably want to clean that up.
Answered By - skomisa
Answer Checked By - Marilyn (JavaFixing Volunteer)