RE: [JBoss-user] [urgent] CMR relationship between JAR inside an EAR

2003-07-21 Thread Danny . Yates
Your bean only has a local interface. AFAIK, it will not be visible
to other bean JARs - even within the same EAR.

-- 
Danny Yates
 


-Original Message-
From: Ionel Gardais [mailto:[EMAIL PROTECTED] 
Sent: 21 July 2003 13:09
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: [JBoss-user] [urgent] CMR relationship between JAR inside an EAR


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 :

  /**
   * @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);


But when I deploy this under JBoss, I get a DeploymentException :

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.(
JDBCRelationshipRoleMetaData.java:103)
at 
org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCRelationMetaData.(JDBCRela
tionMetaData.java:127)
at 
org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCApplicationMetaData.(JDBCA
pplicationMetaData.java:154)
at 
org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCXmlFileLoader.load(JDBCXmlFileLo
ader.java:52)
at 
org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.loadJDBCEntityMetaData(JDBCS
toreManager.java:737)
...



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.

 * @ejb.ejb-external-ref
 *  view-type="local"
 *  type="Entity"
 *  home="techadvantage.beans.PersonLocalHome"
 *  business="techadvantage.beans.PersonLocal"
 *  --link="PersonEJB"
 *  ref-name="ejb/qualite/PersonneLocal"
 

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


_ 
Notice to recipient: 
The information in this internet e-mail and any attachments is confidential
and may be privileged. It is intended solely for the addressee. If you are
not the intended addressee please notify the sender immediately by
telephone. If you are not the intended recipient, any disclosure, copying,
distribution or any action taken or omitted to be taken in reliance on it,
is prohibited and may be unlawful. 

When addressed to external clients any opinions or advice contained in this
internet e-mail are subject to the terms and conditions expressed in any
applicable governing terms of business or client engagement letter issued by
the pertinent Bank of America group entity. 

If this email originates from the U.K. please note that Bank of America,
N.A., London Branch, Banc of America Securities Limited and Banc of America
Futures Incorporated are regulated by the Financial Services Authority.
_ 




--

Re: [JBoss-user] [urgent] CMR relationship between JAR inside an EAR

2003-07-21 Thread Alexey Loubyansky
The problem is that the classes from the packages are not visible to
each other due to classloader architecture.
You should package and deploy the app making sure the JAR with DDs
defining relationships sees all the needed classes.

alex

Monday, July 21, 2003, 3:09:29 PM, Ionel Gardais wrote:

IG> Hi,

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

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

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

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

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

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


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

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

IG> Why does it fail ? Is there a solution ?

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


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

IG> thanks for helping,
IG> 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