Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-24505

Fix test errors about WorkSchedulePath class initialization

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 10.1
    • Component/s: Events / Works, Tests
    • Tags:
    • Sprint:
      nxFG 10.1.1
    • Story Points:
      1

      Description

      In some random cases, we get during tests:

      java.lang.NoClassDefFoundError: Could not initialize class org.nuxeo.ecm.core.work.api.WorkSchedulePath
      	at org.nuxeo.ecm.core.work.AbstractWork.getSchedulePath(AbstractWork.java:173)
      	at org.nuxeo.ecm.core.work.AbstractWork.toString(AbstractWork.java:560)
      	at java.lang.String.valueOf(String.java:2994)
      	at java.lang.StringBuilder.append(StringBuilder.java:131)
      	at org.nuxeo.ecm.core.work.WorkManagerImpl.scheduleAfterCommit(WorkManagerImpl.java:776)
      	at org.nuxeo.ecm.core.work.WorkManagerImpl.schedule(WorkManagerImpl.java:718)
      	at org.nuxeo.ecm.core.storage.sql.SessionImpl.scheduleWork(SessionImpl.java:357)
      	at org.nuxeo.ecm.core.storage.sql.SessionImpl.flush(SessionImpl.java:345)
      	at org.nuxeo.ecm.core.storage.sql.SessionImpl.save(SessionImpl.java:320)
      	at org.nuxeo.ecm.core.storage.sql.ra.ConnectionImpl.save(ConnectionImpl.java:173)
      	at org.nuxeo.ecm.core.storage.sql.coremodel.SQLSession.save(SQLSession.java:139)
      	at org.nuxeo.ecm.core.api.AbstractSession.save(AbstractSession.java:1490)
      	at org.nuxeo.ecm.platform.relations.CoreGraph$StatementAdder.run(CoreGraph.java:255)
      	at org.nuxeo.ecm.core.api.UnrestrictedSessionRunner.runUnrestricted(UnrestrictedSessionRunner.java:135)
      	at org.nuxeo.ecm.platform.relations.CoreGraph.add(CoreGraph.java:230)
      	at org.nuxeo.ecm.platform.relations.TestCoreGraph.testAdd(TestCoreGraph.java:150)
      

      It seems that when the class is loaded the runtime raises an error when calling Framework.getProperty. The init of captureStack should be done more lazily.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 30 minutes
                30m

                  PagerDuty

                  Error rendering 'com.pagerduty.jira-server-plugin:PagerDuty'. Please contact your Jira administrators.