Uploaded image for project: 'Content Types'
  1. Content Types
  2. MGNLCT-304

NPE when an existing Norsu content type is removed on SaaS

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Neutral
    • None
    • 2.0.0
    • None

    Description

      To Discover

      Verify if this issue still happens.

      Steps to reproduce:

      1. Add a light module on an Staging subscription, with a Norsu Content Type definition
      2. Sync the changes and check that it is created in the staging instance
      3. Rename the content type definition file name and also the content type name wherever is used
      4. Push changes to repo and ensure they are loaded by staging subscription.

      An exception appears in the instance log:

      2022-10-06 12:12:28,763 ERROR [http-nio-8081-exec-9] info.magnolia.event.SimpleEventBus                 {environmentId=main}: Exception caught when dispatching info.magnolia.types.ContentTypeChangeEvent with info.magnolia.types.datasource.norsu.NorsuContentTypeInitializer$$Lambda$1582/0x0000000100e2f840 eventHandler.
      info.magnolia.config.registry.Registry$NoSuchDefinitionException: norsuGenre
      	at info.magnolia.config.registry.AbstractRegistry.getProvider(AbstractRegistry.java:145) ~[magnolia-configuration-6.3-SNAPSHOT.jar:?]
      	at info.magnolia.types.ContentTypeRegistry.getProvider(ContentTypeRegistry.java:216) ~[magnolia-content-types-2.0-SNAPSHOT.jar:?]
      	at info.magnolia.types.datasource.norsu.NorsuContentTypeInitializer.contentTypeChange(NorsuContentTypeInitializer.java:156) ~[magnolia-content-types-norsu-2.0-SNAPSHOT.jar:?]
      	at info.magnolia.types.ContentTypeChangeEvent.dispatch(ContentTypeChangeEvent.java:109) ~[magnolia-content-types-2.0-SNAPSHOT.jar:?]
      	at info.magnolia.types.ContentTypeChangeEvent.dispatch(ContentTypeChangeEvent.java:45) ~[magnolia-content-types-2.0-SNAPSHOT.jar:?]
      	at info.magnolia.event.SimpleEventBus.fireEvent(SimpleEventBus.java:75) ~[magnolia-core-6.3-SNAPSHOT.jar:?]
      	at info.magnolia.types.ContentTypeRegistry.lambda$initializeContentTypes$3(ContentTypeRegistry.java:153) ~[magnolia-content-types-2.0-SNAPSHOT.jar:?]
      	at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183) ~[?:?]
      	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195) ~[?:?]
      	at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177) ~[?:?]
      	at java.util.HashMap$KeySpliterator.forEachRemaining(HashMap.java:1621) ~[?:?] 

      Checklists

        Acceptance criteria

        Attachments

          Activity

            People

              Unassigned Unassigned
              jbenito Javier Benito
              DeveloperX
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Checklists

                  Bug DoR
                  Task DoD