Error Deploying beans with relationships to weblogic

Ben Litchfield <[email protected]>
Newsgroups gmane.comp.java.ejb.middlegen.user
Message-ID <[email protected]>
Has anybody been able to deploy to weblogic?  I am using local entity
beans and the local facade pattern.

The application deploys but when I try to create beans with relationships
I get the following error

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.

The generated code looks like this and bombs on the setVendorId call.

   public java.lang.Integer ejbCreate(slims.entity.TitleLightValue value)
throws javax.ejb.CreateException {
      // Use Middlegen's Sequence Block PK generator. Only works for
numeric fields
      try {
         slims.entity.SequenceSession sequenceGenerator =
         slims.entity.SequenceSessionUtil.getLocalHome().create();
         setTitleId(new
java.lang.Integer(Integer.toString(sequenceGenerator.getNextSequenceNumber(
"title.title_id" ))));
      } catch( javax.naming.NamingException e ) {
         throw new javax.ejb.CreateException(e.getMessage());
      }
      setVendorId(value.getVendorId());
      setName(value.getName());
      // EJB 2.0 spec says return null for CMP ejbCreate methods.
      return null;
   }

   /**
    * The container invokes this method immediately after it calls
ejbCreate.
    *
    * @param value the value object used to initialise the new instance
    */
   public void ejbPostCreate(slims.entity.TitleLightValue value) throws
javax.ejb.CreateException {
   }


Any help would be great.



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.