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

test doctype unregistration must not NPE if still pending

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 5.5
    • Fix Version/s: 5.6
    • Component/s: Tests

      Description

      If a doctype A is registered as extending B but B is never registered, on unregistration of A a NPE is produced:

      18:12:22,620 ERROR [RegistrationInfoImpl] Failed to unregister extension. Contributor: RegistrationInfo: service:org.nuxeo.ecm.platform.routing.graph.types.test to service:org.nuxeo.ecm.core.schema.TypeService; xpoint: doctype
      java.lang.NullPointerException
      	at org.nuxeo.ecm.core.schema.registries.DocumentTypeRegistry.getContributionId(DocumentTypeRegistry.java:45)
      	at org.nuxeo.ecm.core.schema.registries.DocumentTypeRegistry.getContributionId(DocumentTypeRegistry.java:1)
      	at org.nuxeo.runtime.model.ContributionFragmentRegistry.removeContribution(ContributionFragmentRegistry.java:205)
      	at org.nuxeo.runtime.model.ContributionFragmentRegistry.removeContribution(ContributionFragmentRegistry.java:181)
      	at org.nuxeo.ecm.core.schema.SchemaManagerImpl.unregisterDocumentType(SchemaManagerImpl.java:357)
      	at org.nuxeo.ecm.core.schema.TypeService.unregisterExtension(TypeService.java:177)
      	at org.nuxeo.runtime.model.impl.ComponentInstanceImpl.unregisterExtension(ComponentInstanceImpl.java:224)
      	at org.nuxeo.runtime.model.impl.ComponentManagerImpl.unregisterExtension(ComponentManagerImpl.java:307)
      	at org.nuxeo.runtime.model.impl.RegistrationInfoImpl.deactivate(RegistrationInfoImpl.java:417)
      	at org.nuxeo.runtime.model.impl.RegistrationInfoImpl.unresolve(RegistrationInfoImpl.java:462)
      	at org.nuxeo.runtime.model.impl.ComponentRegistry.unresolveComponent(ComponentRegistry.java:212)
      	at org.nuxeo.runtime.model.impl.ComponentRegistry.removeComponent(ComponentRegistry.java:141)
      	at org.nuxeo.runtime.model.impl.ComponentManagerImpl.unregister(ComponentManagerImpl.java:191)
      	at org.nuxeo.runtime.model.impl.DefaultRuntimeContext.destroy(DefaultRuntimeContext.java:188)
      	at org.nuxeo.runtime.osgi.OSGiRuntimeService.doStop(OSGiRuntimeService.java:200)
      	at org.nuxeo.runtime.AbstractRuntimeService.stop(AbstractRuntimeService.java:144)
      	at org.nuxeo.runtime.api.Framework.shutdown(Framework.java:176)
      	at org.nuxeo.runtime.test.NXRuntimeTestCase.wipeRuntime(NXRuntimeTestCase.java:344)
      	at org.nuxeo.runtime.test.NXRuntimeTestCase.tearDown(NXRuntimeTestCase.java:181)
      

        Attachments

          Activity

            People

            • Assignee:
              fguillaume Florent Guillaume
              Reporter:
              fguillaume Florent Guillaume
              Participants:
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: