Ok, here is the trace with Thread.dumpStack called just before calling getTargets.
If you wish to test some variations you can download the code from my first post (it already has a build.xml file to create the war file).
Thanks
Mar 23, 2007 4:01:02 PM com.sun.enterprise.admin.servermgmt.launch.ASLauncher buildCommand
INFO:
/usr/lib/jvm/java-1.5.0-sun-1.5.0.08/jre/../bin/java
-client
-XX:+UnlockDiagnosticVMOptions
-XX:MaxPermSize=192m
-Xmx512m
-XX:NewRatio=2
-XX:+LogVMOutput
-XX:LogFile=/home/bytec0de/glassfish-v2-b40/domains/metaverse/logs/jvm.log
-Dcom.sun.aas.ClassPathPrefix=
-Dcom.sun.aas.ClassPathSuffix=/home/bytec0de/glassfish-v2-b40/domains/metaverse/lib/metaportal.realm.jar
-Dcom.sun.aas.ServerClassPath=
-Dcom.sun.aas.classloader.appserverChainJars.ee=
-Dcom.sun.aas.classloader.appserverChainJars=admin-cli.jar,admin-cli-ee.jar,dbschema.jar,j2ee-svc.jar
-Dcom.sun.aas.classloader.optionalOverrideableChain.ee=
-Dcom.sun.aas.classloader.optionalOverrideableChain=webservices-rt.jar,webservices-tools.jar,commons-logging.jar,commons-launcher.jar
-Dcom.sun.aas.classloader.serverClassPath.ee=%HADB_HOME%/lib/hadbjdbc4.jar,/home/bytec0de/glassfish/lib/SUNWjdmk/5.1/lib/jdmkrt.jar,%HADB_HOME%/lib/dbstate.jar,%HADB_HOME%/lib/hadbm.jar,%HADB_HOME%/lib/hadbmgt.jar,%MFWK_HOME%/lib/mfwk_instrum_tk.jar
-Dcom.sun.aas.classloader.serverClassPath=/home/bytec0de/glassfish/lib/install/applications/jmsra/imqjmsra.jar,/home/bytec0de/glassfish/imq/lib/jaxm-api.jar,/home/bytec0de/glassfish/imq/lib/fscontext.jar,/home/bytec0de/glassfish/imq/lib/imqbroker.jar,/home/bytec0de/glassfish/imq/lib/imqjmx.jar,/home/bytec0de/glassfish/lib/ant/lib/ant.jar,/home/bytec0de/glassfish/lib/SUNWjdmk/5.1/lib/jdmkrt.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,%MFWK_HOME%/lib/mfwk_instrum_tk.jar
-Dcom.sun.aas.classloader.sharedChainJars=javaee.jar,/usr/lib/jvm/java-1.5.0-sun-1.5.0.08/jre/../lib/tools.jar,install/applications/jmsra/imqjmsra.jar,commons-launcher.jar,/home/bytec0de/glassfish/imq/lib/jaxm-api.jar,/home/bytec0de/glassfish/imq/lib/fscontext.jar,/home/bytec0de/glassfish/imq/lib/imqbroker.jar,/home/bytec0de/glassfish/imq/lib/imqjmx.jar,/home/bytec0de/glassfish/imq/lib/imqxm.jar,/home/bytec0de/glassfish/lib/ant/lib/ant.jar,webservices-rt.jar,webservices-tools.jar,mail.jar,jsf-api.jar,jsf-impl.jar,appserv-jstl.jar,appserv-env.jar,jmxremote_optional.jar,/home/bytec0de/glassfish/lib/SUNWjdmk/5.1/lib/jdmkrt.jar,commons-logging.jar,activation.jar,appserv-rt.jar,appserv-admin.jar,appserv-cmp.jar,/home/bytec0de/glassfish/updatecenter/lib/updatecenter.jar,/home/bytec0de/glassfish/jbi/lib/jbi.jar
-Dcom.sun.aas.configName=server-config
-Dcom.sun.aas.configRoot=/home/bytec0de/glassfish/config
-Dcom.sun.aas.defaultLogFile=/home/bytec0de/glassfish-v2-b40/domains/metaverse/logs/server.log
-Dcom.sun.aas.domainName=metaverse
-Dcom.sun.aas.installRoot=/home/bytec0de/glassfish
-Dcom.sun.aas.instanceName=server
-Dcom.sun.aas.instanceRoot=/home/bytec0de/glassfish-v2-b40/domains/metaverse
-Dcom.sun.aas.processLauncher=SE
-Dcom.sun.aas.promptForIdentity=true
-Dcom.sun.aas.verboseMode=true
-Dcom.sun.enterprise.config.config_environment_factory_class=com.sun.enterprise.config.serverbeans.AppserverConfigEnvironmentFactory
-Dcom.sun.enterprise.overrideablejavaxpackages=javax.help,javax.portlet
-Dcom.sun.enterprise.taglibs=appserv-jstl.jar,jsf-impl.jar
-Dcom.sun.enterprise.taglisteners=jsf-impl.jar
-Dcom.sun.updatecenter.home=/home/bytec0de/glassfish/updatecenter
-Ddomain.name=metaverse
-Djava.endorsed.dirs=/home/bytec0de/glassfish/lib/endorsed
-Djava.ext.dirs=/usr/lib/jvm/java-1.5.0-sun-1.5.0.08/jre/../lib/ext:/usr/lib/jvm/java-1.5.0-sun-1.5.0.08/jre/../jre/lib/ext:/home/bytec0de/glassfish-v2-b40/domains/metaverse/lib/ext:/home/bytec0de/glassfish/javadb/lib
-Djava.library.path=/home/bytec0de/glassfish/lib:/home/bytec0de/glassfish/lib:/home/bytec0de/glassfish/lib
-Djava.security.auth.login.config=/home/bytec0de/glassfish-v2-b40/domains/metaverse/config/login.conf
-Djava.security.policy=/home/bytec0de/glassfish-v2-b40/domains/metaverse/config/server.policy
-Djava.util.logging.manager=com.sun.enterprise.server.logging.ServerLogManager
-Djavax.management.builder.initial=com.sun.enterprise.admin.server.core.jmx.AppServerMBeanServerBuilder
-Djavax.net.ssl.keyStore=/home/bytec0de/glassfish-v2-b40/domains/metaverse/config/keystore.jks
-Djavax.net.ssl.trustStore=/home/bytec0de/glassfish-v2-b40/domains/metaverse/config/cacerts.jks
-Djdbc.drivers=org.apache.derby.jdbc.ClientDriver
-Djmx.invoke.getters=true
-Dsun.rmi.dgc.client.gcInterval=3600000
-Dsun.rmi.dgc.server.gcInterval=3600000
-cp
:/home/bytec0de/glassfish/lib/appserv-launch.jar
com.sun.enterprise.server.PELaunch
start
verbose
Mar 23, 2007 4:01:02 PM com.sun.enterprise.admin.servermgmt.launch.ASLauncher process
INFO: goodbye
[#|2007-03-23T16:01:03.594+0000|INFO|sun-appserver9.1|javax.enterprise.system.core|_ThreadID=10;_ThreadName=main;|Starting Sun Java System Application Server 9.1 (build b40-rc) ...|#]
[#|2007-03-23T16:01:06.280+0000|INFO|sun-appserver9.1|javax.enterprise.system.core|_ThreadID=10;_ThreadName=main;|CORE5098: AS Socket Service Initialization has been completed.|#]
[#|2007-03-23T16:01:06.310+0000|INFO|sun-appserver9.1|javax.enterprise.system.core|_ThreadID=10;_ThreadName=main;Java HotSpot(TM) Client VM;1.5.0_08;Sun Microsystems Inc.;|CORE5076: Using [Java HotSpot(TM) Client VM, Version 1.5.0_08] from [Sun Microsystems Inc.]|#]
[#|2007-03-23T16:01:06.480+0000|INFO|sun-appserver9.1|javax.enterprise.system.core.security|_ThreadID=10;_ThreadName=main;|SEC1002: Security Manager is OFF.|#]
[#|2007-03-23T16:01:09.532+0000|INFO|sun-appserver9.1|javax.enterprise.system.tools.admin|_ThreadID=10;_ThreadName=main;|ADM0001:MBeanServer initialized successfully|#]
[#|2007-03-23T16:01:10.332+0000|INFO|sun-appserver9.1|javax.enterprise.system.core.security|_ThreadID=10;_ThreadName=main;com.sun.enterprise.security.provider.PolicyWrapper;|SEC1143: Loading policy provider com.sun.enterprise.security.provider.PolicyWrapper.|#]
[#|2007-03-23T16:01:11.925+0000|INFO|sun-appserver9.1|javax.enterprise.system.stream.out|_ThreadID=10;_ThreadName=main;|RMIClient.getRMIClient: server|#]
[#|2007-03-23T16:01:13.151+0000|INFO|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=10;_ThreadName=main;server;|WEB0114: SSO is disabled in virtual server [server]|#]
[#|2007-03-23T16:01:13.162+0000|INFO|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=10;_ThreadName=main;__asadmin;|WEB0114: SSO is disabled in virtual server [__asadmin]|#]
[#|2007-03-23T16:01:14.747+0000|INFO|sun-appserver9.1|javax.enterprise.system.tools.admin|_ThreadID=10;_ThreadName=main;|ADM1079: Initialization of AMX MBeans successful|#]
[#|2007-03-23T16:01:15.388+0000|INFO|sun-appserver9.1|javax.enterprise.system.tools.admin|_ThreadID=11;_ThreadName=Thread-18;service:jmx:rmi:///jndi/rmi://localhost:8686/jmxrmi;|ADM1504: Here is the JMXServiceURL for the Standard JMXConnectorServer: [service:jmx:rmi:///jndi/rmi://localhost:8686/jmxrmi]. This is where the remote administrative clients should connect using the standard JMX connectors|#]
[#|2007-03-23T16:01:15.388+0000|INFO|sun-appserver9.1|javax.enterprise.system.tools.admin|_ThreadID=11;_ThreadName=Thread-18;true;|ADM1506: Status of Standard JMX Connector: Active = [true]|#]
[#|2007-03-23T16:01:18.245+0000|INFO|sun-appserver9.1|com.sun.jbi.framework|_ThreadID=10;_ThreadName=main;|JBIFW0010: JBI framework ready to accept requests.|#]
[#|2007-03-23T16:01:18.315+0000|INFO|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=10;_ThreadName=main;|WEB0302: Starting Sun-Java-System/Application-Server.|#]
[#|2007-03-23T16:01:19.950+0000|WARNING|sun-appserver9.1|javax.enterprise.system.stream.err|_ThreadID=10;_ThreadName=main;_RequestID=82cb7c67-47a5-44d9-bd6c-4e802a37f48e;|Getting targets|#]
[#|2007-03-23T16:01:19.961+0000|WARNING|sun-appserver9.1|javax.enterprise.system.stream.err|_ThreadID=10;_ThreadName=main;_RequestID=82cb7c67-47a5-44d9-bd6c-4e802a37f48e;|
java.lang.Exception: Stack trace
at java.lang.Thread.dumpStack(Thread.java:1158)
at jsr88.ContainerTest.contextInitialized(ContainerTest.java:37)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4490)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:5142)
at com.sun.enterprise.web.WebModule.start(WebModule.java:308)
at com.sun.enterprise.web.LifecycleStarter.doRun(LifecycleStarter.java:45)
at com.sun.appserv.management.util.misc.RunnableBase.runSync(RunnableBase.java:283)
at com.sun.appserv.management.util.misc.RunnableBase._submit(RunnableBase.java:155)
at com.sun.appserv.management.util.misc.RunnableBase.submit(RunnableBase.java:171)
at com.sun.enterprise.web.VirtualServer.startChildren(VirtualServer.java:1566)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1218)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:938)
at com.sun.enterprise.web.LifecycleStarter.doRun(LifecycleStarter.java:45)
at com.sun.appserv.management.util.misc.RunnableBase.runSync(RunnableBase.java:283)
at com.sun.appserv.management.util.misc.RunnableBase._submit(RunnableBase.java:155)
at com.sun.appserv.management.util.misc.RunnableBase.submit(RunnableBase.java:171)
at com.sun.enterprise.web.EmbeddedWebContainer$WebEngine.startChildren(EmbeddedWebContainer.java:440)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1218)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:520)
at org.apache.catalina.startup.Embedded.start(Embedded.java:916)
at com.sun.enterprise.web.WebContainer.start(WebContainer.java:852)
at com.sun.enterprise.web.PEWebContainer.startInstance(PEWebContainer.java:750)
at com.sun.enterprise.web.PEWebContainerLifecycle.onStartup(PEWebContainerLifecycle.java:71)
at com.sun.enterprise.server.ApplicationServer.onStartup(ApplicationServer.java:332)
at com.sun.enterprise.server.ondemand.OnDemandServer.onStartup(OnDemandServer.java:112)
at com.sun.enterprise.server.PEMain.run(PEMain.java:381)
at com.sun.enterprise.server.PEMain.main(PEMain.java:308)
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:585)
at com.sun.enterprise.server.PELaunch.main(PELaunch.java:274)
|#]
[Message sent by forum member 'bytec0de' (bytec0de)]
http://forums.java.net/jive/thread.jspa?messageID=209641