0 Replies Latest reply on Aug 14, 2003 5:07 AM by Ulf Tidstrand

    Problem with setting value objects from ejbPostCreate

    Ulf Tidstrand Newbie

      I have a problem creating new entities (CMP) using value objects. I use XDoclet-1.1.2 to create home interfaces, value objects etc.

      Upon creation, a value object is passed to ejbCreate. There I set the primary keys. Then, in ejbPostCreate I set the rest of the fields with a simple setMyEJBVO(valueObject).

      I get the following error message from JBoss when trying to set the value object in ejbPostCreate (or in fact from anywhere else):
      Method is not a known CMP field accessor, CMR field accessor, or ejbSelect method: methodName=setMyEJBVO

      The thing is that I can get it to work if I remove the ejb-callbacks (ejbActivate, ejbPassivate etc) from the bean and use the task in my build.xml file instead. But I don't think that should be necessary (from what I have understood, generates old style CMP classes which I don't want to use).

      Has anyone else stumbled over this problem? Any solutions? Is this a XDoclet related problem or a JBoss related problem (or maybe both)?

      I'm using JBoss 3.2.2RC2