• [SOLVED] Preview fails

  • OpenKM has many interesting features, but requires some configuration process to show its full potential.
OpenKM has many interesting features, but requires some configuration process to show its full potential.
Forum rules: Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
 #28578  by JackRogers
 
Server version: Apache Tomcat/7.0.27
OS Name: Linux
OS Version: 2.6.32-431.el6.x86_64
Architecture: amd64
JVM Version: 1.7.0_40-b43
JVM Vendor: Oracle Corporation
Note: SELinux IS enabled. :(

When attempting to preview a document, I get the following error:
Conversion: IO exception executing command:
(and there is no command listed.

In the catalina.log file there is this, that seems related:
Code: Select all
Caused by: java.io.IOException: Cannot run program "": error=2, No such file or directory
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:1041)
        at com.openkm.util.ExecutionUtils.runCmdImpl(ExecutionUtils.java:257)
        at com.openkm.util.ExecutionUtils.runCmd(ExecutionUtils.java:237)
        at com.openkm.util.DocConverter.pdf2swf(DocConverter.java:472)
        ... 42 more
This may also be helpful:
Code: Select all
ls -l /opt/openkm-6.2.5-community/tomcat/bin/pdf2swf
-rwxrwxr-x. 1 root root 4027300 Apr  3  2013 /opt/openkm-6.2.5-community/tomcat/bin/pdf2swf
And because it's selinux:
Code: Select all
ls -ladZ /opt/openkm-6.2.5-community/tomcat/bin/pdf2swf
-rwxrwxr-x. root root unconfined_u:object_r:usr_t:s0   /opt/openkm-6.2.5-community/tomcat/bin/pdf2swf
Is SELinux the problem?

Thanks.
Jack
Last edited by JackRogers on Fri May 16, 2014 3:03 pm, edited 3 times in total.
 #28583  by JackRogers
 
I'm getting a little closer. I had overlooked the configuration options in the Administration panel. So I added the path to pdf2swf, and the path to soffice.bin and restarted catalina. The original error is gone, but now I get one that simply says "Conversion:" The catalina.out log says:
Code: Select all
ERROR com.openkm.servlet.frontend.ConverterServlet -
com.openkm.core.ConversionException:
        at com.openkm.util.DocConverter.pdf2swf(DocConverter.java:475)
        at com.openkm.servlet.frontend.ConverterServlet.toSWF(ConverterServlet.java:271)
        at com.openkm.servlet.frontend.ConverterServlet.service(ConverterServlet.java:144)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:311)
        at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:116)
        at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
        at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
        at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:101)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
        at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
        at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
        at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
        at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:182)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
        at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
        at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:173)
        at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
        at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
        at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:999)
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:565)
        at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:309)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:724)
I guess that's progress, so I'll keep working on it. Maybe someone will be able to assist.

Jack
 #28584  by JackRogers
 
Ah, I found it in the documentation. To enable PDF previews. I needed to start with
Enable Document Preview, and read it more carefully.

The last error was because,
Since OpenKM 5.1.9 the pdf2swf command line parameters should be added in the configuration property, for example:
system.swftools.pdf2swf=/usr/bin/pdf2swf -T 9 -f ${fileIn} -o ${fileOut}
so now I'm moving forward. It now works with PDF documents (only). It still does not work with OpenOffice or MS Word doc files.

I have the path defined for soffice.bin. I have tried both LibreOffice and OpenOffice, and I get the same errors. As directed in OpenOffice configuration issues, I attempted to download an OpenOffice text file as a PDF. It produced the same error as seen when trying to preview the document.

Jack
 #28588  by JackRogers
 
Fixed. I finally found the configuration checker utility and it showed me that the path I had entered for "soffice.bin" was not correct. The wiki documentation is INCORRECT on this. It says to enter the path to the location for "soffice.bin" but it really needed the path to the OpenOffice or LibreOffice application. It appends "program/soffice.bin" to whatever you put in this configuration option.

Jack
 #28599  by jllort
 
Can you provide us the wiki url and we'll try to explain it better.
 #28617  by JackRogers
 
jllort wrote:Can you provide us the wiki url and we'll try to explain it better.
I thought I followed instructions to enter the full path to soffice.bin in the system.openoffice.path parameter. However, now I cannot find any wiki page that says to do that. Perhaps I simply misread "OpenOffice configuration issues"where it says
Inside the path define at system.openoffice.path you should see a directory called program, where can see soffice.bin file. This file is used by OpenKM to start the OpenOffice / LibreOffice service. I included the full path (including the "program" directory) and of course that did not work. It should be the path to the OpenOffice (or LibreOffice) program.

Thanks.
Jack

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.