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

Fix picture views generation for WordPerfect Graphics image file (wpg)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 10.10
    • Fix Version/s: HOTFIX_10.10, 11.x
    • Component/s: Convert
    • Backlog priority:
      500
    • Sprint:
      CB Sprint 7, CB Sprint 8

      Description

      Picture views don't get generated when a wpg is uploaded to a Picture document. The following errors appears in the server.log file:

      020-08-08T17:05:02,645 ERROR [Nuxeo-Work-pictureViewsGeneration-1:default:394e9c39-f213-4187-8745-6edca7010ca9:file:content:pictureView] [org.nuxeo.runtime.transaction.TransactionHelper] Could not mark transaction as rollback only
      java.lang.IllegalStateException: No transaction associated with current thread
      	at org.apache.geronimo.transaction.manager.TransactionManagerImpl.setRollbackOnly(TransactionManagerImpl.java:241) ~[geronimo-transaction-2.2.1.jar:2.2.1]
      	at org.nuxeo.runtime.jtajca.NuxeoContainer$UserTransactionImpl.setRollbackOnly(NuxeoContainer.java:510) ~[nuxeo-runtime-jtajca-10.10-HF14.jar:?]
      	at org.nuxeo.runtime.transaction.TransactionHelper.setTransactionRollbackOnly(TransactionHelper.java:504) ~[nuxeo-runtime-jtajca-10.10-HF14.jar:?]
      	at org.nuxeo.ecm.automation.OperationContext.setRollback(OperationContext.java:219) ~[nuxeo-automation-core-10.10-HF25.jar:?]
      	at org.nuxeo.ecm.automation.core.impl.OperationServiceImpl.run(OperationServiceImpl.java:128) ~[nuxeo-automation-core-10.10-HF25.jar:?]
      	at org.nuxeo.ecm.automation.core.impl.OperationServiceImpl.lambda$run$0(OperationServiceImpl.java:105) ~[nuxeo-automation-core-10.10-HF25.jar:?]
      	at org.nuxeo.ecm.automation.OperationContext.call(OperationContext.java:326) [nuxeo-automation-core-10.10-HF25.jar:?]
      	at org.nuxeo.ecm.automation.OperationContext.callWithChainParameters(OperationContext.java:291) [nuxeo-automation-core-10.10-HF25.jar:?]
      	at org.nuxeo.ecm.automation.core.impl.OperationServiceImpl.run(OperationServiceImpl.java:105) [nuxeo-automation-core-10.10-HF25.jar:?]
      	at org.nuxeo.ecm.platform.picture.ImagingComponent.callPictureConversionChain(ImagingComponent.java:462) [nuxeo-platform-imaging-core-10.10-HF21.jar:?]
      	at org.nuxeo.ecm.platform.picture.ImagingComponent.computeView(ImagingComponent.java:404) [nuxeo-platform-imaging-core-10.10-HF21.jar:?]
      	at org.nuxeo.ecm.platform.picture.ImagingComponent.computeView(ImagingComponent.java:288) [nuxeo-platform-imaging-core-10.10-HF21.jar:?]
      	at org.nuxeo.ecm.platform.picture.ImagingComponent.computeViewsFor(ImagingComponent.java:485) [nuxeo-platform-imaging-core-10.10-HF21.jar:?]
      	at org.nuxeo.ecm.platform.picture.api.adapters.AbstractPictureAdapter.addViews(AbstractPictureAdapter.java:295) [nuxeo-platform-imaging-api-10.10-HF11.jar:?]
      	at org.nuxeo.ecm.platform.picture.api.adapters.DefaultPictureAdapter.fillPictureViews(DefaultPictureAdapter.java:98) [nuxeo-platform-imaging-api-10.10-HF11.jar:?]
      	at org.nuxeo.ecm.platform.picture.PictureViewsGenerationWork.work(PictureViewsGenerationWork.java:120) [nuxeo-platform-imaging-core-10.10-HF21.jar:?]
      	at org.nuxeo.ecm.core.work.AbstractWork.runWorkWithTransaction(AbstractWork.java:493) [nuxeo-core-event-10.10-HF30.jar:?]
      	at org.nuxeo.ecm.core.work.AbstractWork.run(AbstractWork.java:383) [nuxeo-core-event-10.10-HF30.jar:?]
      	at org.nuxeo.ecm.core.work.WorkHolder.run(WorkHolder.java:57) [nuxeo-core-event-10.10-HF30.jar:?]
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_265]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_265]
      	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_265]
      2020-08-08T17:05:02,647 WARN  [Nuxeo-Work-pictureViewsGeneration-1:default:394e9c39-f213-4187-8745-6edca7010ca9:file:content:pictureView] [org.nuxeo.ecm.platform.picture.ImagingComponent] Unable to compute view: Thumbnail2 for document: DocumentModelImpl(394e9c39-f213-4187-8745-6edca7010ca9, path=/default-domain/workspaces/SUPNXP-31127/SUPNXP-31127 Picture 2, title=SUPNXP-31127 Picture 2) exception message: Failed to invoke operation Blob.RunConverter, application/x-wpg mime type not supported by pictureResize converter
      2020-08-08T17:05:02,651 WARN  [Nuxeo-Work-pictureViewsGeneration-1:default:394e9c39-f213-4187-8745-6edca7010ca9:file:content:pictureView] [org.nuxeo] <Image.Blob.Resize> jpg / 100 / 53 / 8
      2020-08-08T17:05:02,651 INFO  [Nuxeo-Work-pictureViewsGeneration-1:default:394e9c39-f213-4187-8745-6edca7010ca9:file:content:pictureView] [org.nuxeo.ecm.automation.core.trace.Trace] 
      
      ****** chain ******
      Name: Image.Blob.Resize
      Produced output type: Void
      ****** Hierarchy calls ******
      	
      
      ****** Log ******
      Chain ID: Image.Blob.Resize
      Chain Aliases: []
      Class: LogOperation
      Method: 'run' | Input Type: void | Output Type: void
      Input: org.nuxeo.ecm.core.blob.binary.BinaryBlob@c33aa82c
      Parameters  | Name: level, Value: warn | Name: message, Value: Expr:(id=message | value=<Image.Blob.Resize> jpg / 100 / 53 / 8) | Name: category, Value: org.nuxeo
      Context Variables | Key: pictureDocument, Value: DocumentModelImpl(394e9c39-f213-4187-8745-6edca7010ca9, path=/default-domain/workspaces/SUPNXP-31127/SUPNXP-31127 Picture 2, title=SUPNXP-31127 Picture 2) | Key: ChainParameters, Value: {parameters={conversionFormat=jpg, depth=8, width=100, height=53}}		
      
      ****** Blob.RunConverter ******
      Chain ID: Image.Blob.Resize
      Chain Aliases: []
      Class: RunConverter
      Method: 'run' | Input Type: org.nuxeo.ecm.core.api.Blob | Output Type: org.nuxeo.ecm.core.api.Blob
      Input: org.nuxeo.ecm.core.blob.binary.BinaryBlob@c33aa82c
      Parameters  | Name: converter, Value: pictureResize
      Context Variables | Key: pictureDocument, Value: DocumentModelImpl(394e9c39-f213-4187-8745-6edca7010ca9, path=/default-domain/workspaces/SUPNXP-31127/SUPNXP-31127 Picture 2, title=SUPNXP-31127 Picture 2) | Key: ChainParameters, Value: {parameters={conversionFormat=jpg, depth=8, width=100, height=53}}
      2020-08-08T17:05:02,652 ERROR [Nuxeo-Work-pictureViewsGeneration-1:default:394e9c39-f213-4187-8745-6edca7010ca9:file:content:pictureView] [org.nuxeo.runtime.transaction.TransactionHelper] Could not mark transaction as rollback only
      java.lang.IllegalStateException: No transaction associated with current thread
      	at org.apache.geronimo.transaction.manager.TransactionManagerImpl.setRollbackOnly(TransactionManagerImpl.java:241) ~[geronimo-transaction-2.2.1.jar:2.2.1]
      	at org.nuxeo.runtime.jtajca.NuxeoContainer$UserTransactionImpl.setRollbackOnly(NuxeoContainer.java:510) ~[nuxeo-runtime-jtajca-10.10-HF14.jar:?]
      	at org.nuxeo.runtime.transaction.TransactionHelper.setTransactionRollbackOnly(TransactionHelper.java:504) ~[nuxeo-runtime-jtajca-10.10-HF14.jar:?]
      	at org.nuxeo.ecm.automation.OperationContext.setRollback(OperationContext.java:219) ~[nuxeo-automation-core-10.10-HF25.jar:?]
      	at org.nuxeo.ecm.automation.core.impl.OperationServiceImpl.run(OperationServiceImpl.java:128) ~[nuxeo-automation-core-10.10-HF25.jar:?]
      	at org.nuxeo.ecm.automation.core.impl.OperationServiceImpl.lambda$run$0(OperationServiceImpl.java:105) ~[nuxeo-automation-core-10.10-HF25.jar:?]
      	at org.nuxeo.ecm.automation.OperationContext.call(OperationContext.java:326) [nuxeo-automation-core-10.10-HF25.jar:?]
      	at org.nuxeo.ecm.automation.OperationContext.callWithChainParameters(OperationContext.java:291) [nuxeo-automation-core-10.10-HF25.jar:?]
      	at org.nuxeo.ecm.automation.core.impl.OperationServiceImpl.run(OperationServiceImpl.java:105) [nuxeo-automation-core-10.10-HF25.jar:?]
      	at org.nuxeo.ecm.platform.picture.ImagingComponent.callPictureConversionChain(ImagingComponent.java:462) [nuxeo-platform-imaging-core-10.10-HF21.jar:?]
      	at org.nuxeo.ecm.platform.picture.ImagingComponent.computeView(ImagingComponent.java:404) [nuxeo-platform-imaging-core-10.10-HF21.jar:?]
      	at org.nuxeo.ecm.platform.picture.ImagingComponent.computeView(ImagingComponent.java:288) [nuxeo-platform-imaging-core-10.10-HF21.jar:?]
      	at org.nuxeo.ecm.platform.picture.ImagingComponent.computeViewsFor(ImagingComponent.java:485) [nuxeo-platform-imaging-core-10.10-HF21.jar:?]
      	at org.nuxeo.ecm.platform.picture.api.adapters.AbstractPictureAdapter.addViews(AbstractPictureAdapter.java:295) [nuxeo-platform-imaging-api-10.10-HF11.jar:?]
      	at org.nuxeo.ecm.platform.picture.api.adapters.DefaultPictureAdapter.fillPictureViews(DefaultPictureAdapter.java:98) [nuxeo-platform-imaging-api-10.10-HF11.jar:?]
      	at org.nuxeo.ecm.platform.picture.PictureViewsGenerationWork.work(PictureViewsGenerationWork.java:120) [nuxeo-platform-imaging-core-10.10-HF21.jar:?]
      	at org.nuxeo.ecm.core.work.AbstractWork.runWorkWithTransaction(AbstractWork.java:493) [nuxeo-core-event-10.10-HF30.jar:?]
      	at org.nuxeo.ecm.core.work.AbstractWork.run(AbstractWork.java:383) [nuxeo-core-event-10.10-HF30.jar:?]
      	at org.nuxeo.ecm.core.work.WorkHolder.run(WorkHolder.java:57) [nuxeo-core-event-10.10-HF30.jar:?]
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_265]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_265]
      	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_265]
      2020-08-08T17:05:02,652 WARN  [Nuxeo-Work-pictureViewsGeneration-1:default:394e9c39-f213-4187-8745-6edca7010ca9:file:content:pictureView] [org.nuxeo.ecm.platform.picture.ImagingComponent] Unable to compute view: Thumbnail for document: DocumentModelImpl(394e9c39-f213-4187-8745-6edca7010ca9, path=/default-domain/workspaces/SUPNXP-31127/SUPNXP-31127 Picture 2, title=SUPNXP-31127 Picture 2) exception message: Failed to invoke operation Blob.RunConverter, application/x-wpg mime type not supported by pictureResize converter
      2020-08-08T17:05:02,658 WARN  [Nuxeo-Work-pictureViewsGeneration-1:default:394e9c39-f213-4187-8745-6edca7010ca9:file:content:pictureView] [org.nuxeo] <Image.Blob.Resize> jpg / 560 / 298 / 8
      2020-08-08T17:05:02,659 INFO  [Nuxeo-Work-pictureViewsGeneration-1:default:394e9c39-f213-4187-8745-6edca7010ca9:file:content:pictureView] [org.nuxeo.ecm.automation.core.trace.Trace] 
      

      The following XML extension fixes the issue:

        <extension point="mimetype" target="org.nuxeo.ecm.platform.mimetype.service.MimetypeRegistryService">
      
          <mimetype binary="true" iconPath="image.gif" normalized="image/wpg">
            <mimetypes>
              <mimetype>application/wpg</mimetype>
              <mimetype>application/x-wpg</mimetype>
              <mimetype>image/x-wpg</mimetype>
              <mimetype>image/x-wordperfect-graphics</mimetype>
            </mimetypes>
            <extensions>
              <extension>wpg</extension>
            </extensions>
          </mimetype>
      
        </extension>
      
      <require>org.nuxeo.ecm.platform.picture.convert</require>
        <extension target="org.nuxeo.ecm.core.convert.service.ConversionServiceImpl"
          point="converter">
      
          <converter class="org.nuxeo.ecm.platform.picture.convert.ResizePictureConverter" name="pictureResize">
            <sourceMimeType>image/*</sourceMimeType>
            <sourceMimeType>application/photoshop</sourceMimeType>
            <sourceMimeType>application/illustrator</sourceMimeType>
            <sourceMimeType>application/postscript</sourceMimeType>
            <sourceMimeType>application/pdf</sourceMimeType>
            <destinationMimeType>image/jpeg</destinationMimeType>
            <destinationMimeType>image/png</destinationMimeType>
            <destinationMimeType>image/gif</destinationMimeType>
            <sourceMimeType>image/wpg</sourceMimeType> <!-- NEW -->
          </converter>
      
        </extension>
      
        <require>org.nuxeo.ecm.platform.picture.filemanager.contrib</require>
        <extension target="org.nuxeo.ecm.platform.filemanager.service.FileManagerService"
          point="plugins">
      
          <plugin class="org.nuxeo.ecm.platform.picture.extension.ImagePlugin" name="Imageplugin" order="10">
            <filter>image/jpeg</filter>
            <filter>image/gif</filter>
            <filter>image/png</filter>
            <filter>image/tiff</filter>
            <filter>image/bmp</filter>
            <filter>image/x-ms-bmp</filter>
            <!-- RAW images mime type -->
            <filter>image/x-canon-cr2</filter>
            <filter>image/x-canon-crw</filter>
            <filter>image/x-nikon-nef</filter>
            <filter>image/x-adobe-dng</filter>
            <filter>image/x-panasonic-raw</filter>
            <filter>image/x-fuji-raf</filter>
            <filter>image/x-sigma-x3f</filter>
            <filter>image/x-pentax-pef</filter>
            <filter>image/x-kodak-dcr</filter>
            <filter>image/x-kodak-kdc</filter>
            <filter>image/x-sony-sr2</filter>
            <filter>image/x-sony-arw</filter>
            <filter>image/x-sony-srf</filter>
            <filter>image/x-minolta-mrw</filter>
            <filter>image/x-olympus-orf</filter>
            <filter>image/x-raw-epson</filter>
            <filter>image/x-portable-pixmap</filter>
            <filter>image/x-dpx</filter>
      
            <filter>image/raw</filter>
            <filter>image/x-raw</filter>
      
            <filter>image/svg.*</filter>
      
            <filter>application/photoshop</filter>
            <filter>application/illustrator</filter>
            <filter>application/postscript</filter>
      
            <filter>image/wpg</filter> <!-- NEW -->
          </plugin>
      
        </extension>
      

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated: