Uploaded image for project: 'Opencast'
  1. MH-13418

Setting extension metadata through the API crashes in updatePresenters

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects versions: 6.2, 6.0
    • Fix versions: None
    • Components: External API
    • Labels:
      None
    • Severity:
      Non Functioning
    • Steps to reproduce:
      Hide
      Steps to reproduce:
      1. Create a new CatalogUIAdapterFactory configuration.
      I created org.opencastproject.ui.metadata.CatalogUIAdapterFactory-episode-beuth.cfg

      with the content

      type=events
      organization=mh_default_org
      flavor=beuth/episode
      title=EVENT.METADATA.BEUTH
      common-metadata=false

      # Name of the XML root element of the serialized catalog
      xml.rootElement.name=dublincore
      # Namespace binding for the XML root element
      xml.rootElement.namespace.URI=http://doku.beuth-hochschule.de/opencast/metadata/1.0/

      # XML namespace bindings
      xml.namespaceBinding.root.URI=http://doku.beuth-hochschule.de/opencast/metadata/1.0/
      xml.namespaceBinding.root.prefix=

      # Permanent video - no automatic deletion
      property.permanent.inputID=permanent
      property.permanent.label=EVENT.METADATA.BEUTH.PERMANENT
      property.permanent.type=boolean
      property.permanent.readOnly=false
      property.permanent.required=false
      property.permanent.order=0

      2. Try setting the new property through the API. I tried

      curl -v -X PUT -u user:pass -F 'metadata=[{"id":"permanent", "value":true}]' 'https://host/api/events/uuid/metadata?type=beuth/episode'
       
       Actual Results:
       HTTP/2 500
      The logfile shows a traceback

              at org.opencastproject.index.service.impl.IndexServiceImpl.updatePresenters(IndexServiceImpl.java:1019)
              at org.opencastproject.index.service.impl.IndexServiceImpl.updateEventMetadata(IndexServiceImpl.java:1273)
              at org.opencastproject.external.endpoint.EventsEndpoint.updateEventMetadataByType(EventsEndpoint.java:1326)
       
       Expected Results:
      The call should be successful
       
       Workaround (if any): None
       
      Apparently, the code tries to locate the creator property field in the updated metadata. However, since this is not the dublincore metadata, looking for it gives a null pointer exception.


      Show
      Steps to reproduce: 1. Create a new CatalogUIAdapterFactory configuration. I created org.opencastproject.ui.metadata.CatalogUIAdapterFactory-episode-beuth.cfg with the content type=events organization=mh_default_org flavor=beuth/episode title=EVENT.METADATA.BEUTH common-metadata=false # Name of the XML root element of the serialized catalog xml.rootElement.name=dublincore # Namespace binding for the XML root element xml.rootElement.namespace.URI= http://doku.beuth-hochschule.de/opencast/metadata/1.0/ # XML namespace bindings xml.namespaceBinding.root.URI= http://doku.beuth-hochschule.de/opencast/metadata/1.0/ xml.namespaceBinding.root.prefix= # Permanent video - no automatic deletion property.permanent.inputID=permanent property.permanent.label=EVENT.METADATA.BEUTH.PERMANENT property.permanent.type=boolean property.permanent.readOnly=false property.permanent.required=false property.permanent.order=0 2. Try setting the new property through the API. I tried curl -v -X PUT -u user:pass -F 'metadata=[{"id":"permanent", "value":true}]' ' https://host/api/events/uuid/metadata?type=beuth/episode'    Actual Results:  HTTP/2 500 The logfile shows a traceback         at org.opencastproject.index.service.impl.IndexServiceImpl.updatePresenters(IndexServiceImpl.java:1019)         at org.opencastproject.index.service.impl.IndexServiceImpl.updateEventMetadata(IndexServiceImpl.java:1273)         at org.opencastproject.external.endpoint.EventsEndpoint.updateEventMetadataByType(EventsEndpoint.java:1326)    Expected Results: The call should be successful    Workaround (if any): None   Apparently, the code tries to locate the creator property field in the updated metadata. However, since this is not the dublincore metadata, looking for it gives a null pointer exception.

      TestRail: Results

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              martin Martin von Löwis
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:

                TestRail: Cases