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!

Local EJB Problem:ClassCastException

843829Nov 29 2002 — edited Nov 29 2002
I'm writing ejb whith jbuilder7 for weblogic6.
I wrote a local session bean, and invoke it in a jsp.When I access the jsp, I get a ClassCastException exception.Here is the exception:
    java.lang.ClassCastException: myejb.CounterBean_cp0o42_LocalHomeImpl
myejb.CounterBean_cp0o42_LocalHomeImpl generated by EJBC, implemnts the local session bean LocalHome interface.

Here is my lookup code:
	Context ctx = new InitialContext();
	Object ref = ctx.lookup("CounterLocal");
	CounterLocalHome home = (CounterLocalHome)ref;
Why?
tell me the reason,pls.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 27 2002
Added on Nov 29 2002
2 comments
127 views