Uploaded image for project: 'jUDDI'
  1. jUDDI
  2. JUDDI-568

If publication of the root publisher fails, juddi goes into an infinite loop

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Not A Problem
    • Affects Version/s: 3.1.4
    • Fix Version/s: 3.1.5
    • Component/s: None
    • Labels:
      None

      Description

      to reproduce edit

      juddi-core\src\main\resources\juddi_install_data\root_Publisher.xml

      change the true/false value to something like asdasdasdadsasd

      If the initial seed data from trunk/juddi-core-openjpa/target/classes/juddi_install_data/ is bad or is rejected somewhere due to a validation error, no error messages are displayed to the log or stdout. Furthermore, the Install class gets stuck in an infinite loop. Suggest some kind of counter or exist cause to prevent the loop,

        Issue Links

          Activity

          Hide
          kurtstam Kurt T Stam added a comment -

          It should probably through a runtime exception, so it doesn't loop?

          Show
          kurtstam Kurt T Stam added a comment - It should probably through a runtime exception, so it doesn't loop?
          Hide
          spyhunter99 Alex O'Ree added a comment -

          Not sure, but in case you're wondering how I triggered it, I inadvertently wrote an incorrect tmodel validator that was rejecting the save tmodel requests when Juddi started. Although the validator threw an exception, nothing was logged to indicate an error. It just looped forever.

          Show
          spyhunter99 Alex O'Ree added a comment - Not sure, but in case you're wondering how I triggered it, I inadvertently wrote an incorrect tmodel validator that was rejecting the save tmodel requests when Juddi started. Although the validator threw an exception, nothing was logged to indicate an error. It just looped forever.
          Hide
          kurtstam Kurt T Stam added a comment - - edited

          Hi Alex, I just looked at the code and it should be throwing a ConfigurationException; all the way into the RegistryServlet which then logs the error. Did you check the juddi.log?

          try

          { Registry.start(); }

          catch (ConfigurationException e)

          { logger.error("jUDDI registry could not be started." + e.getMessage(), e); }

          I now also throw a ServletException so that the container knows the initialization of jUDDI went bust. Do you have an easy way of validating that this change does the the trick?

          --Kurt

          Show
          kurtstam Kurt T Stam added a comment - - edited Hi Alex, I just looked at the code and it should be throwing a ConfigurationException; all the way into the RegistryServlet which then logs the error. Did you check the juddi.log? try { Registry.start(); } catch (ConfigurationException e) { logger.error("jUDDI registry could not be started." + e.getMessage(), e); } I now also throw a ServletException so that the container knows the initialization of jUDDI went bust. Do you have an easy way of validating that this change does the the trick? --Kurt
          Hide
          kurtstam Kurt T Stam added a comment -

          Turns out it was during juddi deploy, but a problem with the unittests. Each test has a setup phase which loads the initial UDDI data. If something is corrupt like the publisher, then pretty much all tests will fail the same way looking like it is looping..

          Show
          kurtstam Kurt T Stam added a comment - Turns out it was during juddi deploy, but a problem with the unittests. Each test has a setup phase which loads the initial UDDI data. If something is corrupt like the publisher, then pretty much all tests will fail the same way looking like it is looping..
          Hide
          kurtstam Kurt T Stam added a comment -

          to reproduce edit

          juddi-core\src\main\resources\juddi_install_data\root_Publisher.xml

          change the true/false value to something like asdasdasdadsasd

          Show
          kurtstam Kurt T Stam added a comment - to reproduce edit juddi-core\src\main\resources\juddi_install_data\root_Publisher.xml change the true/false value to something like asdasdasdadsasd
          Hide
          spyhunter99 Alex O'Ree added a comment -

          I was able to reproduce the problem, It turned out to be my fault for implement ref integrity checks. Eventually I ended up with a stack overflow.

          The problem was specific to validateKeyedReference, which called another function "verifyTmodelKeyExists".

          Inside verifyTmodelKeyExists, it created and entity manager which

          The log output was something like this
          Mar 23, 2013 11:30:54 AM org.apache.juddi.config.Install install
          INFO: Loading the root Publisher from file root_Publisher.xml
          Mar 23, 2013 11:30:54 AM org.apache.juddi.config.Install buildInstallEntity
          INFO: Loading the content of file: file:/C:/juddi/trunk/juddi-core/target/classes/juddi_install_data/root_Publisher.xml
          Mar 23, 2013 11:30:54 AM org.apache.juddi.config.AppConfig loadConfiguration
          INFO: Reading from properties file: file:/C:/juddi/trunk/juddi-core/target/test-classes/juddiv3.properties
          Mar 23, 2013 11:30:54 AM org.apache.juddi.config.AppConfig getPersistentConfiguration
          INFO: The 'root' publisher was not found, loading...
          Mar 23, 2013 11:30:54 AM org.hibernate.util.JDBCExceptionReporter logWarnings
          WARNING: SQL Warning: 10000, SQLState: 01J01
          Mar 23, 2013 11:30:54 AM org.hibernate.util.JDBCExceptionReporter logWarnings
          WARNING: Database 'memory:juddi-derby-test-db' not created, connection made to existing database instead.
          Mar 23, 2013 11:30:54 AM org.apache.juddi.config.Install buildInstallEntity
          INFO: Loading the content of file: file:/C:/juddi/trunk/juddi-core/target/classes/juddi_install_data/root_tModelKeyGen.x
          ml
          Mar 23, 2013 11:30:55 AM org.apache.juddi.config.Install buildInstallEntity
          INFO: Loading the content of file: file:/C:/juddi/trunk/juddi-core/target/classes/juddi_install_data/root_BusinessEntity
          .xml
          Mar 23, 2013 11:30:55 AM org.apache.juddi.config.Install install
          INFO: Loading the root Publisher from file root_Publisher.xml
          Mar 23, 2013 11:30:55 AM org.apache.juddi.config.Install buildInstallEntity
          INFO: Loading the content of file: file:/C:/juddi/trunk/juddi-core/target/classes/juddi_install_data/root_Publisher.xml
          Mar 23, 2013 11:30:56 AM org.apache.juddi.config.AppConfig loadConfiguration
          INFO: Reading from properties file: file:/C:/juddi/trunk/juddi-core/target/test-classes/juddiv3.properties
          Mar 23, 2013 11:30:56 AM org.apache.juddi.config.AppConfig getPersistentConfiguration
          INFO: The 'root' publisher was not found, loading...
          Mar 23, 2013 11:30:56 AM org.hibernate.util.JDBCExceptionReporter logWarnings
          WARNING: SQL Warning: 10000, SQLState: 01J01
          Mar 23, 2013 11:30:56 AM org.hibernate.util.JDBCExceptionReporter logWarnings
          WARNING: Database 'memory:juddi-derby-test-db' not created, connection made to existing database instead.
          Mar 23, 2013 11:30:56 AM org.apache.juddi.config.Install buildInstallEntity
          INFO: Loading the content of file: file:/C:/juddi/trunk/juddi-core/target/classes/juddi_install_data/root_tModelKeyGen.x
          ml
          Mar 23, 2013 11:30:56 AM org.apache.juddi.config.Install buildInstallEntity
          INFO: Loading the content of file: file:/C:/juddi/trunk/juddi-core/target/classes/juddi_install_data/root_BusinessEntity
          .xml
          Mar 23, 2013 11:30:57 AM org.apache.juddi.config.Install install
          INFO: Loading the root Publisher from file root_Publisher.xml
          Mar 23, 2013 11:30:57 AM org.apache.juddi.config.Install buildInstallEntity
          INFO: Loading the content of file: file:/C:/juddi/trunk/juddi-core/target/classes/juddi_install_data/root_Publisher.xml

          and it repeats forever until the stack finally fills up. I was able to trace back the problem to calling AppConfig.getConfiguration() from within one of the validation routines. The solution was simple, pass the current Configuration instance though every validation routine that needs it.

          Show
          spyhunter99 Alex O'Ree added a comment - I was able to reproduce the problem, It turned out to be my fault for implement ref integrity checks. Eventually I ended up with a stack overflow. The problem was specific to validateKeyedReference, which called another function "verifyTmodelKeyExists". Inside verifyTmodelKeyExists, it created and entity manager which The log output was something like this Mar 23, 2013 11:30:54 AM org.apache.juddi.config.Install install INFO: Loading the root Publisher from file root_Publisher.xml Mar 23, 2013 11:30:54 AM org.apache.juddi.config.Install buildInstallEntity INFO: Loading the content of file: file:/C:/juddi/trunk/juddi-core/target/classes/juddi_install_data/root_Publisher.xml Mar 23, 2013 11:30:54 AM org.apache.juddi.config.AppConfig loadConfiguration INFO: Reading from properties file: file:/C:/juddi/trunk/juddi-core/target/test-classes/juddiv3.properties Mar 23, 2013 11:30:54 AM org.apache.juddi.config.AppConfig getPersistentConfiguration INFO: The 'root' publisher was not found, loading... Mar 23, 2013 11:30:54 AM org.hibernate.util.JDBCExceptionReporter logWarnings WARNING: SQL Warning: 10000, SQLState: 01J01 Mar 23, 2013 11:30:54 AM org.hibernate.util.JDBCExceptionReporter logWarnings WARNING: Database 'memory:juddi-derby-test-db' not created, connection made to existing database instead. Mar 23, 2013 11:30:54 AM org.apache.juddi.config.Install buildInstallEntity INFO: Loading the content of file: file:/C:/juddi/trunk/juddi-core/target/classes/juddi_install_data/root_tModelKeyGen.x ml Mar 23, 2013 11:30:55 AM org.apache.juddi.config.Install buildInstallEntity INFO: Loading the content of file: file:/C:/juddi/trunk/juddi-core/target/classes/juddi_install_data/root_BusinessEntity .xml Mar 23, 2013 11:30:55 AM org.apache.juddi.config.Install install INFO: Loading the root Publisher from file root_Publisher.xml Mar 23, 2013 11:30:55 AM org.apache.juddi.config.Install buildInstallEntity INFO: Loading the content of file: file:/C:/juddi/trunk/juddi-core/target/classes/juddi_install_data/root_Publisher.xml Mar 23, 2013 11:30:56 AM org.apache.juddi.config.AppConfig loadConfiguration INFO: Reading from properties file: file:/C:/juddi/trunk/juddi-core/target/test-classes/juddiv3.properties Mar 23, 2013 11:30:56 AM org.apache.juddi.config.AppConfig getPersistentConfiguration INFO: The 'root' publisher was not found, loading... Mar 23, 2013 11:30:56 AM org.hibernate.util.JDBCExceptionReporter logWarnings WARNING: SQL Warning: 10000, SQLState: 01J01 Mar 23, 2013 11:30:56 AM org.hibernate.util.JDBCExceptionReporter logWarnings WARNING: Database 'memory:juddi-derby-test-db' not created, connection made to existing database instead. Mar 23, 2013 11:30:56 AM org.apache.juddi.config.Install buildInstallEntity INFO: Loading the content of file: file:/C:/juddi/trunk/juddi-core/target/classes/juddi_install_data/root_tModelKeyGen.x ml Mar 23, 2013 11:30:56 AM org.apache.juddi.config.Install buildInstallEntity INFO: Loading the content of file: file:/C:/juddi/trunk/juddi-core/target/classes/juddi_install_data/root_BusinessEntity .xml Mar 23, 2013 11:30:57 AM org.apache.juddi.config.Install install INFO: Loading the root Publisher from file root_Publisher.xml Mar 23, 2013 11:30:57 AM org.apache.juddi.config.Install buildInstallEntity INFO: Loading the content of file: file:/C:/juddi/trunk/juddi-core/target/classes/juddi_install_data/root_Publisher.xml and it repeats forever until the stack finally fills up. I was able to trace back the problem to calling AppConfig.getConfiguration() from within one of the validation routines. The solution was simple, pass the current Configuration instance though every validation routine that needs it.

            People

            • Assignee:
              kurtstam Kurt T Stam
              Reporter:
              spyhunter99 Alex O'Ree
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development