[jboss-user] [EJB 3.0] - Re: ClassCastException in Stateful Session-Bean

te-bachi do-not-reply at jboss.com
Wed Jan 17 04:51:49 EST 2007


  | public interface ShoppingCart {
  |    void buy(String product, int quantity);
  |    HashMap<String, Integer> getCartContents();
  | }
  | 
  | @Local
  | public interface ShoppingCartLocal extends ShoppingCart {
  | }
  | 
  | @Remote
  | public interface ShoppingCartRemote extends ShoppingCart {
  | }
  | 
  | @Stateful
  | public class ShoppingCartBean implements ShoppingCartLocal, ShoppingCartRemote {
  |     [...]
  | }
  | 

Same Exception:


  | Exception in thread "main" java.lang.ClassCastException: javax.naming.Reference
  | 	at org.jboss.tutorial.stateful.client.Client.main(Client.java:18)
  | 


My structure:

  | MyApplication.ear
  | +--META-INF
  | |  +--application.xml
  | +--MyEjb.jar
  | |  +--META-INF
  | |  |  +--persistence.xml
  | |  |  +--jbosscmp-jdbc.xml
  | |  +--org.jboss.tutorial.stateful.bean (Stateful SessionBean)
  | |  +--org.jboss.tutorial.stateful.client (Client)
  | |  +--org.jboss.tutorial.stateless.bean (Stateless SessionBean)
  | |  +--org.jboss.tutorial.stateless.client (Client)
  | +--MyWebApp.war
  |    +--WEB-INF
  |    |  +--web.xml
  |    +--index.jsp
  | 


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4002666#4002666

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4002666



More information about the jboss-user mailing list