本文介绍了无法在Eclipse中启动GlassFish:GlassFish错误:找不到或加载主类文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试图从日食(juno)里面开始做玻璃鱼。我收到以下错误:信息:10毫秒成功启动。
错误:找不到或加载主类文件
命令起始域失败。
DAS已停止。
以下是Eclipse中的完整输出:
2012年8月16日上午11:51:23 com.sun.enterprise.admin.launcher.GFLauncherLogger信息
INFO:JVM调用命令行:
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\dom ains\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 / approveded; C:\glassfish3-2\glassfish3\glassfish / lib / approveded
-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
-D ANTLR_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文件(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:/ eclip se / eclipse.exe; C:/ glassfish3-2 / glassfish3 / glassfish /-vmC:/ 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
主机,,, ,,,本地主机 - 端口,,, ,,, 4848 - 安全=假,,, - 简洁=假,,, - 回声=假,,, - 互动=假,,,启动-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
信息:10毫秒成功启动。
错误:找不到或加载主类文件
命令起始域失败。
DAS已停止。
一如既往的谢谢。
问候,
umbregachoong
解决方案
这发生在我与glassfish在命令提示符下启动。
c:\glassfish4\glassfish\bin> asadmin start-domain
等待domain1启动。
启动域domain1时出错。
服务器提前退出退出代码1.
在它死亡之前,它产生以下输出:
错误:找不到或加载主类文件
命令起始域失败。
这是由于在PATH上有以下内容:
Path = ...; C:\程序文件(x86)\NVIDIA Corporation\PhysX\Common; ...
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 FilesCommand 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;...
这篇关于无法在Eclipse中启动GlassFish:GlassFish错误:找不到或加载主类文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!