4 Replies Latest reply on May 7, 2003 1:10 PM by govindadasa

    CMr help needed!

    govindadasa Newbie

      Hi,
      I have been trying hard to fix this.
      I have Av -AvOrg tables one-one unidirectional relation. Av has AvOrg but not AvOrg.

      I get this exception when I deploy my jar.

      00:09:51,750 ERROR [EntityContainer] Starting failed
      org.jboss.deployment.DeploymentException: Configuration found in jbosscmp-jdbc.x
      ml for relation Av-AvOrg but relation is not a jbosscmp-jdbc-managed relation in
      ejb-jar.xml
      at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCApplicationMetaData.(JDBCApplicationMetaData.java:398)
      at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCXmlFileLoader.load(JDBCXm
      lFileLoader.java:75)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.loadJDBCEntityMetaDat
      a(JDBCStoreManager.java:737)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.initStoreManager(JDBC
      StoreManager.java:430)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.start(JDBCStoreManage
      r.java:372)
      at org.jboss.ejb.plugins.CMPPersistenceManager.start(CMPPersistenceManag
      er.java:170)
      at org.jboss.ejb.EntityContainer.startService(EntityContainer.java:339)
      at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:1
      92)
      at sun.reflect.GeneratedMethodAccessor34.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
      nDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl
      ler.java:966)
      at $Proxy11.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:392)
      at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
      nDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
      at $Proxy34.start(Unknown Source)
      at org.jboss.ejb.EjbModule.startService(EjbModule.java:347)
      at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:1
      92)
      at sun.reflect.GeneratedMethodAccessor34.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
      nDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl
      ler.java:966)
      at $Proxy11.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:392)
      at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)

      ====================
      ejb-jar.xml


      <ejb-name>AvOrganization</ejb-name>
      <local-home>com.test.ejb.av.AvOrganizationLocalHome</local-home>
      com.test.ejb.av.AvOrganizationLocal
      <ejb-class>com.test.ejb.av.AvOrganizationBean</ejb-class>
      <persistence-type>Container</persistence-type>
      <prim-key-class>java.lang.Integer</prim-key-class>
      False
      <cmp-version>2.x</cmp-version>
      <abstract-schema-name>AvOrganization</abstract-schema-name>
      <cmp-field>
      <field-name>roid</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>name</field-name>
      </cmp-field>

      <primkey-field>roid</primkey-field>



      <ejb-name>Av</ejb-name>
      <local-home>com.test.ejb.av.AvRemoteHome</local-home>
      com.test.ejb.av.AvRemote
      <ejb-class>com.test.ejb.av.AvBean</ejb-class>
      <persistence-type>Container</persistence-type>
      <prim-key-class>java.lang.Integer</prim-key-class>
      False
      <cmp-version>2.x</cmp-version>
      <abstract-schema-name>AVTest</abstract-schema-name>
      <cmp-field>
      <field-name>roid</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>name</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>status</field-name>
      </cmp-field>
      <primkey-field>roid</primkey-field>


      <ejb-relation>
      <ejb-relation-name>Av-AvOrg</ejb-relation-name>

      <ejb-relationship-role>
      <ejb-relationship-role-name>Av-has-a-AvOrg</ejb-relationship-role-name>

      One

      <relationship-role-source>
      <ejb-name>Av</ejb-name>
      </relationship-role-source>

      <cmr-field>
      <cmr-field-name>avOrg</cmr-field-name>
      </cmr-field>
      </ejb-relationship-role>

      <ejb-relationship-role>
      <ejb-relationship-role-name>AvOrg-needs-Av</ejb-relationship-role-name>

      One

      <relationship-role-source>
      <ejb-name>AvOrganization</ejb-name>
      </relationship-role-source>
      </ejb-relationship-role>
      </ejb-relation>

      and jbosscmp.xml has


      <ejb-name>AvOrganization</ejb-name>
      <table-name>AvOrganization</table-name>

      <cmp-field>
      <field-name>roid</field-name>
      <column-name>Roid</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>name</field-name>
      <column-name>Name</column-name>
      </cmp-field>




      <ejb-name>Av</ejb-name>
      <table-name>AVTest</table-name>

      <cmp-field>
      <field-name>roid</field-name>
      <column-name>Roid</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>status</field-name>
      <column-name>Status</column-name>
      </cmp-field>

      <cmp-field>
      <field-name>name</field-name>
      <column-name>Name</column-name>
      </cmp-field>





      </enterprise-beans>



      <ejb-relation>
      <ejb-relation-name>Av-AvOrg</ejb-relation-name>
      <foreign-key-mapping/>
      <ejb-relationship-role>
      <ejb-relationship-role-name>Av-has-a-AvOrg</ejb-relationship-role-name>
      <fk-constraint>true</fk-constraint>
      <key-fields>
      <key-field>
      <field-name>avOrg</field-name>
      <column-name>org_id</column-name>
      </key-field>
      </key-fields>
      </ejb-relationship-role>

      <ejb-relationship-role>
      <ejb-relationship-role-name>AvOrg-needs-Av</ejb-relationship-role-name>
      <key-fields/>
      </ejb-relationship-role>
      </ejb-relation>