users@glassfish.java.net

Starting the server through com.sun.enterprise.server.PELaunch main method

From: <glassfish_at_javadesktop.org>
Date: Thu, 26 Apr 2007 08:46:22 PDT

Hi there,

I've got some trouble debugging hibernate in netBeans, so I wanted to start my Sun App Server through its main method in eclipse.

I used for that the log of netBeans on server startup and I did exactly the same procedure, unfortunetly I can't get it work:

[b]main class:[/b]
com.sun.enterprise.server.PELaunch

[b]program args:[/b]
start
debug

[b]vm arguments:[/b]
-client
-Xdebug
-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=9009
-Xmx512m
-XX:NewRatio=2
-Dcom.sun.aas.defaultLogFile=D:/Sun/AppServer/domains/domain1/logs/server.log
-Dcom.sun.aas.jdwpOptions=transport=dt_socket,server=y,suspend=n,address=9009
-Djava.endorsed.dirs=d:/Sun/AppServer/lib/endorsed
-Djava.security.policy=D:/Sun/AppServer/domains/domain1/config/server.policy
-Djava.security.auth.login.config=D:/Sun/AppServer/domains/domain1/config/login.conf
-Dsun.rmi.dgc.server.gcInterval=3600000
-Dsun.rmi.dgc.client.gcInterval=3600000
-Djavax.net.ssl.keyStore=D:/Sun/AppServer/domains/domain1/config/keystore.jks
-Djavax.net.ssl.trustStore=D:/Sun/AppServer/domains/domain1/config/cacerts.jks
-Djava.ext.dirs=d:/Sun/AppServer/jdk/jre/lib/ext;D:/Sun/AppServer/domains/domain1/lib/ext;d:/Sun/AppServer/javadb/lib
-Djdbc.drivers=org.apache.derby.jdbc.ClientDriver
-Djavax.management.builder.initial=com.sun.enterprise.admin.server.core.jmx.AppServerMBeanServerBuilder
-Dcom.sun.enterprise.config.config_environment_factory_class=com.sun.enterprise.config.serverbeans.AppserverConfigEnvironmentFactory
-Dcom.sun.enterprise.taglibs=appserv-jstl.jar,jsf-impl.jar
-Dcom.sun.enterprise.taglisteners=jsf-impl.jar
-Dcom.sun.aas.classloader.optionalOverrideableChain=appserv-ws.jar,commons-logging.jar,commons-launcher.jar
-Dcom.sun.aas.classloader.appserverChainJars=admin-cli.jar,admin-cli-ee.jar,dbschema.jar,j2ee-svc.jar
-Dcom.sun.aas.classloader.serverClassPath.ee=%HADB_HOME%/lib/hadbjdbc4.jar,d:/Sun/AppServer/lib/SUNWjdmk/5.1/lib/jdmkrt.jar,%HADB_HOME%/lib/dbstate.jar,%HADB_HOME%/lib/hadbm.jar,%HADB_HOME%/lib/hadbmgt.jar,d:/Sun/AppServer/lib/SUNWmfwk/lib/mfwk_instrum_tk.jar
-Dcom.sun.aas.configName=server-config
-Ddomain.name=domain1
-Djmx.invoke.getters=true
-Dcom.sun.aas.promptForIdentity=true
-Dcom.sun.aas.classloader.optionalOverrideableChain.ee=
-Dcom.sun.aas.instanceRoot=D:/Sun/AppServer/domains/domain1
-Dcom.sun.aas.domainName=domain1
-Dcom.sun.aas.classloader.sharedChainJars=javaee.jar,d:/Sun/AppServer/jdk/lib/tools.jar,install/applications/jmsra/imqjmsra.jar,commons-launcher.jar,d:/Sun/AppServer/imq/lib/jaxm-api.jar,d:/Sun/AppServer/imq/lib/fscontext.jar,d:/Sun/AppServer/imq/lib/imqbroker.jar,d:/Sun/AppServer/imq/lib/imqjmx.jar,d:/Sun/AppServer/imq/lib/imqxm.jar,d:/Sun/AppServer/lib/ant/lib/ant.jar,appserv-ws.jar,mail.jar,jsf-api.jar,jsf-impl.jar,appserv-jstl.jar,appserv-env.jar,jmxremote_optional.jar,d:/Sun/AppServer/lib/SUNWjdmk/5.1/lib/jdmkrt.jar,commons-logging.jar,activation.jar,appserv-rt.jar,appserv-admin.jar,appserv-cmp.jar
-Dcom.sun.aas.classloader.sharedChainJars.ee=appserv-se.jar,appserv-ee.jar,%HADB_HOME%/lib/dbstate.jar,%HADB_HOME%/lib/hadbjdbc4.jar,jgroups-all.jar,d:/Sun/AppServer/lib/SUNWmfwk/lib/mfwk_instrum_tk.jar
-Djava.util.logging.manager=com.sun.enterprise.server.logging.ServerLogManager
-Dcom.sun.enterprise.overrideablejavaxpackages=javax.xml.bind,javax.help,javax.portlet
-Dcom.sun.aas.classloader.serverClassPath=d:/Sun/AppServer/lib/install/applications/jmsra/imqjmsra.jar,d:/Sun/AppServer/imq/lib/jaxm-api.jar,d:/Sun/AppServer/imq/lib/fscontext.jar,d:/Sun/AppServer/imq/lib/imqbroker.jar,d:/Sun/AppServer/imq/lib/imqjmx.jar,d:/Sun/AppServer/lib/ant/lib/ant.jar,d:/Sun/AppServer/lib/SUNWjdmk/5.1/lib/jdmkrt.jar
-Dcom.sun.aas.classloader.appserverChainJars.ee=
-Dcom.sun.aas.configRoot=d:/Sun/AppServer/config
-Djava.library.path=d:\Sun\AppServer\lib;d:\Sun\AppServer\lib;d:\Sun\AppServer\jdk\bin;.;C:\WINDOWS\system32;C:\WINDOWS;d:\Sun\AppServer\lib;d:\Sun\AppServer\bin;d:\Sun\AppServer\bin;d:\Sun\AppServer\bin;D:/Sun/SDK/jdk\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\JavaTools\apache-ant-1.6.5\bin;D:\Apache-ant-1.6.5\bin;"d:\Program Files\QuickTime\QTSystem\";d:\Sun\SDK\bin;d:\Sun\AppServer\bin
-Dcom.sun.aas.instanceName=server
-Dcom.sun.aas.processLauncher=SE
-Dcom.sun.aas.installRoot=d:/Sun/AppServer
-Dcom.sun.aas.ClassPathPrefix=
-Dcom.sun.aas.ClassPathSuffix=
-Dcom.sun.aas.ServerClassPath=

