Uploaded image for project: 'DSpace'
  1. DSpace
  2. DS-421

Setting solr.metadata.item.X property to an unqualified field generates exception in SolrLogger.post on item view and prevents Solr from logging the event

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.6.0
    • Fix Version/s: 1.6.0
    • Component/s: DSpace API
    • Labels:
      None
    • Attachments:
      0
    • Comments:
      5
    • Documentation Status:
      Needed

      Description

      Setting a solr.metadata.item.X property to an unqualified field (e.g., dc.title rather then dc.title.alternative) generates an exception in SolrLogger.post on item view. The ArrayIndexOutOfBoundsException appear to prevent Solr from logging the event.

      The stacktrace from the logs is:

      java.lang.ArrayIndexOutOfBoundsException: 2
      at org.dspace.statistics.SolrLogger.post(SolrLogger.java:216)
      at org.dspace.statistics.SolrLoggerUsageEventListener.receiveEvent(SolrLoggerUsageEventListener.java:48)
      at org.dspace.services.events.SystemEventService.fireLocalEvent(SystemEventService.java:154)
      at org.dspace.services.events.SystemEventService.fireEvent(SystemEventService.java:97)
      at org.dspace.app.xmlui.cocoon.UsageLoggerAction.logDspaceObject(UsageLoggerAction.java:61)
      [...]

      This is similar to DS-419 in that a metadata field like 'schema.element' is being split into an array and the methods is then trying to access non-existent 3rd element of the array (i.e., array[2], representing the qualifier) without checking the array length first.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              mdiggory Mark Diggory
              Reporter:
              shanrath Scott Hanrath
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: