Need help urgently about the error on ejb
Hi,
i am doing a simple ejb application. I use jboss-4.0.4.GA as my application server. I don't use any IDE. When i run my client code it shows the following error.
Exception in thread "main" javax.naming.CommunicationException: Can't find SerialContextProvider
at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:63)
at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:120)
at javax.namng.InitialContext.lookup(unknown source)
at dev.HelloClient.main(HelloClient.java:16)
My client code is:
package dev;
import javax.ejb.*;
import java.rmi.*;
import javax.rmi.*;
import javax.naming.*;
import java.util.Properties;
public class HelloClient
{
public static void main(String args[]) throws Exception
{
Properties props = System.getProperties();
Context ctx = new InitialContext(props);
Object obj = ctx.lookup("HelloHome");
HelloHome home = (HelloHome)javax.rmi.PortableRemoteObject.narrow(obj, HelloHome.class);
Hello hello = home.create();
System.out.println(hello.hellomethod());
hello.remove();
}
}

