2 Replies Latest reply on Dec 21, 2001 4:36 AM by Mark Hesketh

    Deployment failing

    Mark Hesketh Newbie

      Hello,

      I made a post earlier about not being able to deploy but, it seems it got ignored. Hopefully, this one has more information. Below is the trace I get. I've cross-checked the relationships defined in both jbosscmp-jdbc.xml against the ejb-jar.xml and still can't see what I've got out of whack. Can somebody pls take a look at the trace and files (mentioned) that follow it and shed some light on this problem for me?

      [2001-12-20 16:08:57,032,AutoDeployer,INFO] Auto deploy of file:/C:/tools/jboss-3.0.0alpha/deploy/RomanEJB.jar
      [2001-12-20 16:08:57,042,J2eeDeployer#Default,INFO] Deploy J2EE application: file:/C:/tools/jboss-3.0.0alpha/deploy/RomanEJB.jar
      [2001-12-20 16:08:57,062,J2eeDeployer#Default,INFO] Create application RomanEJB.jar
      [2001-12-20 16:08:57,072,J2eeDeployer#Default,INFO] install EJB module RomanEJB.jar
      [2001-12-20 16:08:57,102,J2eeDeployer#Default,INFO] about to invoke deploy on jardeployer:JBOSS-SYSTEM:service=ContainerFactory
      [2001-12-20 16:08:57,112,ContainerFactory,INFO] got to deploy in ContainerFactory
      [2001-12-20 16:08:57,122,ContainerFactory,INFO] Deploying:file:/C:/tools/jboss-3.0.0alpha/deploy/Default/RomanEJB.jar/
      [2001-12-20 16:08:57,182,ContainerFactory,INFO] Verifying file:/C:/tools/jboss-3.0.0alpha/deploy/Default/RomanEJB.jar/ejb1011.jar
      [2001-12-20 16:08:57,192,ContainerFactory,INFO] Deploying Role
      [2001-12-20 16:08:57,203,JRMPContainerInvoker,DEBUG] Container Invoker RMI Port='4444'
      [2001-12-20 16:08:57,203,JRMPContainerInvoker,DEBUG] Container Invoker Client SocketFactory='Default'
      [2001-12-20 16:08:57,203,JRMPContainerInvoker,DEBUG] Container Invoker Server SocketFactory='Default'
      [2001-12-20 16:08:57,203,JRMPContainerInvoker,DEBUG] Container Invoker Server SocketAddr='Default'
      [2001-12-20 16:08:57,203,JRMPContainerInvoker,DEBUG] Container Invoker Optimize='true'
      [2001-12-20 16:08:57,203,ContainerFactory,INFO] Deploying WorkArea
      [2001-12-20 16:08:57,203,JRMPContainerInvoker,DEBUG] Container Invoker RMI Port='4444'
      [2001-12-20 16:08:57,203,JRMPContainerInvoker,DEBUG] Container Invoker Client SocketFactory='Default'
      [2001-12-20 16:08:57,203,JRMPContainerInvoker,DEBUG] Container Invoker Server SocketFactory='Default'
      [2001-12-20 16:08:57,203,JRMPContainerInvoker,DEBUG] Container Invoker Server SocketAddr='Default'
      [2001-12-20 16:08:57,203,JRMPContainerInvoker,DEBUG] Container Invoker Optimize='true'
      [2001-12-20 16:08:57,273,EntityContainer,DEBUG] Begin java:comp/env for EJB: WorkArea
      [2001-12-20 16:08:57,273,EntityContainer,DEBUG] TCL: java.net.URLClassLoader@6d999a
      [2001-12-20 16:08:57,283,EntityContainer,DEBUG] End java:comp/env for EJB: WorkArea
      [2001-12-20 16:08:57,313,JRMPContainerInvoker,DEBUG] JRMP 1.3 CI initialized
      [2001-12-20 16:08:57,393,CMP,DEBUG] Loading standardjbosscmp-jdbc.xml : file:/C:/tools/jboss-3.0.0alpha//conf/default/standardjbosscmp-jdbc.xml
      [2001-12-20 16:08:57,433,CMP,DEBUG] jar:file:/C:/tools/jboss-3.0.0alpha/deploy/Default/RomanEJB.jar/ejb1011.jar!/META-INF/jbosscmp-jdbc.xml found. Overriding defaults
      [2001-12-20 16:08:57,433,ContainerFactory,ERROR] Could not deploy file:/C:/tools/jboss-3.0.0alpha/deploy/Default/RomanEJB.jar/
      org.jboss.ejb.DeploymentException: Found ejb-relationship-role 'Role-belongsto-WorkArea' in jboss-cmp.xml, but no matching role exits in ejb-jar.xml
      at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCRelationMetaData.(JDBCRelationMetaData.java:330)
      at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCApplicationMetaData.(JDBCApplicationMetaData.java:388)
      at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCXmlFileLoader.load(JDBCXmlFileLoader.java:72)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.loadJDBCEntityMetaData(JDBCStoreManager.java:349)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.init(JDBCStoreManager.java:104)
      at org.jboss.ejb.plugins.CMPPersistenceManager.init(CMPPersistenceManager.java:141)
      at org.jboss.ejb.EntityContainer.init(EntityContainer.java:313)
      at org.jboss.ejb.Application.start(Application.java:201)
      at org.jboss.ejb.ContainerFactory.deploy(ContainerFactory.java:382)
      at org.jboss.ejb.ContainerFactory.deploy(ContainerFactory.java:308)
      at java.lang.reflect.Method.invoke(Native Method)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
      at org.jboss.deployment.J2eeDeployer.startModules(J2eeDeployer.java:467)
      at org.jboss.deployment.J2eeDeployer.startApplication(J2eeDeployer.java:444)
      at org.jboss.deployment.J2eeDeployer.deploy(J2eeDeployer.java:215)
      at java.lang.reflect.Method.invoke(Native Method)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
      at org.jboss.deployment.AutoDeployer.deploy(AutoDeployer.java:654)
      at org.jboss.deployment.AutoDeployer.run(AutoDeployer.java:327)
      at java.lang.Thread.run(Thread.java:484)

      jbosscmp-jdbc.xml:


      <jbosscmp-jdbc>


      java:/DefaultDS
      <type-mapping>PostgreSQL</type-mapping>
      true
      <create-table>false</create-table>
      <remove-table>false</remove-table>
      <read-only>false</read-only>
      <time-out>300</time-out>
      <select-for-update>false</select-for-update>
      <preferred-relation-mapping>foreign-key</preferred-relation-mapping>


      <enterprise-beans>

      <ejb-name>WorkArea</ejb-name>
      <table-name>WorkArea</table-name>
      <create-table>false</create-table>
      <remove-table>false</remove-table>
      <cmp-field>
      <field-name>workAreaID</field-name>
      <column-name>WorkAreaID</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>name</field-name>
      <column-name>Name</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>description</field-name>
      <column-name>Description</column-name>
      </cmp-field>



      <ejb-name>Role</ejb-name>
      <table-name>Role</table-name>
      <create-table>false</create-table>
      <cmp-field>
      <field-name>roleID</field-name>
      <column-name>RoleID</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>name</field-name>
      <column-name>Name</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>description</field-name>
      <column-name>Description</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>workAreaID</field-name>
      <column-name>WorkAreaID</column-name>
      </cmp-field>

      </enterprise-beans>


      <ejb-relation>
      <ejb-relation-name>Role-to-WorkArea</ejb-relation-name>

      <foreign-key-mapping>

      <ejb-relationship-role>
      <ejb-relationship-role-name>Role-belongsto-WorkArea</ejb-relationship-role-name>
      <foreign-key-fields>
      <foreign-key-field>
      <field-name>workAreaID</field-name>
      <column-name>WorkAreaID</column-name>
      </foreign-key-field>
      </foreign-key-fields>
      </ejb-relationship-role>

      <ejb-relationship-role>
      <ejb-relationship-role-name>WorkArea-contains-Role</ejb-relationship-role-name>
      <foreign-key-fields/>
      </ejb-relationship-role>

      </foreign-key-mapping>
      </ejb-relation>



      </jbosscmp-jdbc>


      ejb-jar.xml:

      <ejb-jar>
      Roman EJB
      <display-name>Roman EJB</display-name>
      <enterprise-beans>

      <ejb-name>Role</ejb-name>
      au.com.schmick.bean.ejb.entity.RoleHome
      au.com.schmick.bean.ejb.entity.RoleRemote
      <ejb-class>au.com.schmick.bean.ejb.entity.RoleBean</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>RoleBean</abstract-schema-name>

      <cmp-field>
      <field-name>roleID</field-name>
      <field-type>java.lang.Integer</field-type>
      </cmp-field>
      <primkey-field>roleID</primkey-field>
      <cmp-field>
      <field-name>name</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>description</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>workAreaID</field-name>
      </cmp-field>



      <ejb-name>WorkArea</ejb-name>
      au.com.schmick.bean.ejb.entity.WorkAreaHome
      au.com.schmick.bean.ejb.entity.WorkAreaRemote
      <ejb-class>au.com.schmick.bean.ejb.entity.WorkAreaBean</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>WorkAreaBean</abstract-schema-name>

      <cmp-field>
      <field-name>workAreaID</field-name>
      <field-type>java.lang.Integer</field-type>
      </cmp-field>
      <primkey-field>workAreaID</primkey-field>
      <cmp-field>
      <field-name>name</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>description</field-name>
      </cmp-field>

      <!-- EJB-QL - Definition of finder methods for WorkAreaBean -->

      <query-method>
      <method-name>findByName</method-name>
      <method-params>
      <method-param>java.lang.String</method-param>
      </method-params>
      </query-method>
      <ejb-ql>
      [CDATA[WHERE name = ?1]]
      </ejb-ql>



      <query-method>
      <method-name>findAll</method-name>
      <method-params>
      </method-params>
      </query-method>
      <ejb-ql>
      [CDATA[WHERE workAreaID IS NOT NULL]]
      </ejb-ql>



      </enterprise-beans>


      <ejb-relation>
      <ejb-relation-name>Role-to-WorkArea</ejb-relation-name>

      <ejb-relationship-role>
      <ejb-relationship-role-name>
      Role-belongsto-WorkArea
      </ejb-relationship-role-name>

      Many
      <cascade-delete/>

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

      <cmr-field>
      <cmr-field-name>workarea</cmr-field-name>
      </cmr-field>

      </ejb-relationship-role>

      <ejb-relationship-role>

      <ejb-relationship-role-name>
      WorkArea-contains-Role
      </ejb-relationship-role-name>

      One

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

      <cmr-field>
      <cmr-field-name>roles</cmr-field-name>
      <cmr-field-type>java.util.Set</cmr-field-type>
      </cmr-field>

      </ejb-relationship-role>

      </ejb-relation>



      <assembly-descriptor>
      <container-transaction>

      <ejb-name>Role</ejb-name>
      <method-intf>Remote</method-intf>
      <method-name>*</method-name>


      <ejb-name>WorkArea</ejb-name>
      <method-intf>Remote</method-intf>
      <method-name>*</method-name>

      <trans-attribute>Required</trans-attribute>
      </container-transaction>
      </assembly-descriptor>

      </ejb-jar>


      cheerz.
      Mark