Hi Dominik,
you haven't happened to find a solution by any chance?
I'm having the same setup as you do, i.e. an RCP (3.5) with a stand-alone eclipse plugin that needs to invoke some EJB's on a glassfish v3 and annoyingly I get the same exception too.
Everything worked perfectly fine when I tried it with the EJBs running on my old glassfish v2 and using it's jar's in the plugin. Now that I migrated to v3 I can only connect to the glassfish from a non-Eclipse based application.
Anyways, I take it you didn't post the whole exception though because mine is considerably longer and in the end seams to be caused by a java.lang.VerifyError.
So for comparison, here is what I get:
java.lang.NoSuchMethodException: org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findResources(java.lang.String)
at java.lang.Class.getMethod(Class.java:1605)
at com.sun.enterprise.module.single.ManifestProxy.<init>(ManifestProxy.java:34)
at com.sun.enterprise.module.single.ProxyModuleDefinition.<init>(ProxyModuleDefinition.java:78)
at com.sun.enterprise.module.single.ProxyModuleDefinition.<init>(ProxyModuleDefinition.java:73)
at com.sun.enterprise.module.single.SingleModulesRegistry.<init>(SingleModulesRegistry.java:42)
at com.sun.enterprise.module.single.SingleModulesRegistry.<init>(SingleModulesRegistry.java:30)
at com.sun.enterprise.module.single.StaticModulesRegistry.<init>(StaticModulesRegistry.java:60)
at org.glassfish.internal.api.Globals.getStaticHabitat(Globals.java:67)
at com.sun.enterprise.naming.impl.SerialContext.<init>(SerialContext.java:183)
at com.sun.enterprise.naming.impl.SerialContext.<init>(SerialContext.java:253)
at com.sun.enterprise.naming.impl.SerialInitContextFactory.createInitialContext(SerialInitContextFactory.java:121)
at com.sun.enterprise.naming.impl.SerialInitContextFactory.getInitialContext(SerialInitContextFactory.java:116)
at com.sun.enterprise.naming.SerialInitContextFactory.getInitialContext(SerialInitContextFactory.java:65)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
at javax.naming.InitialContext.init(InitialContext.java:223)
at javax.naming.InitialContext.<init>(InitialContext.java:197)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
org.jvnet.hk2.component.UnsatisfiedDepedencyException: Unsatisfied dependency exception : private org.glassfish.enterprise.iiop.api.GlassFishORBHelper org.glassfish.enterprise.iiop.api.ORBNamingProxy.orbHelper
at org.jvnet.hk2.component.InjectionManager.inject(InjectionManager.java:102)
at com.sun.hk2.component.AbstractWombImpl.inject(AbstractWombImpl.java:170)
at com.sun.hk2.component.ConstructorWomb$1.run(ConstructorWomb.java:87)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.hk2.component.ConstructorWomb.initialize(ConstructorWomb.java:84)
at com.sun.hk2.component.AbstractWombImpl.get(AbstractWombImpl.java:77)
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 org.jvnet.hk2.component.Habitat$1.get(Habitat.java:276)
at java.util.AbstractList$Itr.next(AbstractList.java:345)
at com.sun.enterprise.naming.impl.NamedNamingObjectManager.checkAndLoadProxies(NamedNamingObjectManager.java:68)
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:397)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: org.jvnet.hk2.component.ComponentException: Failed to create class org.glassfish.enterprise.iiop.impl.GlassFishORBFactoryImpl
at com.sun.hk2.component.ConstructorWomb.create(ConstructorWomb.java:74)
at com.sun.hk2.component.AbstractWombImpl.get(AbstractWombImpl.java:71)
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 org.jvnet.hk2.component.Habitat.getByContract(Habitat.java:594)
at org.glassfish.enterprise.iiop.api.GlassFishORBHelper.postConstruct(GlassFishORBHelper.java:88)
at com.sun.hk2.component.AbstractWombImpl.inject(AbstractWombImpl.java:174)
at com.sun.hk2.component.ConstructorWomb$1.run(ConstructorWomb.java:87)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.hk2.component.ConstructorWomb.initialize(ConstructorWomb.java:84)
at com.sun.hk2.component.AbstractWombImpl.get(AbstractWombImpl.java:77)
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 org.jvnet.hk2.component.Habitat.getBy(Habitat.java:600)
at org.jvnet.hk2.component.Habitat.getByType(Habitat.java:581)
at com.sun.hk2.component.AbstractWombImpl$1.getValue(AbstractWombImpl.java:149)
at org.jvnet.hk2.component.InjectionManager.inject(InjectionManager.java:81)
... 16 more
Caused by: java.lang.VerifyError: (class: org/glassfish/enterprise/iiop/impl/GlassFishORBFactoryImpl, method: createORB signature: (Ljava/util/Properties;)Lorg/omg/CORBA/ORB;) Wrong return type in function
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
at java.lang.Class.getConstructor0(Class.java:2699)
at java.lang.Class.newInstance0(Class.java:326)
at java.lang.Class.newInstance(Class.java:308)
at com.sun.hk2.component.ConstructorWomb.create(ConstructorWomb.java:68)
... 34 more
I also played a little bit with the DefaultClassLoader class from Eclipse but even after changing the visibility of the 'findResources' method I got more or less the same result.
Any help or suggestions for a workaround would be greatly appreciated.
Stephan
[Message sent by forum member 'yetanotherone' (st.lerche_at_nexgo.de)]
http://forums.java.net/jive/thread.jspa?messageID=384328