I have an EJB that I have bound to a jndi name "foo/bar".
I can lookup this EJB with the name "foo/bar" from a standalone client without issues.
However, when I try to look it up from a webapp deployed in the same GF instance, I get the exception below.
Do I need to lookup the EJB differently from a webapp?
Thanks,
Keyur
[code]
Caused by: javax.naming.NamingException: ejb ref resolution error for remote business inte
rfacefoo.Bar [Root exception is java.lang.RuntimeException: Cou
ld not invoke defineClass!]
at com.sun.ejb.EJBUtils.lookupRemote30BusinessObject(EJBUtils.java:425)
at com.sun.ejb.containers.RemoteBusinessObjectFactory.getObjectInstance(RemoteBusi
nessObjectFactory.java:74)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:403)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
...
Caused by: java.lang.RuntimeException: Could not invoke defineClass!
at com.sun.corba.ee.impl.codegen.CodeGeneratorUtil.makeClass(CodeGeneratorUtil.jav
a:98)
at com.sun.corba.ee.spi.codegen.Wrapper._generate(Wrapper.java:1051)
at com.sun.ejb.EJBUtils.generateAndLoad(EJBUtils.java:589)
at com.sun.ejb.EJBUtils.loadGeneratedGenericEJBHomeClass(EJBUtils.java:520)
at com.sun.ejb.EJBUtils.lookupRemote30BusinessObject(EJBUtils.java:351)
... 70 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.ja
va:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.corba.ee.impl.codegen.CodeGeneratorUtil.makeClass(CodeGeneratorUtil.jav
a:95)
... 74 more
Caused by: java.lang.LinkageError: loader (instance of com/sun/appserv/server/util/ASURLC
lassLoader): attempted duplicate class definition for name: "com/sun/ejb/codegen/GenericE
JBHome_Generated"
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
... 78 more
[/code]
[Message sent by forum member 'keyurva' (keyurva)]
http://forums.java.net/jive/thread.jspa?messageID=278674