1 Reply Latest reply on Jun 24, 2002 8:55 PM by Dain Sundstrom

    Error on creating CMP Bean

    Carlos Augusto Grahl Newbie

      Hi, all

      I´m using Jboss 3.0.0 (final) + MySQL.

      I made a CMB Bean, deployed it, and no errors occured.

      When my test program create an instance of that bean, I´ve got this error:

      java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
      java.rmi.ServerException: Internal error setting instance field codigo
      Embedded Exception
      ClientePK; nested exception is:
      javax.ejb.EJBException: Internal error setting instance field codigo; nested exception is: java.lang.InstantiationException: ClientePK
      java.rmi.ServerException: Internal error setting instance field codigo
      Embedded Exception
      ClientePK; nested exception is:
      javax.ejb.EJBException: Internal error setting instance field codigo; nested exception is: java.lang.InstantiationException: ClientePK
      javax.ejb.EJBException: Internal error setting instance field codigo; nested exception is: java.lang.InstantiationException: ClientePK
      java.lang.InstantiationException: ClientePK
      <<no stack trace available>>
      javax.ejb.EJBException: Internal error setting instance field codigo; nested exception is: java.lang.InstantiationException: ClientePK
      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.invocation.jrmp.server.JRMPInvoker_Stub.invoke(Unknown Source)
      at org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JRMPInvokerProxy.java:128)
      at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:108)
      at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:73)
      at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:76)
      at org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:185)
      at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:76)
      at $Proxy0.create(Unknown Source)
      at ClienteClient.main(ClienteClient.java:29)

      The field 'codigo' is the Primary Key.

      Does anybody have any idea?

      TIA

      Carlos Augusto Grahl

        • 1. Re: Error on creating CMP Bean
          Dain Sundstrom Master

          The server is telling you that it got an exception while creating a ClientePK. Check the server log for more information. Also verify that the ClientePK is coded according to the EJB primary key rules. If you don't know these rules, I suggest that you don't use a custom PK. Most users don't use them, and they are very hard to code correctly, even experts have trouble (XDoclet has a bug for a long while in its custom pk generation code).