[jboss-user] [EJB/JBoss] - error accessing an EJB via JNDI

loucs do-not-reply at jboss.com
Fri May 2 05:30:53 EDT 2008

i have a strange error accessing an EJB session from a jndi lookup : 

Infos :
JBoss 4.2.2.GA
JBossPortal 2.6.4.GA

my session bean is in an ear package containing portlets for portal.

i'm trying to do the jndi lookup from a jar called by jboss portal (not from my ear).

I can see in the jmx console that my EJB is bind to the global JNDI namespace and i get the right object from my lookup. 

My problem is that i got an exception when i try to cast the object i got from jndi to the local or remote interface of my ejb session, althought i verified that the object i got was really implementing my ejb interface (with getClass().getInterfaces() )

i think it might has something to do with the fact that my EJB interface is deployed in the ear and in a separate jar file in the portal's libdir (but it's the only way for me not to have a class not found exception, as jboss portal classloader can't access my ear classes.

if someone has even the tiniest clue on this matter, i'd take it with pleasure :)

see the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&t=134638 



View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4148289#4148289

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4148289

More information about the jboss-user mailing list