| Author |
EJB 3.0 Problems
|
Mark Spangler
Greenhorn
Joined: Feb 21, 2006
Posts: 1
|
|
I'm trying to create this simple EJB 3.0 test and I keep getting a java.lang.ClassCastException when I do the InitialContext lookup. I'm using Java 1.5 with JBoss 4.0.4RC1. The error I get is: My Client Class: My Remote Class: My Bean Class:
|
 |
Mike Henry
Greenhorn
Joined: Dec 18, 2003
Posts: 6
|
posted

0
|
As Your client is remote cyou will need to narrow the result here Try instead It might be helpful.. Mike H
|
:-D People who smile, do it 'cause they know something, To Learn what... do as they do.
|
 |
Mike Henry
Greenhorn
Joined: Dec 18, 2003
Posts: 6
|
posted

0
|
oops Typing way too fast for my own (or your )good It should say ... Sorry.. Mike H
|
 |
Mark Spritzler
ranger
Sheriff
Joined: Feb 05, 2001
Posts: 17225
|
posted

0
|
Mike, Mark is using EJB 3.0 There is no narrowing in EJB 3.0. Mark
|
Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
|
 |
Mark Spritzler
ranger
Sheriff
Joined: Feb 05, 2001
Posts: 17225
|
posted

0
|
Just out of curiosity. Try removing the "(name="MyBean")" and let it bind to JNDI with the class name instead of naming it. Then look it up with (TestRemote)ctx.lookup("TestBean"); Mark
|
 |
 |
|
|
subject: EJB 3.0 Problems
|
|
|