0 Replies Latest reply on Nov 21, 2003 1:11 AM by darshkp

    Problem creating a new record for 1 to 1 relation CMP Bean

    darshkp Newbie

      I have a CMP Entity Bean(Remote Interface) say for eg Customer which has an 1 to 1 relation ship with another CMP Bean say Address(only Local Interface).

      Within the Customer CMP Bean, i have written a business method which creates a address CMP and then calls the abstract set method on the Customer CMP Bean to set the relation field.

      When i call this business method from the client i am getting the following exception

      java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
      java.rmi.ServerException: EJBException:; nested exception is:
      javax.ejb.EJBException: Load relation failed; CausedByException is:
      [PC16]Invalid column name 'CustomerCMPBean_homeAddress'.
      at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:292)
      at sun.rmi.transport.Transport$1.run(Transport.java:148)
      at java.security.AccessController.doPrivileged(Native Method)
      at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
      at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
      at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
      at java.lang.Thread.run(Thread.java:536)
      at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
      at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
      at sun.rmi.server.UnicastRef.invoke(Unic

      I guess It is considering the Relation ship field as a Database field and hence this exception is occuring.

      Can anybody help me in solving this issue.

      Thanks in advance.