4 Replies Latest reply on Apr 22, 2002 4:12 PM by khanh_duy_nguyen

    CMP2.0 deployment problem

    eustace

      hope someone can enlighten me on this one. I'm trying example code from the O Reilly EJB book, and when I deploy my jar file, it deploys okay, but I get the following message, which seems to pertain to CMP 1.0:
      [Verifier]
      Bean : CabinEJB
      Section: 9.2.2
      Warning: The entity bean class must not be defined as abstract.

      [Verifier]
      Bean : CabinEJB
      Section: 9.2.2
      Warning: The entity bean class must define a public constructor that takes no arguments.

      [Verifier]
      Bean : CabinEJB
      Section: 9.4.7.1
      Warning: The primkey-field element must name a public field in the bean implementation class.

      My ejb-jar.xml file has the EJB 2.0 dtd at the start, and as far as I understand it from this forum (http://main.jboss.org/thread.jsp?forum=46&thread=8178), the CMP 2.0 engine should be activated by this.

      Then when I run a test app I get the following:


      java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
      javax.transaction.TransactionRolledbackException: Could not instantiate bean; nested exception is:
      java.lang.InstantiationException: com.titan.cabin.CabinBean; nested exception is:
      java.rmi.ServerException: Could not instantiate bean; nested exception is:
      java.lang.InstantiationException: com.titan.cabin.CabinBean
      javax.transaction.TransactionRolledbackException: Could not instantiate bean; nested exception is:
      java.lang.InstantiationException: com.titan.cabin.CabinBean; nested exception is:
      java.rmi.ServerException: Could not instantiate bean; nested exception is:
      java.lang.InstantiationException: com.titan.cabin.CabinBean
      java.rmi.ServerException: Could not instantiate bean; nested exception is:
      java.lang.InstantiationException: com.titan.cabin.CabinBean
      java.lang.InstantiationException: com.titan.cabin.CabinBean
      at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:245)
      at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:220)
      at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:122)
      at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker_Stub.invokeHome(Unknown Source)
      at org.jboss.ejb.plugins.jrmp.interfaces.HomeProxy.invokeHome(HomeProxy.java:258)
      at org.jboss.ejb.plugins.jrmp.interfaces.HomeProxy.invoke(HomeProxy.java:182)
      at $Proxy0.create(Unknown Source)
      at com.titan.clients.Client_41.main(Client_41.java:20)

      any insights greatly appreciated
      -e