Hi,

I have a serious problem with CMR relationship inside 2 bean packages deployed inside the same EAR.

Using Xdoclet-1.3dev and JBoss3.2.1-Tomcat4.1.24.

Here are my questions :
- does CMR works between bean packages inside an EAR ?
- the two beans of my relationship are Person and Project. It's a unidirectionnal M:N relationship (Project manage the relationship and Person is not aware of it).
Beans are stored in separate packages. Both packages are loaded inside the application.xml.
I use a relation-table to manage this relationship.


In my Project bean, I declare this CMR field :
<code>
 /**
  * @ejb.relation
  *  name="PROJECT-TO-MANAGERS-RELATION"
  *  role-name="project-ismanagedby-persons"
  *  target-ejb="PersonEJB"
  *  target-role-name="persons-manage-project"
  *  target-multiple="yes"
  * @ejb.interface-method
  *  view-type="local"
  * @jboss.relation-mapping
  *  style="relation-table"
  * @jboss.relation-table
  *  table-name="P2M"
  *  create-table="true"
  *  remove-table="false"
  * @jboss.relation
  *  related-pk-field="id"
  *  fk-column="IdM"
  * @jboss.target-relation
  *  related-pk-field="id"
  *  fk-column="IdP"
  * [EMAIL PROTECTED]
  *  --aggregate="techadvantage.beans.PersonValue"
  *  --aggregate-name="Manager"
  *  --members="techadvantage.beans.PersonLocal"
  *  --members-name="Manager"
  *  --relation="external"
  *  --type="Collection"
  */
 public abstract java.util.Collection getManagers();

 /**
  * @ejb.interface-method
  *  view-type="local"
  */
 public abstract void setManagers(java.util.Collection personnes);
</code>

But when I deploy this under JBoss, I get a DeploymentException :
<exception>
Xdoclet parse it well.13:24:51,708 ERROR [EntityContainer] Starting failed
org.jboss.deployment.DeploymentException: Entity: PersonEJB not found for: [EMAIL PROTECTED]
at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCRelationshipRoleMetaData.<init>(JDBCRelationshipRoleMetaData.java:103)
at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCRelationMetaData.<init>(JDBCRelationMetaData.java:127)
at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCApplicationMetaData.<init>(JDBCApplicationMetaData.java:154)
at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCXmlFileLoader.load(JDBCXmlFileLoader.java:52)
at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.loadJDBCEntityMetaData(JDBCStoreManager.java:737)
...
</exception>



I look at the JNDI tree and PersonEJB have been deployed well.


I also tryed to add an @ejb.ejb-external-ref in the Project bean but it doesn't solve anything.
<code>
* @ejb.ejb-external-ref
* view-type="local"
* type="Entity"
* home="techadvantage.beans.PersonLocalHome"
* business="techadvantage.beans.PersonLocal"
* --link="PersonEJB"
* ref-name="ejb/qualite/PersonneLocal"
</code>


Why does it fail ? Is there a solution ?

- As you can see, the @ejb.value-object is commented out because else, I get "file not found in source tree ...". Is it possible to use external relationship within value-objects ?


I am in a hurry and I can't find out what is going on.


thanks for helping,
ionel



-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
same time. Free trial click here: http://www.vmware.com/wl/offer/345/0
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to