[jboss-user] [EJB 3.0] - Stateful EJB 3.0 - ClassCastException
Naga Vijayapuram
do-not-reply at jboss.com
Thu Apr 29 12:54:47 EDT 2010
Naga Vijayapuram [http://community.jboss.org/people/nvwm] created the discussion
"Stateful EJB 3.0 - ClassCastException"
To view the discussion, visit: http://community.jboss.org/message/540205#540205
--------------------------------------------------------------
Hello,
I am trying out a Stateful EJB 3.0 and am getting this when I try to access it from a remote client -
$ ./Client.sh
Exception in thread "main" java.lang.ClassCastException: javax.naming.Reference cannot be cast to org.jboss.tutorial.stateful.bean.ShoppingCart
at org.jboss.tutorial.stateful.client.Client.main(Client.java:21)
The same client code works fine from within a jsp page.
What could be happenning? Here's the client code - it fails with above exception during "lookup" from the remote client -
> InitialContext ctx = new InitialContext();
> ShoppingCart cart = (ShoppingCart) ctx.lookup("ShoppingCartBean/remote");
NOTE: Reproduced in both JBoss 5.1.0.GA and in JBoss 6 M2.
Naga Vijayapuram
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/540205#540205]
Start a new discussion in EJB 3.0 at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2029]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100429/ddad672f/attachment.html
More information about the jboss-user
mailing list