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.
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.
I just install the Jboss Tools into Eclipse Mars and tried using the Wildfly 10.0 Runtime. I've configured the runtime to use domain mode but when I try to start my app, I'm getting the error:
11:18:07,344 INFO [org.jboss.modules] (main) JBoss Modules version 1.5.0.Final
11:18:07,564 INFO [org.jboss.msc] (main) JBoss MSC version 1.2.6.Final
11:18:07,618 INFO [org.jboss.as] (MSC service thread 1-7) WFLYSRV0049: WildFly Full 10.0.0.CR5 (WildFly Core 2.0.5.Final) starting
11:18:07,871 ERROR [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0055: Caught exception during boot: org.jboss.as.controller.persistence.ConfigurationPersistenceException: WFLYCTL0085: Failed to parse configuration
at org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:131)
at org.jboss.as.server.ServerService.boot(ServerService.java:356)
at org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:299)
at java.lang.Thread.run(Thread.java:745)
Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[3,1]
Message: Unexpected element '{urn:jboss:domain:4.0}domain'
at org.jboss.staxmapper.XMLMapperImpl.processNested(XMLMapperImpl.java:108)
at org.jboss.staxmapper.XMLMapperImpl.parseDocument(XMLMapperImpl.java:69)
at org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:123)
... 3 more
11:18:07,872 FATAL [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0056: Server boot has failed in an unrecoverable manner; exiting. See previous messages for details.
11:18:07,873 INFO [org.jboss.as.server] (Thread-2) WFLYSRV0220: Server shutdown has been requested.
11:18:07,883 INFO [org.jboss.as] (MSC service thread 1-6) WFLYSRV0050: WildFly Full 10.0.0.CR5 (WildFly Core 2.0.5.Final) stopped in 6ms
I don't get this problem when I use standalone mode but I need domain mode to test my app. Does anyone know what the problem might be?
indeed, the 'launch configuration' built by the jBoss server runtime plug-in/tool is wrong for a Domain-mode start.
You can fix it as follows:
Create the server as usual and its associated runtime (in the Eclipse servers' view > right-click > new > server). When creating the runtime, pay attention to specify the 'server base directory' as "domain" (the default is "standalone") and then 'configuration file' as "domain.xml"
In the servers' view, right-click the just created jBoss server and do 'Open'. Under the category 'General Information' there is a link to 'Open Launch Configuration'
You need to adjust the launch configuration to match the actual launch made by the domain.bat / domain.sh. Of course, you'll need to adjust all paths below:
DO NOT forget to check OUT the option 'Always update arguments related to the runtime'
Program arguments:
-mp "C:/jBOSS/EAP70/modules" org.jboss.as.process-controller -jboss-home "C:\jBOSS\EAP70" -jvm "C:\java\JDK8U66\jre\bin\java" -mp "C:/jBOSS/EAP70/modules" -- "-Dorg.jboss.boot.log.file=C:/jBOSS/EAP70/domain/log/boot.log" "-Dlogging.configuration=file:/C:/jBOSS/EAP70/domain/configuration/logging.properties" -Xms64M -Xmx512M -XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -server -- -default-jvm "C:\java\JDK8U66\jre\bin\java"
VM arguments:
-Xms64M -Xmx512M -XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -server "-Dorg.jboss.boot.log.file=C:/jBOSS/EAP70/domain/log/boot.log" "-Dlogging.configuration=file:/C:/jBOSS/EAP70/domain/configuration/logging.properties" -cp "C:\jBOSS\EAP70\jboss-modules.jar" -Djboss.home.dir=C:/jBOSS/EAP70 -Djboss.bind.address.management=localhost
Working Directory: C:/jBOSS/EAP70/bin
Main class: org.jboss.modules.Main
Classpath: (bootstrap) JRE system Library + (user entries) jboss-modules.jar
If you are curious to understand where the trick is: In the long java command line, there is a separation around the main java class to launch, where "VM arguments" stand on the right of it, and "program arguments" on the left of it. You may capture the actual complete java command line that launches your server in domain mode with a tool like Microsoft sysinternals process-explorer on Windows, or the pargs shell command in LINUX, after you have started jBOSS with domain.bat or domain.sh.
But you will observe here that the java command takes a "-jar module.jar" argument whereas Eclipse launch requires a conventional "-cp module.jar main-class" argument form. the '-jar' argument is indeed a variant spec where the main class is specified by the manifest file inside the jar.
In my case, the (very long) command line was:
C:\jBOSS\EAP70\bin>"C:\Program Files\Java\jre1.8.0_66\bin\java" -Xms64M -Xmx512M -XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -server "-Dorg.jboss.boot.log.file=C:\jBOSS\EAP70\domain\log\process-controller.log" "-Dlogging.configuration=file:C:\jBOSS\EAP70\domain\configuration/logging.properties" -jar "C:\jBOSS\EAP70\jboss-modules.jar" -mp "C:\jBOSS\EAP70\modules" org.jboss.as.process-controller -jboss-home "C:\jBOSS\EAP70" -jvm "C:\Program Files\Java\jre1.8.0_66\bin\java" -mp "C:\jBOSS\EAP70\modules" -- "-Dorg.jboss.boot.log.file=C:\jBOSS\EAP70\domain\log\host-controller.log" "-Dlogging.configuration=file:C:\jBOSS\EAP70\domain\configuration/logging.properties" -Xms64M -Xmx512M -XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -server -- -default-jvm "C:\Program Files\Java\jre1.8.0_66\bin\java"
which breaks as follows:
JAVA_COMMAND>> "C:\Program Files\Java\jre1.8.0_66\bin\java"
VM_ARGS_____>> -Xms64M -Xmx512M -XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -server "-Dorg.jboss.boot.log.file=C:\jBOSS\EAP70\domain\log\process-controller.log" "-Dlogging.configuration=file:C:\jBOSS\EAP70\domain\configuration/logging.properties"
MAIN_CLASS__>> -jar "C:\jBOSS\EAP70\jboss-modules.jar" >>EQUIVALENT>> -cp "C:\jBOSS\EAP70\jboss-modules.jar" org.jboss.modules.Main
PROGRAM-ARGS>> -mp "C:\jBOSS\EAP70\modules" org.jboss.as.process-controller -jboss-home "C:\jBOSS\EAP70" -jvm "C:\Program Files\Java\jre1.8.0_66\bin\java" -mp "C:\jBOSS\EAP70\modules" -- "-Dorg.jboss.boot.log.file=C:\jBOSS\EAP70\domain\log\host-controller.log" "-Dlogging.configuration=file:C:\jBOSS\EAP70\domain\configuration/logging.properties" -Xms64M -Xmx512M -XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -server -- -default-jvm "C:\Program Files\Java\jre1.8.0_66\bin\java"
From the point you understand this quite surprising program argument section that replicates many of the JVM aguments, you can then map the pieces in Eclipse launch configuration. Do not forget that "-jar C:\jBOSS\EAP70\jboss-modules.jar" becomes "-cp C:\jBOSS\EAP70\jboss-modules.jar org.jboss.modules.Main" when the '-cp ...' is then the last piece of VM arguments, and "org.jboss.modules.Main" is the one class to define under the "Main" tab.
In a batch file I want to use jmxterm to access jboss mbeans.
Therefore I need to include jboss-eap-6.1\bin\client\jboss-client.jar to the classpath.
So I need to call jmxterm that way to get it to work:
java -cp
.;%JBOSSDIR%/bin/client/jboss-client.jar;jmxterm-1.0-alpha-4-uber.jar
org.codehaus.classworlds.uberjar.boot.Bootstrapper --url
service:jmx:remoting-jmx://localhost:9999
The problem: I need to pass an argument to the MBean method I want to call. So I only see the option to pass the script inline but don't know how to do that.
I found that it should work by piping the jmxterm command to the jmxterm call. Adapted to my case (using -cp instead of -jar) it doesn't work:
echo "bean run " | java -cp
.;%JBOSSDIR%/bin/client/jboss-client.jar;jmxterm-1.0-alpha-4-uber.jar
org.codehaus.classworlds.uberjar.boot.Bootstrapper --url
service:jmx:remoting-jmx://localhost:9999 -n
I get the following output:
Feb 04, 2015 3:26:00 PM org.xnio.Xnio <clinit>
INFO: XNIO Version 3.0.7.GA-redhat-1
Feb 04, 2015 3:26:00 PM org.xnio.nio.NioXnio <clinit>
INFO: XNIO NIO Implementation Version 3.0.7.GA-redhat-1
Feb 04, 2015 3:26:00 PM org.jboss.remoting3.EndpointImpl <clinit>
INFO: JBoss Remoting version 3.2.16.GA-redhat-1
Welcome to JMX terminal. Type "help" for available commands.
#IllegalArgumentException: Command "bean isn't valid, run help to see available commands
Passing the script as file works but I need to pass the script inline to pass parameters to the mbean method calls.
Any ideas?
I'm not sure if this is what you mean with pass the script as file, but you can give all the execution information as a file in the call:
java -cp .;%JBOSSDIR%/bin/client/jboss-client.jar;jmxterm-1.0-alpha-4-uber.jar
org.codehaus.classworlds.uberjar.boot.Bootstrapper -v silent -n < commands.txt
And then having a commands.txt as this:
open -u service:jmx:remoting-jmx://localhost:9999
run -b com.your.package:type=BeanName methodName parameter1
close
I am attempting to start glassfish from within eclipse (juno). I get the following error:
INFO: Successfully launched in 10 msec.
Error: Could not find or load main class Files
Command start-domain failed.
The DAS was stopped.
Here is the complete output in Eclipse:
Aug 16, 2012 11:51:23 AM com.sun.enterprise.admin.launcher.GFLauncherLogger info
INFO: JVM invocation command line:
C:\Program Files\Java\jdk1.7.0\bin\java.exe
-cp
C:/glassfish3-2/glassfish3/glassfish/modules/glassfish.jar
-XX:+UnlockDiagnosticVMOptions
-XX:MaxPermSize=192m
-XX:NewRatio=2
-Xmx512m
-javaagent:C:/glassfish3-2/glassfish3/glassfish/lib/monitor/btrace- agent.jar=unsafe=true,noServer=true
-client
-Dosgi.shell.telnet.maxconn=1
-Dfelix.fileinstall.disableConfigSave=false
-Djdbc.drivers=org.apache.derby.jdbc.ClientDriver
-Dfelix.fileinstall.dir=C:\glassfish3-2\glassfish3\glassfish/modules/autostart/
-Djavax.net.ssl.keyStore=C:\glassfish3-2\glassfish3\glassfish\domains\domain1/config/keystore.jks
-Dosgi.shell.telnet.port=6666
-Djava.security.policy=C:\glassfish3-2\glassfish3\glassfish\domains\domain1/config/server.policy
-Dfelix.fileinstall.log.level=2
-Dfelix.fileinstall.poll=5000
-Dcom.sun.aas.instanceRoot=C:\glassfish3-2\glassfish3\glassfish\domains\domain1
-Dosgi.shell.telnet.ip=127.0.0.1
-Dcom.sun.enterprise.config.config_environment_factory_class=com.sun.enterprise.config.serv erbeans.AppserverConfigEnvironmentFactory
-Djava.endorsed.dirs=C:\glassfish3-2\glassfish3\glassfish/modules/endorsed; C:\glassfish3-2\glassfish3\glassfish/lib/endorsed
-Dcom.sun.aas.installRoot=C:\glassfish3-2\glassfish3\glassfish
-Dfelix.fileinstall.bundles.startTransient=true
-Djava.ext.dirs=C:\Program Files\Java\jdk1.7.0/lib/ext;C:\Program Files\Java\jdk1.7.0/jre/lib/ext;C:\glassfish3-2\glassfish3\glassfish\domains\domain1/lib/ext
-Dfelix.fileinstall.bundles.new.start=true
-Djavax.net.ssl.trustStore=C:\glassfish3-2\glassfish3\glassfish\domains\domain1/config/cacerts.jks
Dorg.glassfish.additionalOSGiBundlesToStart=org.apache.felix.shell,org.apache.felix.gogo.runtime,org.apache.felix.gogo.shell,org.apache.felix.gogo.command
-Dcom.sun.enterprise.security.httpsOutboundKeyAlias=s1as
-Djava.security.auth.login.config=C:\glassfish3-2\glassfish3\glassfish\domains\domain1/config/login.conf
-DANTLR_USE_DIRECT_CLASS_LOADING=true
-Dgosh.args=--nointeractive
-Djava.library.path=C:/glassfish3-2/glassfish3/glassfish/lib;C:/Program Files/Java/jdk1.7.0/bin;C:/Windows/Sun/Java/bin;C:/Windows/System32;C:/Windows;C:/Program Files (x86)/HP SimplePass 2011/x64;C:/Program Files (x86)/HP SimplePass 2011;C:/Program Files/Common Files/Microsoft Shared/Windows Live;C:/Program Files (x86)/Common Files/microsoft shared/Windows Live;C:/Windows/System32/wbem;C:/Windows/System32/WindowsPowerShell/v1.0;C:/Program Files (x86)/Windows Live/Shared;C:/Program Files/Intel/WiFi/bin;C:/Program Files/Common Files/Intel/WirelessCommon;C:/Program Files (x86)/Intel/Services/IPT;C:/Program Files (x86)/Microsoft SQL Server/100/Tools/Binn;C:/Program Files/Microsoft SQL Server/100/Tools/Binn;C:/Program Files/Microsoft SQL Server/100/DTS/Binn;C:/Program Files (x86)/Microsoft ASP.NET/ASP.NET Web Pages/v1.0;C:/Program Files (x86)/Java/jdk1.7.0_01/bin;C:/glassfish3-2/glassfish3/glassfish/"C:/eclipse/eclipse.exe;C:/glassfish3-2/glassfish3/glassfish/" -vm "C:/Program Files (x86)/Java/jdk1.7.0_01/jre/bin/javaw.exe;C:/glassfish3-2/glassfish3/glassfish/.;C:/Program Files/Microsoft SQL Server/110/Tools/Binn;C:/Program Files (x86)/Microsoft SQL Server/110/Tools/Binn;C:/Program Files/Microsoft SQL Server/110/DTS/Binn;C:/Program Files (x86)/Microsoft SQL Server/110/Tools/Binn/ManagementStudio;C:/Program Files (x86)/Microsoft SQL Server/110/DTS/Binn;C:/Program Files/jEdit;C:/Program Files (x86)/Java/jre7/bin;C:/Program Files (x86)/QuickTime/QTSystem;C:/Program Files/Java/jdk1.7.0/db/bin;C:/glassfish3-2/glassfish3/glassfish
com.sun.enterprise.glassfish.bootstrap.ASMain
-domainname
domain1
-asadmin-args
host,,,localhost,,,--port,,,4848,,,--secure=false,,,--terse=false,,,--echo=false,,,--interactive=false,,,start-domain,,,--verbose=true,,,--debug=false,,,--domaindir,,,C:\glassfish3-2\glassfish3\glassfish\domains,,,domain1
-instancename
server
-verbose
true
-debug
false
-asadmin-classpath
C:/glassfish3-2/glassfish3/glassfish/modules/admin-cli.jar
-asadmin-classname
com.sun.enterprise.admin.cli.AsadminMain
-upgrade
false
-type
DAS
-domaindir
C:/glassfish3-2/glassfish3/glassfish/domains/domain1
-read-stdin
true
Aug 16, 2012 11:51:23 AM com.sun.enterprise.admin.launcher.GFLauncherLogger info
INFO: Successfully launched in 10 msec.
Error: Could not find or load main class Files
Command start-domain failed.
The DAS was stopped.
Thanks as always in advance.
Regards,
umbregachoong
This happened to me with glassfish started on command prompt.
c:\glassfish4\glassfish\bin>asadmin start-domain
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:
Error: Could not find or load main class Files
Command start-domain failed.
It was caused by having the following on PATH:
Path=...;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;...
I had the same issue as jan.supol, setting the path of the NVIDIA binaries into double-quotes like this also fixed it for me:
Path=...;"C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common";...
Most probably this can be caused by any whitespace in the PATH-variable that is not enclosed in double-quotes.
Is it possible to get information about the host where a dump file was been created e.g., OS version, service pack, .NET framework version etc.
Also the vertarget command displays current version of the Microsoft Windows operating. system
OS version and so forth is listed automatically when you open the dump file.
You can get the .NET framework version using the !eeversion command.
0:000> !eeversion
2.0.50727.4952 free
Workstation mode
SOS Version: 2.0.50727.4952 retail build
To get additional information for loaded modules use the verbose option for lm. E.g.
0:000> lm vm mscoree
start end module name
000007fe`f0f10000 000007fe`f0f7f000 mscoree (deferred)
Image path: C:\Windows\System32\mscoree.dll
Image name: mscoree.dll
Timestamp: Fri Nov 06 06:09:26 2009 (4AF3AF86)
CheckSum: 00072187
ImageSize: 0006F000
File version: 4.0.31106.0
Product version: 4.0.31106.0
File flags: 8 (Mask 3F) Private
File OS: 4 Unknown Win32
File type: 2.0 Dll
File date: 00000000.00000000
Translations: 0409.04b0
CompanyName: Microsoft Corporation
ProductName: Microsoft® .NET Framework
InternalName: mscoree.dll
OriginalFilename: mscoree.dll
ProductVersion: 4.0.31106.0
FileVersion: 4.0.31106.0 (Main.031106-0000)
PrivateBuild: DDBLD278
FileDescription: Microsoft .NET Runtime Execution Engine
LegalCopyright: © Microsoft Corporation. All rights reserved.
Comments: Flavor=Retail