-
15. Re: JNDI Issue - Deploying EJB3 using Eclipse to JBoss 5
peterj Apr 6, 2009 3:58 PM (in response to yetti)You are still looking up the wrong name:
Object ref = jndiContext.lookup("FTPBean/remote"); -
16. Re: JNDI Issue - Deploying EJB3 using Eclipse to JBoss 5
peterj Apr 6, 2009 4:00 PM (in response to yetti)Also, you never said that you were providing the JNDI initial context information within your code. If you do that you do not need a jndi.properties file - the file is ignored.
-
17. Re: JNDI Issue - Deploying EJB3 using Eclipse to JBoss 5
yetti Apr 6, 2009 4:06 PM (in response to yetti)Peter,
Thanks man for the follow up, you're awesome. Seriously, bit time. I changed the code to:public HelloClientPOJO(){ try{ Context jndiContext = getInitialContext(); Object ref = jndiContext.lookup("FTPBean/remote"); _ftpbean = (FTPBean)ref; }catch (javax.naming.NamingException ne){ //nothing } }
Still no joy, same error in the console:
Exception in thread "main" java.lang.ClassCastException: $Proxy2
at HelloClientPOJO.(HelloClientPOJO.java:17)
at HelloClientPOJO.main(HelloClientPOJO.java:29) -
18. Re: JNDI Issue - Deploying EJB3 using Eclipse to JBoss 5
alrubinger Apr 6, 2009 4:22 PM (in response to yetti)That's a different error :)
EJB Proxies are castable to their business interface types, not to the bean implementation class. So instead:(com.acmeco.serverapp.ftp.ejb3.FTPBeanRemote)ref;
S,
ALR -
19. Re: JNDI Issue - Deploying EJB3 using Eclipse to JBoss 5
yetti Apr 6, 2009 4:36 PM (in response to yetti)ALRIGHT!!!!! I'M IN BUSINESS!!!! I will do a tutorial here that if the mods deign appropriate will be super helpful and hopefully prevent repeats of my troubles. Thank you very much ALR and Peter!
-
20. Re: JNDI Issue - Deploying EJB3 using Eclipse to JBoss 5
alrubinger Apr 6, 2009 4:48 PM (in response to yetti)Also, have a look at http://www.jboss.org/jbossejb3/docs/. :)
S,
ALR