[b]I receive this as my output[/b]

Listening for transport dt_socket at address: 9009
java.lang.ExceptionInInitializerError
        at com.sun.enterprise.server.logging.UniformLogFormatter.<clinit>(UniformLogFormatter.java:78)
        at com.sun.enterprise.server.logging.FileandSyslogHandler.<init>(FileandSyslogHandler.java:253)
        at com.sun.enterprise.server.logging.FileandSyslogHandler.<clinit>(FileandSyslogHandler.java:103)
        at com.sun.enterprise.server.logging.ServerLogManager.getFileandSyslogHandler(ServerLogManager.java:206)
        at com.sun.enterprise.server.logging.ServerLogManager.access$100(ServerLogManager.java:60)
        at com.sun.enterprise.server.logging.ServerLogManager$1.run(ServerLogManager.java:141)
        at java.security.AccessController.doPrivileged(Native Method)
        at com.sun.enterprise.server.logging.ServerLogManager.internalInitializeLogger(ServerLogManager.java:128)
        at com.sun.enterprise.server.logging.ServerLogManager.initializeLogger(ServerLogManager.java:116)
        at com.sun.enterprise.server.logging.BaseLogManager.doInitializeLogger(BaseLogManager.java:128)
        at com.sun.enterprise.server.logging.BaseLogManager.addLogger(BaseLogManager.java:182)
        at java.util.logging.Logger.getLogger(Logger.java:321)
        at com.sun.logging.LogDomains.getLogger(LogDomains.java:227)
        at com.sun.enterprise.server.ApplicationServer.<clinit>(ApplicationServer.java:85)
        at com.sun.enterprise.server.logging.ModuleToLoggerNameMapper.getMatchedModuleLoggerName(ModuleToLoggerNameMapper.java:189)
        at com.sun.enterprise.server.logging.BaseLogManager.addLogger(BaseLogManager.java:156)
        at java.util.logging.LogManager$1.run(LogManager.java:180)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.util.logging.LogManager.<clinit>(LogManager.java:156)
        at java.util.logging.Logger.getLogger(Logger.java:315)
        at com.sun.logging.LogDomains.getLogger(LogDomains.java:227)
        at com.sun.enterprise.util.i18n.StringManagerBase.<clinit>(StringManagerBase.java:88)
        at com.sun.enterprise.server.PEMain.<clinit>(PEMain.java:117)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.sun.enterprise.server.PELaunch.main(PELaunch.java:272)
