Hi folks,
New to
EJB here.I am trying to run the AdviceClient problem from HeadFirst EJB book and I am getting a ClassCastException with the following code. I was able to deploy the bean and I am trying to run the client
test from command line.
Context ic = new InitialContext();
Object o = ic.lookup("Advisor");
**** AdviceHome home = (AdviceHome) PortableRemoteObject.narrow(o,AdviceHome.class);
Advice advisor = home.create();
System.out.println(advisor.getMessage());
I am getting exception on the line PortableRemoteObject.narrow......
In other words how do I
1.Select the service provider of the corresponding service I want to access.
2.Specify any configuration that the initial context needs.
I am trying to run a client from command line in order to test a stateless session bean as given in HeadFirstEJB ( AdviceClient.java)
I am using j2sdkee1.3.1 from Sun.
Thanks in advance
Matt
[ May 07, 2005: Message edited by: Mat Matthew ]