[jboss-user] [EJB/JBoss] - Re: EJB lookup after deploying to Jboss

rmcdonough do-not-reply at jboss.com
Sun Jan 21 11:21:48 EST 2007


It would be a bit more helpful if provided the stack trace of the error you are getting. But part of the problem is that you're assuming you'll be getting back you bean class, which you will not. With your HelloWorldBean, you should have a corresponding HelloWorld interface marked with an @Remotae annotation. Then your code should read:


  | InitialContext ic = new InitialContext();
  | HelloWorld hw = (HelloWorld) ic.lookup("HelloWorldBean/remote");
  | 

That would be the proper way to write your code. Otherwise, you'll get a ClassCastException.

Ryan-

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

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



More information about the jboss-user mailing list