[MGNLCT-304] NPE when an existing Norsu content type is removed on SaaS Created: 06/Oct/22  Updated: 13/Feb/23

Status: Open
Project: Content Types
Component/s: None
Affects Version/s: 2.0.0
Fix Version/s: None

Type: Bug Priority: Neutral
Reporter: Javier Benito Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[X]* Steps to reproduce, expected, and actual results filled
[X]* Affected version filled
Date of First Response:
Epic Link: SaaS Post-TPR - DevX
Team: DeveloperX

 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) ~[?:?] 


 Comments   
Comment by Matt Rajkovic [ 05/Nov/22 ]

Hey jbenito and czimmermann , this ticket was assigned to an incorrect Epic: https://jira.magnolia-cms.com/browse/CLOUD-1692, so I removed the Epic link.

I moved it to: https://jira.magnolia-cms.com/browse/DEV-2020. If this is not correct, please move it to a different epic.

Generated at Mon Feb 12 00:39:02 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.