users@glassfish.java.net

Help using embedded Glassfish - cannot deploy a simple war..

From: Rajeev Angal <Rajeev.Angal_at_Sun.COM>
Date: Sat, 23 Aug 2008 20:07:42 -0700

Hi,

I am trying to deploy a simple t.war file (cntains just a index.html
and a empty WEB-INF) in embedded GF.
Am getting the following error :


SEVERE: There is no installed container capable of handling this
application
Fata Error :org.glassfish.embed.EmbeddedException: There is no
installed container capable of handling this application
org.glassfish.embed.EmbeddedException: There is no installed container
capable of handling this application
        at
org
.glassfish.embed.impl.SilentActionReport.check(SilentActionReport.java:
68)
        at org.glassfish.embed.AppServer.deploy(AppServer.java:538)
        at org.glassfish.embed.AppServer.deploy(AppServer.java:502)
        at org.glassfish.embed.AppServer.deploy(AppServer.java:477)
        at gf.main(gf.java:12)

a t.war directory is created in the current dir...with the exploded
war.


Execution :

java -Xdebug -
Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=1323 -
cp .:glassfish-embedded-nucleus-10.0-SNAPSHOT.jar:glassfish-embedded-
web-10.0-SNAPSHOT.jar:. gf


SOurce :
import com.sun.enterprise.universal.io.SmartFile;

public class gf
{
     public static void main(String[] args) {
       try {
         AppServer glassfish = new AppServer(28080);
         //glassfish.minimallyConfigure(8080);
         File war = SmartFile.sanitize(new File("/tmp/t.war"));
         App app = glassfish.deploy(war);
         System.out.println("Ready! enter any str to stop....");
         app.undeploy();
         BufferedReader br = new BufferedReader(new
InputStreamReader(System.in));
         br.readLine();
         System.out.println("Stopping..");
         glassfish.stop();
       } catch (Exception ex) {
           System.out.println("Fata Error :"+ex);
           ex.printStackTrace();
       }
    }
}

Below is the complete run..
thanks,
-rajeev

Listening for transport dt_socket at address: 1323
Aug 23, 2008 8:07:26 PM AppServerStartup run
INFO: [Thread[GlassFish Kernel Main Thread,5,main]] started
Aug 23, 2008 8:07:26 PM
com.sun.enterprise.v3.services.impl.GrizzlyProxy start
INFO: Listening on port 28080
Module= core Provider= threadpool AppName= null ProviderClazz=
interface org.glassfish.kernel.admin.monitor.ThreadPoolProbeProvider
[FL]AppName = null
[FL]Registered probe : core:threadpool::newThreadsAllocatedEvent
        Probe: core:threadpool::newThreadsAllocatedEvent
newThreadsAllocatedEvent(java.lang.String, int, boolean)
[FL]AppName = null
[FL]Registered probe : core:threadpool::maxNumberOfThreadsReachedEvent
        Probe: core:threadpool::maxNumberOfThreadsReachedEvent
maxNumberOfThreadsReachedEvent(java.lang.String, int)
[FL]AppName = null
[FL]Registered probe : core:threadpool::threadDispatchedFromPoolEvent
        Probe: core:threadpool::threadDispatchedFromPoolEvent
threadDispatchedFromPoolEvent(java.lang.String, java.lang.String)
[FL]AppName = null
[FL]Registered probe : core:threadpool::threadReturnedToPoolEvent
        Probe: core:threadpool::threadReturnedToPoolEvent
threadReturnedToPoolEvent(java.lang.String, java.lang.String)
** classType: Lorg/glassfish/kernel/admin/monitor/
ThreadPoolProbeProvider;
** classDesc: Lorg/glassfish/kernel/admin/monitor/
ThreadPoolProbeProvider;
Generating for:
org
.glassfish
.kernel
.admin.monitor.ThreadPoolProbeProvider_core_Flashlight_threadpool_App_
Created provider successfully....:
org
.glassfish
.kernel
.admin.monitor.ThreadPoolProbeProvider_core_Flashlight_threadpool_App_
Notify listeners that a new provider is registered
Aug 23, 2008 8:07:26 PM CommonClassLoaderManager Skipping creation of
CommonClassLoader as there are no libraries available
INFO: urls = []
Aug 23, 2008 8:07:26 PM org.jvnet.hk2.component.InjectionManager inject
INFO: Cannot inject private
com.sun.enterprise.config.serverbeans.ModuleMonitoringLevels
org.glassfish.web.admin.monitor.telemetry.WebMonitorStartup.mml in
componentorg
.glassfish.web.admin.monitor.telemetry.WebMonitorStartup_at_57f993
Aug 23, 2008 8:07:26 PM com.sun.enterprise.v3.server.AppServerStartup
run
INFO: Startup service failed to start : Unsatisfied dependency
exception : private
com.sun.enterprise.config.serverbeans.ModuleMonitoringLevels
org.glassfish.web.admin.monitor.telemetry.WebMonitorStartup.mml
Aug 23, 2008 8:07:26 PM com.sun.enterprise.v3.server.AppServerStartup
run
INFO: Glassfish v3 started in 974 ms
Aug 23, 2008 8:07:26 PM org.glassfish.api.ActionReport failure
SEVERE: There is no installed container capable of handling this
application
Fata Error :org.glassfish.embed.EmbeddedException: There is no
installed container capable of handling this application
org.glassfish.embed.EmbeddedException: There is no installed container
capable of handling this application
        at
org
.glassfish.embed.impl.SilentActionReport.check(SilentActionReport.java:
68)
        at org.glassfish.embed.AppServer.deploy(AppServer.java:538)
        at org.glassfish.embed.AppServer.deploy(AppServer.java:502)
        at org.glassfish.embed.AppServer.deploy(AppServer.java:477)
        at gf.main(gf.java:12)