EJB2 : CMP and CMR - Weblogic

This is a discussion on EJB2 : CMP and CMR - Weblogic ; Hi everyone, I am getting this RemoteException when I try to all data to the tabe .I am using CMP and CMR (one-many) with two entity beans with local interface called by a stateless bean which in turn is called ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: EJB2 : CMP and CMR

  1. EJB2 : CMP and CMR


    Hi everyone,
    I am getting this RemoteException when I try to all data to the tabe .I
    am using CMP and CMR (one-many) with two entity beans with local interface called
    by
    a stateless bean which in turn is called by a webapp.
    The error message is :
    Remote Exception : EJB Exception: ; nested exception is: javax.ejb.EJBException:
    EJB Exception:;
    nested exception is: javax.ejb.EJBException: [EJB:010145]When a cmp-field and
    a cmr-field
    (relationship) are mapped to the same column, the setXXX method
    for the cmp-field may not be called. The cmp-field is read-only.

    This error appeared when I introduced CMR into the application.

    Your help will be appreciated.

    Thanks.

    P.P.

  2. Re: EJB2 : CMP and CMR


    Remove from the ejbCreate() method set(); for the Cmp-Field
    which is mapped to the same column as the Cmr Field.

    The cmp-field/cmr-field column gets set when the cmr relationship is defined.







    "pp" wrote:
    >
    >Hi everyone,
    > I am getting this RemoteException when I try to all data to the tabe
    >.I
    >am using CMP and CMR (one-many) with two entity beans with local interface
    >called
    >by
    >a stateless bean which in turn is called by a webapp.
    > The error message is :
    >Remote Exception : EJB Exception: ; nested exception is: javax.ejb.EJBException:
    >EJB Exception:;
    > nested exception is: javax.ejb.EJBException: [EJB:010145]When a cmp-field
    >and
    >a cmr-field
    >(relationship) are mapped to the same column, the setXXX method
    >for the cmp-field may not be called. The cmp-field is read-only.
    >
    > This error appeared when I introduced CMR into the application.
    >
    >Your help will be appreciated.
    >
    >Thanks.
    >
    >P.P.



  3. Re: EJB2 : CMP and CMR


    Thanks P.T.

    I have not checked your tips yet.
    I'll let you know If it works

    thanks again.
    pp.


    "Perianayagam.T" wrote:
    >
    >When a CMR relation is decalred then owe have to use that CMR only and
    >not the
    >CMP's setter.
    >
    >But if the same field is a key (ie if that CMR field is a part of a primary
    >key
    > ) then u have to use the CMP's Setter (ie in this case CMR will be read
    >only..
    >)
    >
    >
    >
    >"pp" wrote:
    >>
    >>Hi everyone,
    >> I am getting this RemoteException when I try to all data to the tabe
    >>.I
    >>am using CMP and CMR (one-many) with two entity beans with local interface
    >>called
    >>by
    >>a stateless bean which in turn is called by a webapp.
    >> The error message is :
    >>Remote Exception : EJB Exception: ; nested exception is: javax.ejb.EJBException:
    >>EJB Exception:;
    >> nested exception is: javax.ejb.EJBException: [EJB:010145]When a cmp-field
    >>and
    >>a cmr-field
    >>(relationship) are mapped to the same column, the setXXX method
    >>for the cmp-field may not be called. The cmp-field is read-only.
    >>
    >> This error appeared when I introduced CMR into the application.
    >>
    >>Your help will be appreciated.
    >>
    >>Thanks.
    >>
    >>P.P.

    >



+ Reply to Thread