[CELUM-56] getWidth throws NullPointerException when Celum can't be reached or the celum id is invalid Created: 26/Sep/23  Updated: 13/Nov/23  Resolved: 13/Nov/23

Status: Closed
Project: Celum DAM Connector
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Neutral
Reporter: Jonathan Heard Assignee: Raphael Falvo
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Relates
relates to CELUM-51 Make parent folder lazy loaded when i... Closed
Template:
Acceptance criteria:
Empty
Date of First Response:

 Description   

Steps to reproduce

  1. Use 1.0.5-beta2 
  2. Select an Image from Celum
  3. Change the celum connectionString or delete the picture in Celum
  4. Wait until the `CelumConstants.CACHE_NAME_ASSET` Cache is invalid
  5. Call the celumAsset.getMappedPropertyValue(WIDTH) or use the celum-dam-connector:chooser

.. Logs, screenshots, gifs...

Expected results

The width should be saved in JCR and the saved width should be returned or at least an empty String but definitely no Nullpointer Exception should be thrown. 

Actual results

A Nullpointer Exception is thrown and dialogs which use the Celum dam connector chooser can't be opened

Workaround

In Java we can catch the NPE but I have no idea for a workaround for the celum dam connector... 

Development notes



 Comments   
Comment by Jonathan Heard [ 26/Sep/23 ]

Excerpt from the logs: 

    Caused by: java.lang.NullPointerException
        at info.magnolia.external.dam.celum.CelumAsset.getMappedPropertyValue(CelumAsset.java:144)
        at info.magnolia.external.dam.celum.metadata.CelumAssetMetadata.getWidth(CelumAssetMetadata.java:140)
Comment by Raphael Falvo [ 28/Sep/23 ]

Some notes from the exchanges I had with Stefan on slack:

When celum is invalid, the only information we are storing and making now available thanks to CELUM-51 is the public URL.
Any call to any other method on the asset will throw an exception, including the width.

 

He agreed that it makes sense, but also going to check regarding the dev’s expectations.

Comment by Raphael Falvo [ 13/Nov/23 ]

Closing this ticket, see previous comments for more details.

Generated at Sun Feb 11 23:58:37 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.