JBoss Enterprise SOA Platform
  1. JBoss Enterprise SOA Platform
  2. SOA-1921

Nullpointer exception in log during server shutdown after running juddi integration test suite.

    Details

    • Affects:
      Documentation (Ref Guide, User Guide, etc.), Release Notes
    • Similar Issues:
      Show 10 results 

      Description

      jUDDI integration test suite passes, but during server shutdown a NullPointerException is thrown. See attached server log for more information.

      The fact that Hibernate repopulates the jUDDI schema (see comments for explanation) has uncovered a new problem. JAXRRegistryImpl tries to retrieve the jboss ESB tModel via it's findService method. If it does not find it then it saves a new record to the database. The problem is that even after a successful save operation the tModel just is not in the database.

      This problem exists regardless weather we use a datasource in persistence.xml or direct jdbc.

      JAXRRegistryImpl.java code snipp:

      // Will be null because the schema is not in the database.
      ClassificationScheme cScheme = bqm.findClassificationSchemeByName(findQualifiers, orgCategory);
      Collection<Classification> classifications = new ArrayList<Classification>();
      // If the scheme returned null, then we have to create a org.jboss.soa.esb.:category scheme to use
      if (cScheme == null) {
      try

      { ClassificationScheme scheme = blm.createClassificationScheme(orgCategory, orgCategory); ArrayList<ClassificationScheme> cSchemes = new ArrayList<ClassificationScheme>(); cSchemes.add(scheme); // scheme was not found so save it !!! BulkResponse br = blm.saveClassificationSchemes(cSchemes); }

      catch (Exception e)

      { throw new JAXRException(e); }

      // Wow. The scheme is still null here.
      cScheme = bqm.findClassificationSchemeByName(findQualifiers, orgCategory);
      }

      How to reproduce:
      -----------------------

      1) Reconfigure jUDDI in SOA-P to provide db connections outside the container.
      2) Pick an API jUDDI test from juddi-core
      3) Add jbossesb-registry.sar/juddi_config to class-path so hibernate can pick up it's config file.
      4) Run the test
      5) Shutdown the server with ctrl+c and look out for a NullPointerException.

        Gliffy Diagrams

          Activity

          Hide
          Marek Baluch added a comment -

          The jbossesb tModel is lost from DB after any DB write initiated from an jUDDI integration test. The JAXRRegistryImpl.findService() attempts to save the tModel during server shutdown when the tModel is not found, but even after the save is made the tModel is not in the database.

          Show
          Marek Baluch added a comment - The jbossesb tModel is lost from DB after any DB write initiated from an jUDDI integration test. The JAXRRegistryImpl.findService() attempts to save the tModel during server shutdown when the tModel is not found, but even after the save is made the tModel is not in the database.
          Hide
          Marek Baluch added a comment -

          We loose the jboss esb tModel because jUDDI during startup does not find the "root" publisher in the DB and runs the whole registration process again. During the registration process it uses the juddi_custom_install_data from juddi_core-3.x.x.jar file which does not include the jboss esb data.

          The final question is why it is unable to find the "root" publisher.

          Show
          Marek Baluch added a comment - We loose the jboss esb tModel because jUDDI during startup does not find the "root" publisher in the DB and runs the whole registration process again. During the registration process it uses the juddi_custom_install_data from juddi_core-3.x.x.jar file which does not include the jboss esb data. The final question is why it is unable to find the "root" publisher.
          Hide
          Marek Baluch added a comment -

          The cause why we loose the jboss esb tModel is caused by hibernate - The whole jUDDI database schema is redeployed by hibernate due hibernate.hbm2ddl.auto=create parameter, when a new EntityManager object is created by Install.alreadyInstalled() method and the configuration is picked up. This is not a problem.

          Show
          Marek Baluch added a comment - The cause why we loose the jboss esb tModel is caused by hibernate - The whole jUDDI database schema is redeployed by hibernate due hibernate.hbm2ddl.auto=create parameter, when a new EntityManager object is created by Install.alreadyInstalled() method and the configuration is picked up. This is not a problem.
          Hide
          Marek Baluch added a comment -

          Attached reproducer.

          1) setup properties in quickstarts.properties file.
          2) ant customize-server (enabled out of container juddi connections)
          3) start server
          4) ant test

          Show
          Marek Baluch added a comment - Attached reproducer. 1) setup properties in quickstarts.properties file. 2) ant customize-server (enabled out of container juddi connections) 3) start server 4) ant test
          Hide
          Jiri Sedlacek added a comment -

          Verified in version 5.1.0.ER2

          Show
          Jiri Sedlacek added a comment - Verified in version 5.1.0.ER2
          Hide
          RH Bugzilla Integration added a comment -

          This issue has been migrated to Bugzilla bug 779545. Please note that this JIRA issue has been closed as part of the migration and therefore you will need to check the Bugzilla issue to find the current status.

          Show
          RH Bugzilla Integration added a comment - This issue has been migrated to Bugzilla bug 779545 . Please note that this JIRA issue has been closed as part of the migration and therefore you will need to check the Bugzilla issue to find the current status.

            People

            • Assignee:
              Unassigned
              Reporter:
              Marek Baluch
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development