5 Replies Latest reply on Oct 1, 2003 3:53 PM by Prabhakar Krishnaswami

    Jboss hanging while deploying beans

    Prabhakar Krishnaswami Newbie

      I am trying to deploy some entity beans using CMR on Jboss304 and I am having problems. As JBoss tries to deploy this application, I see the following printed out on the console:

      08:53:34,392 INFO [EjbModule] Creating
      08:53:34,412 INFO [EjbModule] Deploying AddressBean
      08:53:34,422 INFO [EjbModule] Deploying PersonBean
      08:53:34,442 INFO [EjbModule] Deploying LoaderMDB
      08:53:34,532 INFO [JMSContainerInvoker] Creating
      08:53:34,532 INFO [JMSContainerInvoker] Created
      08:53:34,542 INFO [EjbModule] Created
      08:53:34,542 INFO [EjbModule] Starting

      At this point, JBoss hangs.

      I think the problem is related to my ejb-jar.xml and jbosscmp-jdbc.xml but I am not sure;
      If someone can help me out I will sure appreciate it.

      here are the relevant portions of the xml which define the relationship.

      jbosscmp-jdbc.xml:

      <ejb-relation>
      <ejb-relation-name>Person-HomeAddress</ejb-relation-name>
      <foreign-key-mapping/>
      <ejb-relationship-role>
      <ejb-relationship-role-name>Person-has-homeAddress</ejb-relationship-role-name>
      <key-fields>
      <key-field>
      <field-name>id</field-name>
      <column-name>homeAddress</column-name>
      </key-field>
      </key-fields>
      </ejb-relationship-role>


      <ejb-relationship-role>
      <ejb-relationship-role-name>homeAddress-belongs-to-Person</ejb-relationship-role-name>
      <key-fields/>
      </ejb-relationship-role>


      </ejb-relation>

      ejb-jar.xml:

      <!-- Relationship 1 -->
      <ejb-relation>

      Home Address of Person
      <ejb-relation-name>Person-HomeAddress</ejb-relation-name>

      <!--Role 1-->
      <ejb-relationship-role>
      <ejb-relationship-role-name>Person-has-homeAddress</ejb-relationship-role-name>
      One
      <relationship-role-source>
      <ejb-name>PersonBean</ejb-name>
      </relationship-role-source>
      <cmr-field>
      <cmr-field-name>homeAddress</cmr-field-name>
      </cmr-field>
      </ejb-relationship-role>

      <!-- Role 2-->

      <ejb-relationship-role>
      <ejb-relationship-role-name>homeAddress-belongs-to-Person</ejb-relationship-role-name>
      One
      <cascade-delete />
      <relationship-role-source>
      <ejb-name>AddressBean</ejb-name>
      </relationship-role-source>
      </ejb-relationship-role>

      </ejb-relation>




      As a side note, I am using Interbase database and even though the default section has the tag
      <create-table>true</create-table> I don't see any tables created.

      Could someone help me out?


        • 1. Re: Jboss hanging while deploying beans
          Raja Master

          Try turning the log level to "DEBUG" in the log4j.xml on jboss_dist//conf directory. That might give u a better idea of where the code is hanging exactly.
          That will also tell u if the tables are being created or not.

          -Raj

          • 2. Re: Jboss hanging while deploying beans
            Prabhakar Krishnaswami Newbie

            Thanks for your response. As suggested by you I turned on the log level to DEBUG. I got some additional information:

            17:24:30,550 DEBUG [EntityContainer] Binding ejb/local/Address to bean source:
            dbApp.jar#AddressBean
            17:24:30,550 DEBUG [EntityContainer] Binding resource manager: java:/july2003 t
            JDNI ENC as: PK
            17:24:30,550 DEBUG [EntityContainer] End java:comp/env for EJB: PersonBean
            17:24:30,580 DEBUG [BaseLocalContainerInvoker] Bound EJBLocalHome of PersonBean
            to local/PersonBean
            17:24:30,580 DEBUG [PersonBean] Initializing CMP plugin for PersonBean
            17:24:30,640 DEBUG [PersonBean] Loading standardjbosscmp-jdbc.xml : file:/C:/jb
            ss304_tc4112/server/default/conf/standardjbosscmp-jdbc.xml
            17:24:31,030 DEBUG [PersonBean] jar:file:/C:/jboss304_tc4112/server/default/tmp
            deploy/server/default/deploy/mdbApp.ear/98.mdbApp.ear-contents/mdbApp.jar!/META
            INF/jbosscmp-jdbc.xml found. Overriding defaults
            17:24:31,161 DEBUG [IdleRemover] internalRegisterPool: registering pool with in
            erval 900000 old interval: 9223372036854775807
            17:24:31,161 DEBUG [IdleRemover] internalRegisterPool: about to notify thread:
            ld next: 1064878321161, new next: 1064878321161
            17:24:31,171 DEBUG [LocalManagedConnectionFactory] Using properties: {user=SYSD
            A, password=masterkey}
            17:24:31,171 DEBUG [LocalManagedConnectionFactory] Checking driver for URL: jdb
            :interbase://localhost:3060/c:/JavaDevelopment/enterprisetechtips/july2003/mdba
            p
            17:24:31,171 DEBUG [LocalManagedConnectionFactory] Driver not yet registered fo
            url: jdbc:interbase://localhost:3060/c:/JavaDevelopment/enterprisetechtips/jul
            2003/mdbapp
            17:24:31,181 DEBUG [LocalManagedConnectionFactory] Driver not yet registered fo
            url: jdbc:interbase://localhost:3060/c:/JavaDevelopment/enterprisetechtips/jul
            2003/mdbapp
            17:24:31,211 DEBUG [LocalManagedConnectionFactory] Driver already registered fo
            url: jdbc:interbase://localhost:3060/c:/JavaDevelopment/enterprisetechtips/jul
            2003/mdbapp
            17:24:31,591 DEBUG [CachedConnectionInterceptor] start called in CachedConnecti
            nInterceptor
            17:24:31,591 DEBUG [EjbModule] Application.start(), start container: org.jboss.
            jb.EntityContainer@7efa96
            17:24:31,591 DEBUG [EntityContainer] Begin java:comp/env for EJB: AddressBean
            17:24:31,591 DEBUG [EntityContainer] TCL: java.net.URLClassLoader@182a70
            17:24:31,601 DEBUG [EntityContainer] Binding resource manager: java:/july2003 t
            JDNI ENC as: PK
            17:24:31,601 DEBUG [EntityContainer] End java:comp/env for EJB: AddressBean
            17:24:31,601 DEBUG [BaseLocalContainerInvoker] Bound EJBLocalHome of AddressBea
            to local/AddressBean
            17:24:31,601 DEBUG [AddressBean] Initializing CMP plugin for AddressBean
            17:24:32,272 DEBUG [PersonBean] Entity Exists SQL: SELECT COUNT(*) FROM PERSONB
            AN WHERE id=?
            17:24:32,272 DEBUG [PersonBean] Insert Entity SQL: INSERT INTO PERSONBEAN (id,
            astname, gender, middlename, firstname, birthdate) VALUES (?, ?, ?, ?, ?, ?)
            17:24:32,282 DEBUG [PersonBean] Remove SQL: DELETE FROM PERSONBEAN WHERE id=?
            17:25:20,390 DEBUG [LRUEnterpriseContextCachePolicy] Resized cache for bean Per
            onBean: old capacity = 1000000, new capacity = 50

            I do see some querries being run against my database but I am not sure what happens after this. At this point the server still hangs.

            I have another question- if I set the following value in jbosscmp-jdbc.xml, would the tables be automatically created in the database?

            <create-table>true</create-table>

            I look foward to your input.

            • 3. Re: Jboss hanging while deploying beans
              Raja Master

              >I have another question- if I set the following value in >jbosscmp-jdbc.xml, would the tables be automatically >created in the database?

              ><create-table>true</create-table>

              Only when the table does not exist. If the table exists, Jboss just skips over this even though this tag is explicitly set.
              CAn you check if there are any locks on ur database?

              -Raj

              • 4. Re: Jboss hanging while deploying beans
                Prabhakar Krishnaswami Newbie

                When I am bringing up the server I don't have any other software running. Just to be sure, I shut down the interbase client. Is there another way to determine if there is a lock on the database? Could this be a problem with the interbase driver?

                • 5. Re: Jboss hanging while deploying beans
                  Prabhakar Krishnaswami Newbie

                  I think the problem is with the interbase driver I was using. I have now changed to firebird driver and I was gotten past the hang problem.