Hello Everyone
I am evaluating Sun's current Java System Application Server 8.1, and get a ClassCastException when looking up an EJB from a stand-alone client. I know this exception very well from all preceeding versions of Sun's application servers, including the SunONE 6 and the older reference implementations. The problem always was, that I forgot to put the generated client jar file into the client's classpath after deployment.
Now that I got this exception in Appserver 8.1 again, I also generated a client jar and put it at the very beginning of my classpath. Unfortunately the exception remains the same. So I took a look into the client jar file and realized that there are no stubs inside! Just the class files I deployed and the deployment descriptors. Is there something different in this app server (which is not in the J2EE tutorial)?
Here is my absolutely primitive example which works fine in J2EE Reference Implementation 1.3.1 and SunONE 6:
Home:
public interface HelloHome extends EJBHome {
public Hello create() throws RemoteException, CreateException;
}
Remote:
public interface Hello extends EJBObject {
public String hello() throws RemoteException;
}
EJB-Implementation:
public class HelloImpl implements SessionBean {
public String hello() { return "hello"; }
public void ejbCreate() {}
public void ejbActivate() {}
public void ejbPassivate() {}
public void ejbRemove() {}
public void setSessionContext(SessionContext arg0) {}
}