2 Replies Latest reply on Dec 23, 2003 11:03 AM by rchristy63

    External JARs and CMP relationships

    rchristy63

      Am I allowed to do the following. I have two entity beans in defined two different jars. I'm trying to map a one-to-many relationship between these two entity beans. I seem to be having trouble during the deployment with the following exception. I've defined an external-ref in my ejb-jar.xml deployment descriptor, but that doesn't seem to solving my problems.

      Thanks in advance,

      Rich

      08:56:28,854 ERROR [EntityContainer] Starting failed
      org.jboss.deployment.DeploymentException: Entity: ejb/refdataservice/domain/Country not found for relation: domcile-country
      at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCRelationshipRoleMetaData.(JDBCRelationshipRoleMetaData.java:123)
      at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCRelationMetaData.(JDBCRelationMetaData.java:135)
      at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCApplicationMetaData.(JDBCApplicationMetaData.java:174)
      at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCXmlFileLoader.load(JDBCXmlFileLoader.java:52)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.loadJDBCEntityMetaData(JDBCStoreManager.java:733)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.initStoreManager(JDBCStoreManager.java:432)

        • 1. Re: External JARs and CMP relationships
          raja05

          I doubt if you can do that. This is from the Spec 10.3.2

          Container-managed relationships can exist only among entity beans within the same local relationship scope, as defined by the relationships element in the deployment descriptor. Container-managed relationships are defined in terms of the local interfaces of the related beans.


          Since you cannot have two beans in different jars within a relationship scope, i think you might be out of luck.



          • 2. Re: External JARs and CMP relationships
            rchristy63

            Raj,

            I suspected I might have been doing something wrong. Thanks for confirming that.

            Rich