Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-21424

Exiftool processing should ignore warnings

    XMLWordPrintable

    Details

      Description

      Some files provoke this error:

      16:38:52,206 ERROR [EventServiceImpl] Exception during binaryMetadataSyncListener sync listener execution, continuing to run other listeners
      org.nuxeo.binary.metadata.api.BinaryMetadataException: org.codehaus.jackson.JsonParseException: Unexpected character ('W' (code 87)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')
       at [Source: java.io.StringReader@7a0c4f08; line: 1, column: 2]
      	at org.nuxeo.binary.metadata.internals.ExifToolProcessor.readMetadata(ExifToolProcessor.java:141)
      	at org.nuxeo.binary.metadata.internals.ExifToolProcessor.readMetadata(ExifToolProcessor.java:149)
      	at org.nuxeo.binary.metadata.internals.BinaryMetadataServiceImpl.readMetadata(BinaryMetadataServiceImpl.java:65)
      	at org.nuxeo.binary.metadata.internals.BinaryMetadataServiceImpl.writeMetadata(BinaryMetadataServiceImpl.java:190)
      	at org.nuxeo.binary.metadata.internals.BinaryMetadataServiceImpl.writeMetadata(BinaryMetadataServiceImpl.java:165)
      	at org.nuxeo.binary.metadata.internals.BinaryMetadataServiceImpl.handleUpdate(BinaryMetadataServiceImpl.java:250)
      	at org.nuxeo.binary.metadata.internals.BinaryMetadataServiceImpl.handleSyncUpdate(BinaryMetadataServiceImpl.java:231)
      	at org.nuxeo.binary.metadata.internals.listeners.BinaryMetadataSyncListener.handleEvent(BinaryMetadataSyncListener.java:59)
      	at org.nuxeo.ecm.core.event.impl.EventServiceImpl.fireEvent(EventServiceImpl.java:242)
      	at org.nuxeo.ecm.core.api.AbstractSession.notifyEvent(AbstractSession.java:272)
      	at org.nuxeo.ecm.core.api.AbstractSession.saveDocument(AbstractSession.java:1444)
      	at org.nuxeo.ecm.webapp.contentbrowser.DocumentActionsBean.updateDocument(DocumentActionsBean.java:240)
      	at org.nuxeo.ecm.webapp.contentbrowser.DocumentActionsBean.updateDocument(DocumentActionsBean.java:264)
      	at org.nuxeo.ecm.webapp.contentbrowser.DocumentActionsBean.updateCurrentDocument(DocumentActionsBean.java:270)
      Caused by: org.codehaus.jackson.JsonParseException: Unexpected character ('W' (code 87)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')
       at [Source: java.io.StringReader@7a0c4f08; line: 1, column: 2]
      	at org.codehaus.jackson.JsonParser._constructError(JsonParser.java:1291)
      	at org.codehaus.jackson.impl.JsonParserMinimalBase._reportError(JsonParserMinimalBase.java:385)
      	at org.codehaus.jackson.impl.JsonParserMinimalBase._reportUnexpectedChar(JsonParserMinimalBase.java:306)
      	at org.codehaus.jackson.impl.ReaderBasedParser._handleUnexpectedValue(ReaderBasedParser.java:628)
      	at org.codehaus.jackson.impl.ReaderBasedParser.nextToken(ReaderBasedParser.java:362)
      	at org.codehaus.jackson.map.ObjectMapper._initForReading(ObjectMapper.java:2428)
      	at org.codehaus.jackson.map.ObjectMapper._readMapAndClose(ObjectMapper.java:2385)
      	at org.codehaus.jackson.map.ObjectMapper.readValue(ObjectMapper.java:1598)
      	at org.nuxeo.binary.metadata.internals.ExifToolProcessor.returnResultMap(ExifToolProcessor.java:171)
      	at org.nuxeo.binary.metadata.internals.ExifToolProcessor.readMetadata(ExifToolProcessor.java:137)
      	... 114 more
      

      This is due to a conversion like

      exiftool -m -G -json -IPTC:Source -IPTC:CopyrightNotice -IPTC:Description /tmp/nxblob-667306342854244865.jpg  
      

      that returns:

      Warning: Invalid EXIF text encoding for UserComment - /tmp/nxblob-667306342854244865.jpg
      [{
        "SourceFile": "/tmp/nxblob-667306342854244865.jpg"
      }]
      

      The initial warning cannot be parsed and should be suppressed through the -q -q option

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 30 minutes
                  30m