Caused by: java.lang.NullPointerException
        at com.sun.appserv.server.util.Version.<clinit>(Version.java:50)
        ... 28 more
java.lang.NoClassDefFoundError: Could not initialize class com.sun.enterprise.server.logging.FileandSyslogHandler
        at com.sun.enterprise.server.logging.ServerLogManager.getFileandSyslogHandler(ServerLogManager.java:206)
        at com.sun.enterprise.server.logging.ServerLogManager.access$100(ServerLogManager.java:60)
        at com.sun.enterprise.server.logging.ServerLogManager$1.run(ServerLogManager.java:141)
        at java.security.AccessController.doPrivileged(Native Method)
        at com.sun.enterprise.server.logging.ServerLogManager.internalInitializeLogger(ServerLogManager.java:128)
        at com.sun.enterprise.server.logging.ServerLogManager.initializeLogger(ServerLogManager.java:116)
        at com.sun.enterprise.server.logging.BaseLogManager.doInitializeLogger(BaseLogManager.java:128)
        at com.sun.enterprise.server.logging.BaseLogManager.addLogger(BaseLogManager.java:182)
        at java.util.logging.LogManager$1.run(LogManager.java:180)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.util.logging.LogManager.<clinit>(LogManager.java:156)
        at java.util.logging.Logger.getLogger(Logger.java:315)
        at com.sun.logging.LogDomains.getLogger(LogDomains.java:227)
        at com.sun.enterprise.util.i18n.StringManagerBase.<clinit>(StringManagerBase.java:88)
        at com.sun.enterprise.server.PEMain.<clinit>(PEMain.java:117)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.sun.enterprise.server.PELaunch.main(PELaunch.java:272)
java.lang.NoClassDefFoundError: Could not initialize class com.sun.enterprise.server.logging.FileandSyslogHandler
        at com.sun.enterprise.server.logging.ServerLogManager.getFileandSyslogHandler(ServerLogManager.java:206)
        at com.sun.enterprise.server.logging.ServerLogManager.access$100(ServerLogManager.java:60)
        at com.sun.enterprise.server.logging.ServerLogManager$1.run(ServerLogManager.java:141)
        at java.security.AccessController.doPrivileged(Native Method)
        at com.sun.enterprise.server.logging.ServerLogManager.internalInitializeLogger(ServerLogManager.java:128)
        at com.sun.enterprise.server.logging.ServerLogManager.initializeLogger(ServerLogManager.java:116)
        at com.sun.enterprise.server.logging.BaseLogManager.doInitializeLogger(BaseLogManager.java:128)
        at com.sun.enterprise.server.logging.BaseLogManager.addLogger(BaseLogManager.java:182)
        at java.util.logging.LogManager$1.run(LogManager.java:185)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.util.logging.LogManager.<clinit>(LogManager.java:156)
        at java.util.logging.Logger.getLogger(Logger.java:315)
        at com.sun.logging.LogDomains.getLogger(LogDomains.java:227)
        at com.sun.enterprise.util.i18n.StringManagerBase.<clinit>(StringManagerBase.java:88)
        at com.sun.enterprise.server.PEMain.<clinit>(PEMain.java:117)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.sun.enterprise.server.PELaunch.main(PELaunch.java:272)
