Hi all,
I am trying to run the first example in the headfirst
EJB series.Good news is i have deployed the bean successfully but the bad news is i am being blocked from seeing the famous advice from advice guy.
i have got the AdviceAppClient.ear from the container.... and have compiled this file
===================================================================
/** AdviceClient.java */
import javax.naming.*;
import java.rmi.*;
import javax.rmi.*;
import headfirst.*;
import javax.ejb.*;
public class AdviceClient {
public static void main(
String[] args) {
new AdviceClient().go();
}
public void go() {
try {
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.getAdvice());
} catch (Exception ex) {
ex.printStackTrace();
}
}
}
======================================================================
Note: i have chaged the way book has compiled the AdviceClient.java.
F:\projects\advice>javac -classpath "AdviceAppClient.jar;F:\j2sdkee1.3\lib\j2ee.jar" AdviceClient.java
>> this gives me back the class file.
but..
F:\projects\advice>
java -classpath "AdviceAppClient.jar" AdviceClient
throws NoClassDefFound exception in main method.
Note: My server is up and running perfectly!!
At this point i am completly helpless and desparately looking for help.
Bye
Jay