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

DWG file upload generates 500 error

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 9.10, 10.2
    • Fix Version/s: 9.10-HF22, 10.3
    • Component/s: Convert
    • Release Notes Summary:
      A property is added to control the usage of the generic HTML converter.
    • Backlog priority:
      100
    • Upgrade notes:
      Hide

      Since 9.10-HF22

      A new configuration property nuxeo.preview.allowGenericHTMLConverter is available to disable the generic HTML converter used by the preview when no converter is found to generate HTML. Disable it if you run into an issue when previewing formats that LibreOffice can't handle. It defaults to true to keep backward compatibility.
      To disable the generic HTML converter, use the following contribution:

      <require>org.nuxeo.ecm.platform.preview.properties</require>
      <extension point="configuration" target="org.nuxeo.runtime.ConfigurationService">
        <property name="nuxeo.preview.allowGenericHTMLConverter">false</property>
      </extension>
      

      Since 10.3

      When calling a converter directly though its name, a check is done on its source MIME type to see if it can handle the input blob. A ConversionException is thrown if the converter can't handle it.
      A new configuration property nuxeo.convert.enforceSourceMimeTypeCheck is available to disable this behavior which defaults to true.

      To disable the check, use the following contribution:

      <require>org.nuxeo.ecm.core.convert.configuration</require>
      <extension target="org.nuxeo.runtime.ConfigurationService" point="configuration">
        <property name="nuxeo.convert.enforceSourceMimeTypeCheck">false</property>
      </extension>
      
      Show
      Since 9.10-HF22 A new configuration property nuxeo.preview.allowGenericHTMLConverter is available to disable the generic HTML converter used by the preview when no converter is found to generate HTML. Disable it if you run into an issue when previewing formats that LibreOffice can't handle. It defaults to true to keep backward compatibility. To disable the generic HTML converter, use the following contribution: <require>org.nuxeo.ecm.platform.preview.properties</require> <extension point= "configuration" target= "org.nuxeo.runtime.ConfigurationService" > <property name= "nuxeo.preview.allowGenericHTMLConverter" > false </property> </extension> Since 10.3 When calling a converter directly though its name, a check is done on its source MIME type to see if it can handle the input blob. A ConversionException is thrown if the converter can't handle it. A new configuration property nuxeo.convert.enforceSourceMimeTypeCheck is available to disable this behavior which defaults to true . To disable the check, use the following contribution: <require>org.nuxeo.ecm.core.convert.configuration</require> <extension target= "org.nuxeo.runtime.ConfigurationService" point= "configuration" > <property name= "nuxeo.convert.enforceSourceMimeTypeCheck" > false </property> </extension>
    • Sprint:
      nxfit 10.3.7, nxfit 10.3.8, nxfit 10.10.1, nxfit 10.10.2
    • Story Points:
      3

      Description

      1. install Nuxeo
      2. install Web UI
      3. create a Workspace
      4. create a File document
      5. upload the DWG file attached
      6. this generates the following stack trace:
        2018-09-26 08:49:01,105 ERROR [http-nio-0.0.0.0-8080-exec-5] [org.nuxeo.ecm.webengine.app.WebEngineExceptionMapper] java.lang.NullPointerException
        java.lang.NullPointerException
        	at org.nuxeo.ecm.platform.convert.plugins.CommandLineBasedConverter.execOnBlob(CommandLineBasedConverter.java:145)
        	at org.nuxeo.ecm.platform.convert.plugins.CommandLineBasedConverter.convert(CommandLineBasedConverter.java:93)
        	at org.nuxeo.ecm.core.convert.service.ConversionServiceImpl.convert(ConversionServiceImpl.java:322)
        	at org.nuxeo.ecm.platform.preview.converters.HtmlPreviewConverter.convert(HtmlPreviewConverter.java:118)
        	at org.nuxeo.ecm.core.convert.service.ConversionServiceImpl.convert(ConversionServiceImpl.java:322)
        	at org.nuxeo.ecm.platform.preview.adapter.base.ConverterBasedHtmlPreviewAdapter.getPreviewBlobs(ConverterBasedHtmlPreviewAdapter.java:171)
        	at org.nuxeo.ecm.platform.preview.adapter.base.ConverterBasedHtmlPreviewAdapter.getPreviewBlobs(ConverterBasedHtmlPreviewAdapter.java:124)
        	at org.nuxeo.ecm.platform.preview.adapter.base.AbstractHtmlPreviewAdapter.getFilePreviewBlobs(AbstractHtmlPreviewAdapter.java:119)
        	at org.nuxeo.ecm.restapi.server.jaxrs.adapters.PreviewAdapter.getPreviewBlobs(PreviewAdapter.java:148)
        	at org.nuxeo.ecm.restapi.server.jaxrs.adapters.PreviewAdapter.preview(PreviewAdapter.java:83)
        	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        	at java.lang.reflect.Method.invoke(Method.java:498)
        	at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
        	at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ObjectOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:258)
        	at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
        	at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302)
        	at com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:137)
        	at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
        	at com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:137)
        	at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
        	at com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:137)
        	at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
        	at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
        	at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
        	at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
        	at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1542)
        	at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1473)
        	at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1419)
        	at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1409)
        	at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:409)
        	at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:558)
        	at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:733)
        
      7. this also spawns several pdftohtml processes that take 100% cpu while attempting conversion (probably for the thumbnails)
      8. wait about 5 minutes
      9. open the Chrome inspector and the Network tab
      10. consult the newly created document
      11. observe a preview is now available (see previewDone.png)
      12. observe there are many network traffic leading to an infinite loop leading the browser to 100% cpu usage

      Expected behavior:: unsupported file types should not raise any exception and there should not be any preview or conversion in this case, thus not leading to pdftohtml processes taking 100% cpu.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 2 days, 6 hours, 30 minutes
                  2d 6h 30m

                    PagerDuty

                    Error rendering 'com.pagerduty.jira-server-plugin:PagerDuty'. Please contact your Jira administrators.