users@glassfish.java.net

Re: Problem running standalone Glassfish client as Eclipse plugin

From: <glassfish_at_javadesktop.org>
Date: Thu, 20 May 2010 10:26:47 PDT

Dear Stephan

we are also developing an Eclipse RCP client on 3.5.2 and would like to move from GFv2.1.1 to GFv3. We're hitting slightly different problems: the lookup for the first session bean succeeds, but the second fails with the following exception:

+++++++++++++++++++++++++++++++++++

javax.naming.NamingException: Lookup failed for 'com.ansis.timetracker.server.session.remote.DashboardFacadeBeanRemote' in SerialContext targetHost=localhost,targetPort=30037,orb'sInitialHost=localhost,orb'sInitialPort=3700 [Root exception is javax.naming.NamingException: ejb ref resolution error for remote business interfacecom.ansis.timetracker.server.session.remote.DashboardFacadeBeanRemote [Root exception is java.lang.RuntimeException: Could not invoke defineClass!]]
        at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:442)
        at javax.naming.InitialContext.lookup(InitialContext.java:392)
        at com.ansis.timetracker.client.ClientActivator.getDashboardFacadeBean(ClientActivator.java:940)
        ... 3 more
Caused by: javax.naming.NamingException: ejb ref resolution error for remote business interfacecom.ansis.timetracker.server.session.remote.DashboardFacadeBeanRemote [Root exception is java.lang.RuntimeException: Could not invoke defineClass!]
        at com.sun.ejb.EJBUtils.lookupRemote30BusinessObject(EJBUtils.java:430)
        at com.sun.ejb.containers.RemoteBusinessObjectFactory.getObjectInstance(RemoteBusinessObjectFactory.java:70)
        at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
        at com.sun.enterprise.naming.impl.SerialContext.getObjectInstance(SerialContext.java:472)
        at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:437)
        ... 5 more
Caused by: java.lang.RuntimeException: Could not invoke defineClass!
        at com.sun.corba.ee.impl.orbutil.codegen.CodeGeneratorUtil.makeClass(CodeGeneratorUtil.java:98)
        at com.sun.corba.ee.spi.orbutil.codegen.Wrapper._generate(Wrapper.java:1102)
        at com.sun.corba.ee.spi.orbutil.codegen.Wrapper._generate(Wrapper.java:1086)
        at com.sun.ejb.EJBUtils.generateAndLoad(EJBUtils.java:586)
        at com.sun.ejb.EJBUtils.loadGeneratedGenericEJBHomeClass(EJBUtils.java:538)
        at com.sun.ejb.EJBUtils.lookupRemote30BusinessObject(EJBUtils.java:399)
        ... 9 more
Caused by: java.lang.reflect.InvocationTargetException
        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:597)
        at com.sun.corba.ee.impl.orbutil.codegen.CodeGeneratorUtil.makeClass(CodeGeneratorUtil.java:95)
        ... 14 more
Caused by: java.lang.LinkageError: loader (instance of org/eclipse/core/runtime/internal/adaptor/ContextFinder): attempted duplicate class definition for name: "com/sun/ejb/codegen/GenericEJBHome_Generated"
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:698)
        ... 19 more


+++++++++++++++++++++++++++

It seems you solved the problem. Could you perhaps post the MANIFEST.MF files of your various plugins? I attach mine, which currently includes all Jars from the modules dir.

Also, did you manage to reduce the number of included Jar files? I think it is very inconvenient to include all Jars from the modules dir (a full 55MB), when in GF2.1.1 we only needed to include a handful of jars.

Thanks
[Message sent by forum member 'ansis']

http://forums.java.net/jive/thread.jspa?messageID=470743