5 Replies Latest reply on Jul 5, 2004 6:41 AM by Luis Conceicao

    Relationships

    Luis Conceicao Newbie

      Hi,

      I'm using JBOSS 3.2.3 with MySQL Datasource configured as java:/mySqlDS.

      When i'm trying to deploy i get the error:


      11:53:07,925 ERROR [URLDeploymentScanner] MBeanException: Exception in MBean ope
      ration 'checkIncompleteDeployments()'
      Cause: Incomplete Deployment listing:
      Packages waiting for a deployer:

      Incompletely deployed packages:

      MBeans waiting for classes:

      MBeans waiting for other MBeans:
      [ObjectName: jboss.j2ee:jndiName=AudioElement,service=EJB
      state: FAILED
      I Depend On:
      Depends On Me: javax.ejb.EJBException: Data source for relationship named person-card not found java:/mySqlDS]

        • 1. Re: Relationships
          Kabir Khan Master

          Post deployment descriptors etc.

          • 2. Re: Relationships
            Luis Conceicao Newbie

            Sorry.

            Here are the deployment descriptors

            <ejb-jar>
             <enterprise-beans>
            .
            .
            .
             </enterprise-beans>
             <relationships>
             <ejb-relation>
             <ejb-relation-name>person-card</ejb-relation-name>
             <ejb-relationship-role>
             <description>person</description>
             <ejb-relationship-role-name>PersonRole</ejb-relationship-role-name>
             <multiplicity>One</multiplicity>
             <relationship-role-source>
             <description>person</description>
             <ejb-name>Person</ejb-name>
             </relationship-role-source>
             <cmr-field>
             <description>card</description>
             <cmr-field-name>card</cmr-field-name>
             <cmr-field-type>java.util.Collection</cmr-field-type>
             </cmr-field>
             </ejb-relationship-role>
             <ejb-relationship-role>
             <description>card</description>
             <ejb-relationship-role-name>CardRole</ejb-relationship-role-name>
             <multiplicity>Many</multiplicity>
             <cascade-delete />
             <relationship-role-source>
             <description>card</description>
             <ejb-name>Card</ejb-name>
             </relationship-role-source>
             </ejb-relationship-role>
             </ejb-relation>
             </relationships>
            </ejb-jar>
            
            
            
            
            <jbosscmp-jdbc>
             <defaults>
             <datasource>java:/mySqlDS</datasource>
             <datasource-mapping>mySQL</datasource-mapping>
             <preferred-relation-mapping>foreign-key</preferred-relation-mapping>
             <create-table>false</create-table>
             <remove-table>false</remove-table>
             </defaults>
             <enterprise-beans>
            .
            .
            .
             </enterprise-beans>
             <relationships>
             <ejb-relation>
             <ejb-relation-name>person-card</ejb-relation-name>
             <foreign-key-mapping />
             <ejb-relationship-role>
             <ejb-relationship-role-name>PersonRole</ejb-relationship-role-name>
             </ejb-relationship-role>
             <ejb-relationship-role>
             <ejb-relationship-role-name>CardRole</ejb-relationship-role-name>
             </ejb-relationship-role>
             </ejb-relation>
             </relationships>
            </jbosscmp-jdbc>


            Thanks.

            • 3. Re: Relationships
              Alexey Loubyansky Master

              The datasource is not available. Make sure it is deployed successfully and you can see it in JNDIView.

              • 4. Re: Relationships
                Luis Conceicao Newbie

                I can find the DataSource on the java namespace...


                JMX MBean Operation Result

                .
                .
                .


                java: Namespace
                +- XAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory)
                +- DefaultDS (class: org.jboss.resource.adapter.jdbc.WrapperDataSource)
                +- SecurityProxyFactory (class: org.jboss.security.SubjectSecurityProxyFactory)
                +- DefaultJMSProvider (class: org.jboss.jms.jndi.JBossMQProvider)
                +- MySqlDS (class: org.jboss.resource.adapter.jdbc.WrapperDataSource)
                +- comp (class: javax.naming.Context)
                +- JmsXA (class: org.jboss.resource.adapter.jms.JmsConnectionFactoryImpl)
                +- ConnectionFactory (class: org.jboss.mq.SpyConnectionFactory)
                +- jaas (class: javax.naming.Context)
                | +- JmsXARealm (class: org.jboss.security.plugins.SecurityDomainContext)
                | +- jbossmq (class: org.jboss.security.plugins.SecurityDomainContext)
                | +- HsqlDbRealm (class: org.jboss.security.plugins.SecurityDomainContext)
                +- timedCacheFactory (class: javax.naming.Context)
                Failed to lookup: timedCacheFactory, errmsg=null
                +- TransactionPropagationContextExporter (class: org.jboss.tm.TransactionPropagationContextFactory)
                +- Mail (class: javax.mail.Session)
                +- StdJMSPool (class: org.jboss.jms.asf.StdServerSessionPoolFactory)
                +- TransactionPropagationContextImporter (class: org.jboss.tm.TransactionPropagationContextImporter)
                +- TransactionManager (class: org.jboss.tm.TxManager)

                .
                .
                .


                • 5. Re: Relationships
                  Luis Conceicao Newbie

                  Ohhhh i can't believe it! It's a stupid error!

                  I have:

                   <defaults>
                   <datasource>java:/mySqlDS</datasource>
                   <datasource-mapping>mySQL</datasource-mapping>
                   <preferred-relation-mapping>foreign-key</preferred-relation-mapping>
                   <create-table>false</create-table>
                   <remove-table>false</remove-table>
                   </defaults>
                  



                  and my datasource is MySqlDS.