java.lang.NoClassDefFoundError

Hi All,

I'm just starting on EJB, thus pls help me out.

In my client servlet, I try to call my EJB by:

InitialContext ic = new InitialContext();

Object objref = ic.lookup("MySublist");

SubscriberListHome home = (SubscriberListHome)PortableRemoteObject.narrow(objref, SubscriberListHome.class);

I'm quite sure "MySublist" is the correct JNDI name of my EJB 'coz I checked that it is in the sun-j2ee-ri.xml descriptor file in my deployed .jar, and that the objref is of the stub class by printing the class name. However, when I do the narrow() call, the server would still give me a NoClassDefFoundError On SubscriberListHome, which is in the deployed .jar.

Do you have any idea what went wrong?

Thanks a lot.

[766 byte] By [lookslya] at [2007-9-19]
# 1
Make sure that the client jar file is in your classpath, or in the folder from where you are issuing the command "runclient".
jquattroa at 2007-7-8 > top of java,Enterprise & Remote Computing,Enterprise Technologies...