Can not Start GlassFish in Eclipse: GlassFish Error: Can not Find or Load Main Class Files

advertisements

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;...