java.lang.NoClassDefFoundError: Could not initialize class com.sun.enterprise.server.logging.FileandSyslogHandler
        at com.sun.enterprise.server.logging.ServerLogManager.getFileandSyslogHandler(ServerLogManager.java:206)
        at com.sun.enterprise.server.logging.ServerLogManager.access$100(ServerLogManager.java:60)
        at com.sun.enterprise.server.logging.ServerLogManager$1.run(ServerLogManager.java:141)
        at java.security.AccessController.doPrivileged(Native Method)
        at com.sun.enterprise.server.logging.ServerLogManager.internalInitializeLogger(ServerLogManager.java:128)
        at com.sun.enterprise.server.logging.ServerLogManager.initializeLogger(ServerLogManager.java:116)
        at com.sun.enterprise.server.logging.BaseLogManager.doInitializeLogger(BaseLogManager.java:128)
        at com.sun.enterprise.server.logging.BaseLogManager.addLogger(BaseLogManager.java:182)
        at java.util.logging.Logger.getLogger(Logger.java:321)
        at com.sun.logging.LogDomains.getLogger(LogDomains.java:227)
        at com.sun.enterprise.util.i18n.StringManagerBase.<clinit>(StringManagerBase.java:88)
        at com.sun.enterprise.server.PEMain.<clinit>(PEMain.java:117)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.sun.enterprise.server.PELaunch.main(PELaunch.java:272)
java.lang.NoClassDefFoundError: Could not initialize class com.sun.enterprise.server.logging.FileandSyslogHandler
        at com.sun.enterprise.server.logging.ServerLogManager.getFileandSyslogHandler(ServerLogManager.java:206)
        at com.sun.enterprise.server.logging.ServerLogManager.access$100(ServerLogManager.java:60)
        at com.sun.enterprise.server.logging.ServerLogManager$1.run(ServerLogManager.java:141)
        at java.security.AccessController.doPrivileged(Native Method)
        at com.sun.enterprise.server.logging.ServerLogManager.internalInitializeLogger(ServerLogManager.java:128)
        at com.sun.enterprise.server.logging.ServerLogManager.initializeLogger(ServerLogManager.java:116)Enter Admin User:

        at com.sun.enterprise.server.logging.BaseLogManager.doInitializeLogger(BaseLogManager.java:128)
        at com.sun.enterprise.server.logging.BaseLogManager.addLogger(BaseLogManager.java:182)
        at java.util.logging.Logger.getLogger(Logger.java:321)
        at com.sun.logging.LogDomains.getLogger(LogDomains.java:227)
        at com.sun.enterprise.security.audit.AuditManager.<clinit>(AuditManager.java:71)
        at com.sun.enterprise.security.audit.AuditManagerFactory.<clinit>(AuditManagerFactory.java:40)
        at com.sun.enterprise.server.PEMain.<clinit>(PEMain.java:134)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.sun.enterprise.server.PELaunch.main(PELaunch.java:272)

Enter Admin Password:

Enter Master Password:

Enter Other Password Information (or ctrl-D or ctrl-Z):
[Message sent by forum member 'zhamdi' (zhamdi)]

http://forums.java.net/jive/thread.jspa?messageID=214480