3 Replies Latest reply on Mar 25, 2005 7:56 AM by Jan Radl

    Relation accross different ejb.jars once again

    glum Newbie

      Hi all,
      sorry for urging this question but I am rather helpless.

      The question is: Is it possible to create CMR 2.0 relationship between two entities packaged in separate ejb.jar archives within one ejb.ear archive?

      I allways get this error:

      10:53:14,624 ERROR [EntityContainer] Starting failed jboss.j2ee:jndiName=ejb/sklad/LocalSklad,service=EJB
      org.jboss.deployment.DeploymentException: Entity: Zbozi not found for relation: polozka_prijemky-zbozi
       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:139)
       at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCApplicationMetaData.<init>(JDBCApplicationMetaData.java:175)
       at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCXmlFileLoader.load(JDBCXmlFileLoader.java:52)
       at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.loadJDBCEntityMetaData(JDBCStoreManager.java:705)
       at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.initStoreManager(JDBCStoreManager.java:417)

      According to J2EE specs, creating CMR relationship is possible only for entities using local interfaces. And more, local interfaces are accessible only within single ejb.jar archves. This means that creating such a relationship should not be possible. But, since JBOSS does not enforce this limitation on using local interfaces, my conclusion is that it could be possible. I searched J2EE specs and Jboss admin&devel guide and did not find explicit statement that CMR related entities should be packaged in a single jar.

      So, can anyone confirm or deny this question ?