embedded@glassfish.java.net

deploying simple war app on gfv3 embedded

From: Pavel Bucek <Pavel.Bucek_at_Sun.COM>
Date: Thu, 14 Jan 2010 14:25:42 +0100

Hello,

I'm trying to deploy simple jersey application on embedded gfv3, but it
fails with following:

Jan 14, 2010 2:14:26 PM com.sun.enterprise.v3.server.AppServerStartup run
INFO: GlassFish v3 (74.2) startup time : Embedded(790ms) startup
services(539ms) total(1329ms)
Jan 14, 2010 2:14:27 PM
com.sun.enterprise.transaction.JavaEETransactionManagerSimplified
initDelegates
INFO: Using
com.sun.enterprise.transaction.jts.JavaEETransactionManagerJTSDelegate
as the delegate
Jan 14, 2010 2:14:27 PM
org.glassfish.admin.mbeanserver.JMXStartupService$JMXConnectorsStarterThread
run
INFO: JMXStartupService: JMXConnector system is disabled, skipping.
Jan 14, 2010 2:14:27 PM AppServerStartup run
INFO: [Thread[GlassFish Kernel Main Thread,5,main]] started
Jan 14, 2010 2:14:38 PM org.glassfish.api.ActionReport failure
SEVERE: Module type not recognized
Jan 14, 2010 2:14:38 PM org.glassfish.api.ActionReport failure
SEVERE: There is no installed container capable of handling this
application com.sun.enterprise.deploy.shared.FileArchive_at_1fe2c9bf
classLoader = WebappClassLoader (delegate=true;
repositories=WEB-INF/classes/)
SharedSecrets.getJavaNetAccess()=java.net.URLClassLoader$7_at_2bbd9de3

looks like I'm missing some dependency, but don't know which one..

code:

        Server.Builder builder = new Server.Builder("GFv3Server");
        Server server = builder.build();

        server.start();
        DeployCommandParameters params = new DeployCommandParameters();
        params.contextroot = "helloworld-webapp";

        server.getDeployer().deploy(new
File("/Users/pavel/jersey/jersey/jersey2/samples/helloworld-webapp/target/helloworld-webapp.war"),
params);


dependencies in pom.xml:

    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>3.8.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.glassfish.extras</groupId>
            <artifactId>glassfish-embedded-all</artifactId>
            <version>3.0</version>
        </dependency>
    </dependencies>
    <repositories>
        <repository>
            <id>glassfish-repository</id>
            <name>Java.net Repository for Glassfish</name>
            <url>http://download.java.net/maven/glassfish</url>
        </repository>
    </repositories>

Thanks,

Pavel