Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Where are my Stubs? ClassCastException on EJB lookup in Sun Appserver 8.1

843833Mar 3 2005 — edited Jun 7 2005
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) {}
}
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 5 2005
Added on Mar 3 2005
7 comments
233 views