users@glassfish.java.net

Embedded Glassfish troubles

From: akochnev <akochnev_at_gmail.com>
Date: Sun, 4 Jan 2009 09:19:16 -0800 (PST)

I have been trying to replace the usage of an older embedded Jetty with
embedded Glassfish. However, I'm running into some trouble doing so. I would
appreciate any pointers on the subject :

1. When I try to setup the API + some other module, I inevitably run into
maven not being able to find some dependencies, e.g. when I add the
following to the pom.xml (dependencies and repository):
             <dependency>
                        <groupId>org.glassfish.distributions</groupId>
                        <artifactId>web</artifactId>
                        <version>10.0-SNAPSHOT</version>
                        <scope>test</scope>
                </dependency>
                <dependency>
                        <groupId>org.glassfish.embedded</groupId>
                        <artifactId>glassfish-embedded-api</artifactId>
                        <version>3.0-Prelude-b28b</version>
                        <scope>test</scope>
                </dependency>
 
                <repository>
                        <id>embedded-glassfish</id>
                        <name>Embedded Glassfish Maven Repository</name>
                        <url>http://maven.dyndns.org/glassfish</url>
                </repository>

   When I run the build, it downloads a whole bunch of stuff, but ends up
with a whole bunch of unsatisified dependencies at the end. For some of
those dependencies, I surely can download and install the jar in my local
repo manually; however, when there are this many missing, something must be
wrong. E.g. here are the first 7 missing :

1. org.glassfish.distributions:web:jar:10.0-SNAPSHOT
2. org.glassfish.osgi-platforms:felix:distribution-fragment:10.0-SNAPSHOT
....

So, the question here is : how should my maven pom be configured in order to
properly pull down the right dependencies in order to run w/ the API +
modules (as described at
https://embedded-glassfish.dev.java.net/gf-embedded-api/)

Now, if I only use the glassfish-embedded-all maven component, the build
runs fine; however, when I try to start Glassfish, I get the following error
:

Running TestSuite
Jan 4, 2009 11:59:48 AM CommonClassLoaderManager Skipping creation of
CommonClassLoader as there are no libraries available
INFO: urls = []
no resource bundle found for version, using default GlassFish version
Jan 4, 2009 11:59:48 AM AppServerStartup run
INFO: [Thread[GlassFish Kernel Main Thread,5,main]] started
Exception in thread "GlassFish Kernel Main Thread"
java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter.<init>(I)V
        at
org.glassfish.flashlight.impl.core.ProviderImplGenerator.generateClassData(ProviderImplGenerator.java:82)
        at
org.glassfish.flashlight.impl.core.ProviderImplGenerator.defineClass(ProviderImplGenerator.java:30)
        at
org.glassfish.flashlight.impl.provider.FlashlightProbeProviderFactory.getProbeProvider(FlashlightProbeProviderFactory.java:120)
        at
com.sun.enterprise.v3.services.impl.GrizzlyService.createProbeProviders(GrizzlyService.java:235)
        at
com.sun.enterprise.v3.services.impl.GrizzlyService.postConstruct(GrizzlyService.java:187)
        at
com.sun.hk2.component.AbstractWombImpl.inject(AbstractWombImpl.java:150)
        at
com.sun.hk2.component.ConstructorWomb$1.run(ConstructorWomb.java:90)
        at java.security.AccessController.doPrivileged(Native Method)
        at
com.sun.hk2.component.ConstructorWomb.initialize(ConstructorWomb.java:87)
        at
com.sun.hk2.component.AbstractWombImpl.get(AbstractWombImpl.java:75)
        at
com.sun.hk2.component.SingletonInhabitant.get(SingletonInhabitant.java:58)
        at com.sun.hk2.component.LazyInhabitant.get(LazyInhabitant.java:107)
        at
com.sun.hk2.component.AbstractInhabitantImpl.get(AbstractInhabitantImpl.java:60)
        at
com.sun.enterprise.v3.server.ApplicationLoaderInjector.postConstruct(ApplicationLoaderInjector.java:52)
        at
com.sun.hk2.component.AbstractWombImpl.inject(AbstractWombImpl.java:150)
        at
com.sun.hk2.component.ConstructorWomb$1.run(ConstructorWomb.java:90)
        at java.security.AccessController.doPrivileged(Native Method)
        at
com.sun.hk2.component.ConstructorWomb.initialize(ConstructorWomb.java:87)
        at
com.sun.hk2.component.AbstractWombImpl.get(AbstractWombImpl.java:75)
        at
com.sun.hk2.component.SingletonInhabitant.get(SingletonInhabitant.java:58)
        at com.sun.hk2.component.LazyInhabitant.get(LazyInhabitant.java:107)
        at
com.sun.hk2.component.AbstractInhabitantImpl.get(AbstractInhabitantImpl.java:60)
        at
com.sun.enterprise.v3.server.AppServerStartup.run(AppServerStartup.java:203)
        at
com.sun.enterprise.v3.server.AppServerStartup$1.run(AppServerStartup.java:116)

So, it's pretty clear that there is a classloading issue : I am trying to
embed v3 in order to run some integration tests for Tapestry 5, which also
uses asm somewhere under the covers.

THe end result of the whole effort is that I am unable to get GF v3 to run.
Any tips on fixing that would be highly appreciated.
-- 
View this message in context: http://www.nabble.com/Embedded-Glassfish-troubles-tp21278671p21278671.html
Sent from the java.net - glassfish users mailing list archive at Nabble.com.