cancel
Showing results for 
Search instead for 
Did you mean: 

Live preview of PDF files not working: Error while converting via CommandLineService

Antony_
Champ in-the-making
Champ in-the-making

Hello,

I'm using Nuxeo 7.2. on Windows Server 2008 R2. When I try to preview a pdf file I get the following message:

Technical issue: Blob path: default org.nuxeo.ecm.platform.preview.api.PreviewException: Error while converting via CommandLineService

(Full stack trace follows)

PDF generation works and thumbnails of pdf in advanced search also works.

If I examine the command that is failing:

cmd /C pdftohtml -c -enc UTF-8 -noframes "C:\ProgramData\Nuxeo\tmp\nxblob-7304333945179266011.pdf" "C:\ProgramData\Nuxeo\tmp\pdf2html_1430317720612"\index.html

I can see that the folder "C:\ProgramData\Nuxeo\tmp\pdf2html_1430317720612" is created but the temporary pdf file ("C:\ProgramData\Nuxeo\tmp\nxblob-7304333945179266011.pdf") does not exist.

pdf2html got installed by the Windows Installer and seems to work since I can generate pdf from office documents but it's not in my system path: if I write pdf2html in a standard command line it does not get found.

Here is the stack trace of the error:


2015-04-29 10:28:40,643 ERROR [http-bio-0.0.0.0-80-exec-6] [org.nuxeo.ecm.platform.preview.restlet.PreviewRestlet] Could not build preview for missing blob at default org.nuxeo.ecm.platform.preview.api.PreviewException: Error while converting via CommandLineService at org.nuxeo.ecm.platform.preview.adapter.base.ConverterBasedHtmlPreviewAdapter.getPreviewBlobs(ConverterBasedHtmlPreviewAdapter.java:122) at org.nuxeo.ecm.platform.preview.adapter.base.ConverterBasedHtmlPreviewAdapter.getPreviewBlobs(ConverterBasedHtmlPreviewAdapter.java:91) at org.nuxeo.ecm.platform.preview.adapter.base.AbstractHtmlPreviewAdapter.getFilePreviewBlobs(AbstractHtmlPreviewAdapter.java:118) at org.nuxeo.ecm.platform.preview.restlet.PreviewRestlet.initCachedBlob(PreviewRestlet.java:201) at org.nuxeo.ecm.platform.preview.restlet.PreviewRestlet.handle(PreviewRestlet.java:136) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.jboss.seam.util.Reflections.invoke(Reflections.java:22) at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:32) at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56) at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:28) at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:79) at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) at org.nuxeo.ecm.platform.ui.web.util.NuxeoExceptionInterceptor.aroundInvoke(NuxeoExceptionInterceptor.java:78) at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44) at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107) at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:196) at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:114) at org.nuxeo.ecm.platform.preview.restlet.PreviewRestlet_$$javassist_seam_84.handle(PreviewRestlet$$_javassist_seam_84.java) at org.nuxeo.ecm.platform.ui.web.restAPI.SeamRestletFilter.doHandle(SeamRestletFilter.java:127) at org.restlet.Filter.handle(Filter.java:134) at org.restlet.Filter.doHandle(Filter.java:105) at org.restlet.Filter.handle(Filter.java:134) at org.restlet.Router.handle(Router.java:444) at com.noelios.restlet.ext.servlet.ServletConverter.service(ServletConverter.java:129) at org.nuxeo.ecm.platform.ui.web.restAPI.RestletServlet.service(RestletServlet.java:122) at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.nuxeo.wss.servlet.BaseWSSFilter.doFilter(BaseWSSFilter.java:127) at org.nuxeo.wss.servlet.FailSafeWSSFilter.doFilter(FailSafeWSSFilter.java:56) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.nuxeo.ecm.platform.web.common.requestcontroller.filter.NuxeoThreadTrackerFilter.doFilter(NuxeoThreadTrackerFilter.java:28) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.nuxeo.ecm.core.management.jtajca.internal.Log4jWebFilter.doFilter(Log4jWebFilter.java:67) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.nuxeo.ecm.platform.ui.web.rest.FancyURLFilter.doFilter(FancyURLFilter.java:118) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.nuxeo.ecm.mobile.filter.ApplicationRedirectionFilter.doNoRedirect(ApplicationRedirectionFilter.java:163) at org.nuxeo.ecm.mobile.filter.ApplicationRedirectionFilter.doFilter(ApplicationRedirectionFilter.java:93) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.nuxeo.ecm.platform.web.common.requestcontroller.filter.NuxeoRequestControllerFilter.doFilter(NuxeoRequestControllerFilter.java:139) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.nuxeo.ecm.webdav.service.WIRequestFilter.doFilter(WIRequestFilter.java:58) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.nuxeo.ecm.platform.ui.web.auth.NuxeoAuthenticationFilter.doFilterInternal(NuxeoAuthenticationFilter.java:578) at org.nuxeo.ecm.platform.ui.web.auth.service.NuxeoAuthFilterChain.doFilter(NuxeoAuthFilterChain.java:36) at org.nuxeo.ecm.platform.ui.web.auth.oauth.NuxeoOAuthFilter.doFilter(NuxeoOAuthFilter.java:120) at org.nuxeo.ecm.platform.ui.web.auth.service.NuxeoAuthFilterChain.doFilter(NuxeoAuthFilterChain.java:34) at org.nuxeo.ecm.platform.ui.web.auth.oauth2.NuxeoOAuth2Filter.doFilter(NuxeoOAuth2Filter.java:68) at org.nuxeo.ecm.platform.ui.web.auth.service.NuxeoAuthFilterChain.doFilter(NuxeoAuthFilterChain.java:34) at org.nuxeo.ecm.platform.ui.web.auth.NuxeoAuthenticationFilter.doFilter(NuxeoAuthenticationFilter.java:391) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.nuxeo.ecm.platform.web.common.requestcontroller.filter.NuxeoCorsFilter.doFilter(NuxeoCorsFilter.java:49) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.nuxeo.ecm.platform.web.common.exceptionhandling.NuxeoExceptionFilter.doFilter(NuxeoExceptionFilter.java:75) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.nuxeo.ecm.platform.web.common.encoding.NuxeoEncodingFilter.doFilter(NuxeoEncodingFilter.java:73) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:503) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Unknown Source) Caused by: org.nuxeo.ecm.core.convert.api.ConversionException: Error while converting via CommandLineService at org.nuxeo.ecm.platform.convert.plugins.CommandLineBasedConverter.execOnBlob(CommandLineBasedConverter.java:166) at org.nuxeo.ecm.platform.convert.plugins.CommandLineBasedConverter.convert(CommandLineBasedConverter.java:91) at org.nuxeo.ecm.core.convert.service.ConversionServiceImpl.convert(ConversionServiceImpl.java:187) at org.nuxeo.ecm.platform.preview.converters.HtmlPreviewConverter.convert(HtmlPreviewConverter.java:123) at org.nuxeo.ecm.core.convert.service.ConversionServiceImpl.convert(ConversionServiceImpl.java:187) at org.nuxeo.ecm.platform.preview.adapter.base.ConverterBasedHtmlPreviewAdapter.getPreviewBlobs(ConverterBasedHtmlPreviewAdapter.java:118) ... 91 more Caused by: org.nuxeo.ecm.platform.commandline.executor.api.CommandException: Error code -1073741515 return by command: cmd /C pdftohtml -c -enc UTF-8 -noframes "C:\ProgramData\Nuxeo\tmp\nxblob-7304333945179266011.pdf" "C:\ProgramData\Nuxeo\tmp\pdf2html_1430317720612"\index.html

at org.nuxeo.ecm.platform.commandline.executor.api.ExecResult.<init>(ExecResult.java:60)
at org.nuxeo.ecm.platform.commandline.executor.service.executors.ShellExecutor.exec(ShellExecutor.java:94)
at org.nuxeo.ecm.platform.commandline.executor.service.CommandLineExecutorComponent.execCommand(CommandLineExecutorComponent.java:155)
at org.nuxeo.ecm.platform.convert.plugins.CommandLineBasedConverter.execOnBlob(CommandLineBasedConverter.java:157)
... 96 more
0 REPLIES 0
Getting started

Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.