I'm having a weird CMR problem with 3.2.0.
I have a bean that a has 2 CMR fields that both target the same bean with
different pk's.
One of the CMR fields is a 1:1 relation and the other is the single side of a
1:M relation.
The CMR fields can be read fine, but cause problems for ejbCreate.
This is the error I get:
2003-06-25 18:35:16,563 ERROR [org.jboss.ejb.plugins.LogInterceptor]
TransactionRolledbackLocalException, causedBy:
javax.ejb.EJBException: Data contains multiple values, but this cmr field is
single valued
...
2003-06-25 18:35:16,597 ERROR [org.jboss.ejb.plugins.LogInterceptor]
TransactionRolledbackLocalException, causedBy:
javax.ejb.EJBException: null; CausedByException is:
A CMR collection may only be used within the transction in which it
...
If I get rid of the 1:1 CMR field (valueClass) the problem goes away. Here's
some of the code:
...
/**
* @ejb.relation
* name="class-has-properties"
* role-name="property-role"
* cascade-delete="true"
* @jboss.relation
* fk-column="class_id"
* related-pk-field="id"
* @ejb:interface-method
*/
public abstract ContentClassLocal getContentClass();
public abstract void setContentClass(ContentClassLocal contentClass);
/**
* @ejb.persistent-field
* @ejb:interface-method
* @jboss.column-name name="class_id"
*/
public abstract String getContentClassId();
/**
* @ejb:interface-method
*/
public abstract void setContentClassId(String classId);
...
/**
* @ejb.relation
* name="object-has-valueClass"
* role-name="object-role"
* target-ejb="ContentClass"
* target-role-name="class-role"
* cascade-delete="true"
* @jboss.relation
* fk-column="value_class_id"
* related-pk-field="id"
* @ejb:interface-method
*/
public abstract ContentClassLocal getValueClass();
public abstract void setValueClass(ContentClassLocal valueClass);
/**
* @ejb.persistence
* @ejb:interface-method
* @jboss.column-name name="value_class_id"
*/
public abstract String getValueClassId();
/**
* @ejb:interface-method
*/
public abstract void setValueClassId(String dataClassId);
Any ideas? If you need more code or more of the stack trace let me know.
Thanks,
Jason
-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user