• Preview problems

  • 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.
 #22454  by jnko
 
I've setup openkm and everything works fine except preview. I tried to track down the problem already but unfortunately I can't figure out excatly what's going wrong.

What I got from the source is the following: WhenI upload a .jpg Picture to okm and want to preview it sould be converted with imagemagick 'convert' to pdf and then from pdf to .swf (flash).

What happens is the following: The uploaded picture is being converted to a corrupt pdf and the following pdf2swf is failing too.
In this case the file repository/cache/pdf/4095941a-7a63-47a4-a9b3-9edb18b54170.pdf (and any other also) is a pre-defined swf file, wrong named with the .pdf extension, which contains the message: "There was a problem with the conversion generation. Please contact yout OpenKM administrator."

The log tells that the conversion jpg->pdf was fine, but I assume that something goes wrong at this point. Running convert by hand works of course...

Here's the debug log. Any idea/hint someone, please?!


TIA
Code: Select all
2013-04-11 13:42:59,894 [http-bio-0.0.0.0-8080-exec-1] DEBUG com.openkm.util.DocConverter - convertibleToPdf(image/jpeg)
2013-04-11 13:42:59,894 [http-bio-0.0.0.0-8080-exec-1] DEBUG com.openkm.util.DocConverter - convertibleToPdf: true
2013-04-11 13:42:59,894 [http-bio-0.0.0.0-8080-exec-1] DEBUG com.openkm.util.DocConverter - convertibleToSwf(image/jpeg)
2013-04-11 13:42:59,894 [http-bio-0.0.0.0-8080-exec-1] DEBUG com.openkm.util.DocConverter - convertibleToSwf: true
2013-04-11 13:42:59,895 [http-bio-0.0.0.0-8080-exec-1] DEBUG com.openkm.util.UserActivity - {id=0, date=Thu Apr 11 13:42:59 CEST 2013, user=okmAdmin, action=GET_DOCUMENT_PROPERTIES, item=4095941a-7a63-47a4-a9b3-9edb18b54170, path=/okm:root/TestOCR1-Screenshot.jpg, params=null}
2013-04-11 13:42:59,895 [http-bio-0.0.0.0-8080-exec-1] DEBUG com.openkm.util.PathUtils - getName(/okm:root/TestOCR1-Screenshot.jpg)
2013-04-11 13:42:59,895 [http-bio-0.0.0.0-8080-exec-1] DEBUG com.openkm.util.PathUtils - getName: TestOCR1-Screenshot.jpg
2013-04-11 13:42:59,895 [http-bio-0.0.0.0-8080-exec-1] DEBUG com.openkm.util.FileUtils - getFileExtension(TestOCR1-Screenshot.jpg)
2013-04-11 13:42:59,896 [http-bio-0.0.0.0-8080-exec-1] DEBUG com.openkm.util.FileUtils - getFileExtension: jpg
2013-04-11 13:42:59,897 [http-bio-0.0.0.0-8080-exec-1] DEBUG com.openkm.util.UserActivity - {id=0, date=Thu Apr 11 13:42:59 CEST 2013, user=okmAdmin, action=GET_DOCUMENT_CONTENT, item=4095941a-7a63-47a4-a9b3-9edb18b54170, path=/okm:root/TestOCR1-Screenshot.jpg, params=6405}
2013-04-11 13:42:59,897 [http-bio-0.0.0.0-8080-exec-1] DEBUG com.openkm.util.DocConverter - convertibleToSwf(image/jpeg)
2013-04-11 13:42:59,897 [http-bio-0.0.0.0-8080-exec-1] DEBUG com.openkm.util.DocConverter - convertibleToSwf: true
2013-04-11 13:42:59,897 [http-bio-0.0.0.0-8080-exec-1] DEBUG com.openkm.util.DocConverter - convertibleToPdf(image/jpeg)
2013-04-11 13:42:59,898 [http-bio-0.0.0.0-8080-exec-1] DEBUG com.openkm.util.DocConverter - convertibleToPdf: true
2013-04-11 13:42:59,898 [http-bio-0.0.0.0-8080-exec-1] DEBUG com.openkm.util.DocConverter - convertibleToPdf(image/jpeg)
2013-04-11 13:42:59,898 [http-bio-0.0.0.0-8080-exec-1] DEBUG com.openkm.util.DocConverter - convertibleToPdf: true
2013-04-11 13:42:59,898 [http-bio-0.0.0.0-8080-exec-1] DEBUG com.openkm.util.DocConverter - ** Convert from image/jpeg to PDF **
2013-04-11 13:42:59,898 [http-bio-0.0.0.0-8080-exec-1] DEBUG com.openkm.util.ExecutionUtils - runCmd(/usr/bin/convert /opt/openkm-6.2.3-community/tomcat/temp/okm2203826405574869073.jpg[0] /opt/openkm-6.2.3-community/tomcat/repository/cache/pdf/4095941a-7a63-47a4-a9b3-9edb18b54170.pdf)
2013-04-11 13:42:59,898 [http-bio-0.0.0.0-8080-exec-1] DEBUG com.openkm.util.ExecutionUtils - runCmdImpl([/usr/bin/convert, /opt/openkm-6.2.3-community/tomcat/temp/okm2203826405574869073.jpg[0], /opt/openkm-6.2.3-community/tomcat/repository/cache/pdf/4095941a-7a63-47a4-a9b3-9edb18b54170.pdf], 300000)
2013-04-11 13:42:59,911 [http-bio-0.0.0.0-8080-exec-1] DEBUG com.openkm.util.ExecutionUtils - Normal program termination
2013-04-11 13:42:59,911 [http-bio-0.0.0.0-8080-exec-1] DEBUG com.openkm.util.ExecutionUtils - Elapse time: 00:00:00
2013-04-11 13:42:59,912 [http-bio-0.0.0.0-8080-exec-1] DEBUG com.openkm.util.FileUtils - getFileName(TestOCR1-Screenshot.jpg)
2013-04-11 13:42:59,912 [http-bio-0.0.0.0-8080-exec-1] DEBUG com.openkm.util.FileUtils - getFileName: TestOCR1-Screenshot
2013-04-11 13:42:59,912 [http-bio-0.0.0.0-8080-exec-1] DEBUG com.openkm.util.FileUtils - getFileName(TestOCR1-Screenshot.pdf)
2013-04-11 13:42:59,912 [http-bio-0.0.0.0-8080-exec-1] DEBUG com.openkm.util.FileUtils - getFileName: TestOCR1-Screenshot
2013-04-11 13:42:59,913 [http-bio-0.0.0.0-8080-exec-1] DEBUG com.openkm.util.DocConverter - ** Convert from PDF to SWF **
2013-04-11 13:42:59,914 [http-bio-0.0.0.0-8080-exec-1] DEBUG com.openkm.util.ExecutionUtils - runCmd(/usr/local/bin/pdf2swf  -T 9 -t -s storeallcharacters -f /opt/openkm-6.2.3-community/tomcat/repository/cache/pdf/4095941a-7a63-47a4-a9b3-9edb18b54170.pdf -o /opt/openkm-6.2.3-community/tomcat/repository/cache/swf/4095941a-7a63-47a4-a9b3-9edb18b54170.swf)
2013-04-11 13:42:59,914 [http-bio-0.0.0.0-8080-exec-1] DEBUG com.openkm.util.ExecutionUtils - runCmdImpl([/usr/local/bin/pdf2swf, , -T, 9, -t, -s, storeallcharacters, -f, /opt/openkm-6.2.3-community/tomcat/repository/cache/pdf/4095941a-7a63-47a4-a9b3-9edb18b54170.pdf, -o, /opt/openkm-6.2.3-community/tomcat/repository/cache/swf/4095941a-7a63-47a4-a9b3-9edb18b54170.swf], 300000)
2013-04-11 13:42:59,920 [http-bio-0.0.0.0-8080-exec-1] WARN  com.openkm.util.ExecutionUtils - Abnormal program termination: 1
2013-04-11 13:42:59,920 [http-bio-0.0.0.0-8080-exec-1] WARN  com.openkm.util.ExecutionUtils - CommandLine: [/usr/local/bin/pdf2swf, , -T, 9, -t, -s, storeallcharacters, -f, /opt/openkm-6.2.3-community/tomcat/repository/cache/pdf/4095941a-7a63-47a4-a9b3-9edb18b54170.pdf, -o, /opt/openkm-6.2.3-community/tomcat/repository/cache/swf/4095941a-7a63-47a4-a9b3-9edb18b54170.swf]
2013-04-11 13:42:59,920 [http-bio-0.0.0.0-8080-exec-1] WARN  com.openkm.util.ExecutionUtils - STDERR: Error: Couldn't open file ''

2013-04-11 13:42:59,921 [http-bio-0.0.0.0-8080-exec-1] DEBUG com.openkm.util.ExecutionUtils - Elapse time: 00:00:00
2013-04-11 13:42:59,921 [http-bio-0.0.0.0-8080-exec-1] DEBUG com.openkm.util.FileUtils - getFileName(TestOCR1-Screenshot.pdf)
2013-04-11 13:42:59,921 [http-bio-0.0.0.0-8080-exec-1] DEBUG com.openkm.util.FileUtils - getFileName: TestOCR1-Screenshot
2013-04-11 13:42:59,921 [http-bio-0.0.0.0-8080-exec-1] ERROR com.openkm.servlet.frontend.ConverterServlet - Error: Couldn't open file ''

com.openkm.core.ConversionException: Error: Couldn't open file ''

	at com.openkm.util.DocConverter.pdf2swf(DocConverter.java:468)
	at com.openkm.servlet.frontend.ConverterServlet.toSWF(ConverterServlet.java:284)
	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:722)
2013-04-11 13:42:59,921 [http-bio-0.0.0.0-8080-exec-1] DEBUG com.openkm.util.WebUtils - sendFile(SecurityContextHolderAwareRequestWrapper[ FirewalledRequest[ org.apache.catalina.connector.RequestFacade@12c497e]], org.springframework.security.web.context.HttpSessionSecurityContextRepository$SaveToSessionResponseWrapper@8cefcc, TestOCR1-Screenshot.swf, application/x-shockwave-flash, true, /opt/openkm-6.2.3-community/tomcat/repository/cache/pdf/4095941a-7a63-47a4-a9b3-9edb18b54170.pdf)
2013-04-11 13:42:59,921 [http-bio-0.0.0.0-8080-exec-1] DEBUG com.openkm.util.WebUtils - Agent: Mozilla
2013-04-11 13:42:59,921 [http-bio-0.0.0.0-8080-exec-1] DEBUG com.openkm.util.WebUtils - File: TestOCR1-Screenshot.swf, Length: 4075
2013-04-11 13:45:00,015 [Thread-43] INFO  com.openkm.extractor.TextExtractorWorker - processSerial.Working on {docUuid=4095941a-7a63-47a4-a9b3-9edb18b54170, docPath=/okm:root/TestOCR1-Screenshot.jpg, docVerUuid=1626385e-9133-4293-8c14-158231b253b0, date=Thu Apr 11 13:41:35 CEST 2013}
2013-04-11 13:45:00,028 [Thread-43] DEBUG com.openkm.util.ExecutionUtils - runCmd(/usr/bin/tesseract /opt/openkm-6.2.3-community/tomcat/temp/okm3218608641797258969.jpg /opt/openkm-6.2.3-community/tomcat/temp/okm3926680201565589740 -l deu)
2013-04-11 13:45:00,028 [Thread-43] DEBUG com.openkm.util.ExecutionUtils - runCmdImpl([/usr/bin/tesseract, /opt/openkm-6.2.3-community/tomcat/temp/okm3218608641797258969.jpg, /opt/openkm-6.2.3-community/tomcat/temp/okm3926680201565589740, -l, deu], 300000)
Last edited by jnko on Fri Apr 12, 2013 8:18 am, edited 1 time in total.
 #22467  by joako
 
I face the same issue:

==> /opt/openkm6/logs/catalina.log <==
Code: Select all
2013-04-11 20:12:33,707 [http-bio-0.0.0.0-8080-exec-6] ERROR com.openkm.servlet.frontend.ConverterServlet -
com.openkm.core.ConversionException:
   at com.openkm.util.DocConverter.pdf2swf(DocConverter.java:468)
   at com.openkm.servlet.frontend.ConverterServlet.toSWF(ConverterServlet.java:257)
   at com.openkm.servlet.frontend.ConverterServlet.service(ConverterServlet.java:127)
   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:307)
   at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
   at java.lang.Thread.run(Thread.java:662)
I attempt to enable debug by changing all the lines in logging.properties to DEBUG such as:
Code: Select all
catalina.org.apache.juli.FileHandler.level = DEBUG
But I don't see any more helpful messages. Everything needed is installed & configured.
 #22472  by jnko
 
jnko wrote:What happens is the following: The uploaded picture is being converted to a corrupt pdf and the following pdf2swf is failing too.
In this case the file repository/cache/pdf/4095941a-7a63-47a4-a9b3-9edb18b54170.pdf (and any other also) is excatly 4075 bytes and contains anything but no pdf data.
Update: after digging around a little bit more, I was able to identify that mysterious .pdf file. It's a wrong labeld .swf file which contains the message:
There was a problem with the conversion generation. Please contact yout OpenKM administrator.
At some point this file is copied from okm from resources\com\openkm\servlet\frontendconversion_problem.swf into is UUID.pdf.

So this must come from openkm. The conversion from pdf to swf by hand also works fine. I'll try to investigate further...
Last edited by jnko on Fri Apr 12, 2013 7:42 am, edited 1 time in total.
 #22473  by jnko
 
Is there a way that the temporary files are NOT being deleted immediately after conversion?
Code: Select all
runCmd(/usr/bin/convert /opt/openkm-6.2.3-community/tomcat/temp/okm2203826405574869073.jpg[0] /opt/openkm-6.2.3-community/tomcat/repository/cache/pdf/4095941a-7a63-47a4-a9b3-9edb18b54170.pdf)
 #22489  by pavila
 
Temporary files are deleted because are temporary :) The final conversion is preserved to prevent repetitive conversion work. If you had problems with the conversion process I recommend to stop Tomcat, remove $TOMCAT_HOME/repository/cache directory and start Tomcat again. This is because some old conversion may be generated with errors due to misconfiguration and all them should be re-generated.
 #22531  by joako
 
I have deleted the contents of the temporary folder, but I still receive the same messages:
Code: Select all
==> catalina.log <==
2013-04-16 22:01:53,248 [http-bio-0.0.0.0-8080-exec-19] DEBUG com.openkm.util.DocConverter - ** Convert from PDF to SWF **

==> catalina.out <==
2013-04-16 22:01:53,839 [http-bio-0.0.0.0-8080-exec-19] ERROR com.openkm.servlet.frontend.ConverterServlet -
com.openkm.core.ConversionException:
        at com.openkm.util.DocConverter.pdf2swf(DocConverter.java:468)
        at com.openkm.servlet.frontend.ConverterServlet.toSWF(ConverterServlet.java:257)
        at com.openkm.servlet.frontend.ConverterServlet.service(ConverterServlet.java:127)
        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:307)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
        at java.lang.Thread.run(Thread.java:662)

==> catalina.log <==
2013-04-16 22:01:53,839 [http-bio-0.0.0.0-8080-exec-19] ERROR com.openkm.servlet.frontend.ConverterServlet -
com.openkm.core.ConversionException:
        at com.openkm.util.DocConverter.pdf2swf(DocConverter.java:468)
        at com.openkm.servlet.frontend.ConverterServlet.toSWF(ConverterServlet.java:257)
        at com.openkm.servlet.frontend.ConverterServlet.service(ConverterServlet.java:127)
        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:307)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
        at java.lang.Thread.run(Thread.java:662)

==> catalina.out <==
2013-04-16 22:01:53,847 [http-bio-0.0.0.0-8080-exec-19] DEBUG com.openkm.servlet.frontend.ConverterServlet - service: void

==> catalina.log <==
2013-04-16 22:01:53,847 [http-bio-0.0.0.0-8080-exec-19] DEBUG com.openkm.servlet.frontend.ConverterServlet - service: void
 #22625  by jnko
 
pavila wrote:I can't see anything in the log which may help. Please, activate the debug for com.openkm.util.DocConverter and com.openkm.servlet.frontend.ConverterServlet. See http://wiki.openkm.com/index.php/Debug_log_info.

Here's the newer debug.log. Created with clean cache and both debug options from above turned on.
Somewhere OpenKM overwrites the "convert"-converted file tomcat/repository/cache/pdf/abf2f11d-09bc-44a6-869f-c6741cf167be.pdf with this file comming from tomcat/webapps/OpenKM/WEB-INF/classes/com/openkm/servlet/frontend/conversion_problem.swf


TIA

Code: Select all
2013-04-22 15:22:12,989 [http-bio-0.0.0.0-8080-exec-10] DEBUG com.openkm.servlet.frontend.ConverterServlet - service(SecurityContextHolderAwareRequestWrapper[ FirewalledRequest[ org.apache.catalina.connector.RequestFacade@1af4a80]], org.springframework.security.web.context.HttpSessionSecurityContextRepository$SaveToSessionResponseWrapper@144446c)
2013-04-22 15:22:13,044 [http-bio-0.0.0.0-8080-exec-10] DEBUG com.openkm.util.DocConverter - convertibleToPdf(image/jpeg)
2013-04-22 15:22:13,044 [http-bio-0.0.0.0-8080-exec-10] DEBUG com.openkm.util.DocConverter - convertibleToPdf: true
2013-04-22 15:22:13,044 [http-bio-0.0.0.0-8080-exec-10] DEBUG com.openkm.util.DocConverter - convertibleToSwf(image/jpeg)
2013-04-22 15:22:13,044 [http-bio-0.0.0.0-8080-exec-10] DEBUG com.openkm.util.DocConverter - convertibleToSwf: true
2013-04-22 15:22:13,054 [http-bio-0.0.0.0-8080-exec-10] DEBUG com.openkm.util.UserActivity - {id=0, date=Mon Apr 22 15:22:13 CEST 2013, user=okmAdmin, action=GET_DOCUMENT_PROPERTIES, item=abf2f11d-09bc-44a6-869f-c6741cf167be, path=/okm:root/TestOCR2-ScreenPhoto.jpg, params=null}
2013-04-22 15:22:13,055 [http-bio-0.0.0.0-8080-exec-10] DEBUG com.openkm.util.PathUtils - getName(/okm:root/TestOCR2-ScreenPhoto.jpg)
2013-04-22 15:22:13,055 [http-bio-0.0.0.0-8080-exec-10] DEBUG com.openkm.util.PathUtils - getName: TestOCR2-ScreenPhoto.jpg
2013-04-22 15:22:13,056 [http-bio-0.0.0.0-8080-exec-10] DEBUG com.openkm.util.FileUtils - getFileExtension(TestOCR2-ScreenPhoto.jpg)
2013-04-22 15:22:13,056 [http-bio-0.0.0.0-8080-exec-10] DEBUG com.openkm.util.FileUtils - getFileExtension: jpg
2013-04-22 15:22:13,062 [http-bio-0.0.0.0-8080-exec-10] DEBUG com.openkm.util.UserActivity - {id=0, date=Mon Apr 22 15:22:13 CEST 2013, user=okmAdmin, action=GET_DOCUMENT_CONTENT, item=abf2f11d-09bc-44a6-869f-c6741cf167be, path=/okm:root/TestOCR2-ScreenPhoto.jpg, params=67265}
2013-04-22 15:22:13,069 [http-bio-0.0.0.0-8080-exec-10] DEBUG com.openkm.servlet.frontend.ConverterServlet - toSWF({uuid=abf2f11d-09bc-44a6-869f-c6741cf167be, fileName=TestOCR2-ScreenPhoto.jpg, mimeType=image/jpeg, file=/opt/openkm/tomcat/temp/okm5664864054648056239.jpg})
2013-04-22 15:22:13,070 [http-bio-0.0.0.0-8080-exec-10] DEBUG com.openkm.util.DocConverter - convertibleToSwf(image/jpeg)
2013-04-22 15:22:13,070 [http-bio-0.0.0.0-8080-exec-10] DEBUG com.openkm.util.DocConverter - convertibleToSwf: true
2013-04-22 15:22:13,070 [http-bio-0.0.0.0-8080-exec-10] DEBUG com.openkm.util.DocConverter - convertibleToPdf(image/jpeg)
2013-04-22 15:22:13,070 [http-bio-0.0.0.0-8080-exec-10] DEBUG com.openkm.util.DocConverter - convertibleToPdf: true
2013-04-22 15:22:13,071 [http-bio-0.0.0.0-8080-exec-10] DEBUG com.openkm.servlet.frontend.ConverterServlet - toPDF({uuid=abf2f11d-09bc-44a6-869f-c6741cf167be, fileName=TestOCR2-ScreenPhoto.jpg, mimeType=image/jpeg, file=/opt/openkm/tomcat/temp/okm5664864054648056239.jpg})
2013-04-22 15:22:13,071 [http-bio-0.0.0.0-8080-exec-10] DEBUG com.openkm.util.DocConverter - convertibleToPdf(image/jpeg)
2013-04-22 15:22:13,071 [http-bio-0.0.0.0-8080-exec-10] DEBUG com.openkm.util.DocConverter - convertibleToPdf: true
2013-04-22 15:22:13,071 [http-bio-0.0.0.0-8080-exec-10] DEBUG com.openkm.util.DocConverter - ** Convert from image/jpeg to PDF **
2013-04-22 15:22:13,197 [http-bio-0.0.0.0-8080-exec-10] DEBUG com.openkm.util.ExecutionUtils - runCmd(/usr/bin/convert /opt/openkm/tomcat/temp/okm5664864054648056239.jpg[0] /opt/openkm/tomcat/repository/cache/pdf/abf2f11d-09bc-44a6-869f-c6741cf167be.pdf)
2013-04-22 15:22:13,197 [http-bio-0.0.0.0-8080-exec-10] DEBUG com.openkm.util.ExecutionUtils - runCmdImpl([/usr/bin/convert, /opt/openkm/tomcat/temp/okm5664864054648056239.jpg[0], /opt/openkm/tomcat/repository/cache/pdf/abf2f11d-09bc-44a6-869f-c6741cf167be.pdf], 300000)
2013-04-22 15:22:13,596 [http-bio-0.0.0.0-8080-exec-10] DEBUG com.openkm.util.ExecutionUtils - Normal program termination
2013-04-22 15:22:13,599 [http-bio-0.0.0.0-8080-exec-10] DEBUG com.openkm.util.ExecutionUtils - Elapse time: 00:00:00
2013-04-22 15:22:13,610 [http-bio-0.0.0.0-8080-exec-10] DEBUG com.openkm.util.FileUtils - getFileName(TestOCR2-ScreenPhoto.jpg)
2013-04-22 15:22:13,610 [http-bio-0.0.0.0-8080-exec-10] DEBUG com.openkm.util.FileUtils - getFileName: TestOCR2-ScreenPhoto
2013-04-22 15:22:13,610 [http-bio-0.0.0.0-8080-exec-10] DEBUG com.openkm.util.FileUtils - getFileName(TestOCR2-ScreenPhoto.pdf)
2013-04-22 15:22:13,610 [http-bio-0.0.0.0-8080-exec-10] DEBUG com.openkm.util.FileUtils - getFileName: TestOCR2-ScreenPhoto
2013-04-22 15:22:13,610 [http-bio-0.0.0.0-8080-exec-10] DEBUG com.openkm.servlet.frontend.ConverterServlet - toPDF: {uuid=abf2f11d-09bc-44a6-869f-c6741cf167be, fileName=TestOCR2-ScreenPhoto.pdf, mimeType=application/pdf, file=/opt/openkm/tomcat/repository/cache/pdf/abf2f11d-09bc-44a6-869f-c6741cf167be.pdf}
2013-04-22 15:22:13,611 [http-bio-0.0.0.0-8080-exec-10] DEBUG com.openkm.util.DocConverter - ** Convert from PDF to SWF **
2013-04-22 15:22:13,612 [http-bio-0.0.0.0-8080-exec-10] DEBUG com.openkm.util.ExecutionUtils - runCmd(/usr/local/bin/pdf2swf  -T 9 -t -s storeallcharacters -f /opt/openkm/tomcat/repository/cache/pdf/abf2f11d-09bc-44a6-869f-c6741cf167be.pdf -o /opt/openkm/tomcat/repository/cache/swf/abf2f11d-09bc-44a6-869f-c6741cf167be.swf)
2013-04-22 15:22:13,612 [http-bio-0.0.0.0-8080-exec-10] DEBUG com.openkm.util.ExecutionUtils - runCmdImpl([/usr/local/bin/pdf2swf, , -T, 9, -t, -s, storeallcharacters, -f, /opt/openkm/tomcat/repository/cache/pdf/abf2f11d-09bc-44a6-869f-c6741cf167be.pdf, -o, /opt/openkm/tomcat/repository/cache/swf/abf2f11d-09bc-44a6-869f-c6741cf167be.swf], 300000)
2013-04-22 15:22:13,615 [http-bio-0.0.0.0-8080-exec-10] WARN  com.openkm.util.ExecutionUtils - Abnormal program termination: 1
2013-04-22 15:22:13,616 [http-bio-0.0.0.0-8080-exec-10] WARN  com.openkm.util.ExecutionUtils - CommandLine: [/usr/local/bin/pdf2swf, , -T, 9, -t, -s, storeallcharacters, -f, /opt/openkm/tomcat/repository/cache/pdf/abf2f11d-09bc-44a6-869f-c6741cf167be.pdf, -o, /opt/openkm/tomcat/repository/cache/swf/abf2f11d-09bc-44a6-869f-c6741cf167be.swf]
2013-04-22 15:22:13,616 [http-bio-0.0.0.0-8080-exec-10] WARN  com.openkm.util.ExecutionUtils - STDERR: Error: Couldn't open file ''

2013-04-22 15:22:13,616 [http-bio-0.0.0.0-8080-exec-10] DEBUG com.openkm.util.ExecutionUtils - Elapse time: 00:00:00
2013-04-22 15:22:13,617 [http-bio-0.0.0.0-8080-exec-10] DEBUG com.openkm.util.FileUtils - getFileName(TestOCR2-ScreenPhoto.pdf)
2013-04-22 15:22:13,617 [http-bio-0.0.0.0-8080-exec-10] DEBUG com.openkm.util.FileUtils - getFileName: TestOCR2-ScreenPhoto
2013-04-22 15:22:13,617 [http-bio-0.0.0.0-8080-exec-10] ERROR com.openkm.servlet.frontend.ConverterServlet - Error: Couldn't open file ''

com.openkm.core.ConversionException: Error: Couldn't open file ''

        at com.openkm.util.DocConverter.pdf2swf(DocConverter.java:468)
        at com.openkm.servlet.frontend.ConverterServlet.toSWF(ConverterServlet.java:284)
        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:722)
2013-04-22 15:22:13,620 [http-bio-0.0.0.0-8080-exec-10] DEBUG com.openkm.util.WebUtils - sendFile(SecurityContextHolderAwareRequestWrapper[ FirewalledRequest[ org.apache.catalina.connector.RequestFacade@1af4a80]], org.springframework.security.web.context.HttpSessionSecurityContextRepository$SaveToSessionResponseWrapper@144446c, TestOCR2-ScreenPhoto.swf, application/x-shockwave-flash, true, /opt/openkm/tomcat/repository/cache/pdf/abf2f11d-09bc-44a6-869f-c6741cf167be.pdf)
2013-04-22 15:22:13,620 [http-bio-0.0.0.0-8080-exec-10] DEBUG com.openkm.util.WebUtils - Agent: Mozilla
2013-04-22 15:22:13,629 [http-bio-0.0.0.0-8080-exec-10] DEBUG com.openkm.util.WebUtils - File: TestOCR2-ScreenPhoto.swf, Length: 4075
2013-04-22 15:22:13,629 [http-bio-0.0.0.0-8080-exec-10] DEBUG com.openkm.servlet.frontend.ConverterServlet - service: void
 #22643  by pavila
 
Please, post the value of the system.swftools.pdf2swf configuration property. Also recommend to upgrade to last night build.
 #22654  by jnko
 
Code: Select all
system.swftools.pdf2swf	String	 /usr/local/bin/pdf2swf -T 9 -t -s storeallcharacters -f ${fileIn} -o ${fileOut}
system.openoffice.path	String	 /usr/lib/libreoffice/
system.ocr	String	 /usr/bin/tesseract ${fileIn} ${fileOut} -l deu
system.imagemagick.convert	String	 /usr/bin/convert
system.ghostscript.ps2pdf	String	 /usr/bin/ps2pdf

convert --version
Version: ImageMagick 6.7.7-10 2012-11-06 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2012 ImageMagick Studio LLC
Features: OpenMP

pdf2swf --version
pdf2swf - part of swftools 2013-04-09-1007
Also the upgrade to 6.2.4-DEV (build: 7988) has exactly the same result. No change at all.
 #22655  by jnko
 
Ok, but now some "magically" happens.

I wrote two small wrapper-scripts around convert and pdf2swf anc changed the okm properties to use the scrips instead running convert/pdf2swf directly.

Believe it or not - now it works. And I still have no idea why?!


What I did was:

1. Create two small scripts, called /opt/openkm/tomcat/bin/convert.sh (don't forget the chmod ugo+x convert.sh)
Code: Select all
#!/bin/sh

echo "--convert convert ---------------" >> /opt/openkm/convert.log
d=`dirname $1`
echo "ls -la $d" >> /opt/openkm/convert.log
ls -la  $d >> /opt/openkm/convert.log 2>&1

filename=$1

f=${filename%???}
echo "Shortened: $f" >> /opt/openkm/convert.log 2>&1

#echo "Trying to copy..." >> /opt/openkm/convert.log
#cp $f "$f[0]" >> /opt/openkm/convert.log 2>&1
#cp $f /opt/openkm/t/

echo "ls -la $d" >> /opt/openkm/convert.log
ls -la  $d >> /opt/openkm/convert.log 2>&1


#echo "/usr/bin/convert -verbose -debug all $1 $2" >> /opt/openkm/convert.log
#/usr/bin/convert -verbose -debug all $1 $2 >> /opt/openkm/convert.log 2>&1
echo "/usr/bin/convert $1 $2" >> /opt/openkm/convert.log
/usr/bin/convert all $1 $2 >> /opt/openkm/convert.log 2>&1

#/usr/bin/convert $1 /opt/openkm/BAK/out.pdf

echo "-------------------------------------------------------------" >> /opt/openkm/convert.log
echo "" >> /opt/openkm/convert.log
echo "" >> /opt/openkm/convert.log
echo "" >> /opt/openkm/convert.log
echo "" >> /opt/openkm/convert.log

2. and /opt/openkm/tomcat/bin/pdf2swf.sh (don't forget the chmod ugo+x pdf2swf.sh)
Code: Select all
#!/bin/sh
#                        $1 $2 $3  $4 $5
#/usr/local/bin/pdf2swf  -T 9  -t  -s storeallcharacters.
#  $6 $7
#  -f /opt/openkm/tomcat/repository/cache/pdf/abf2f11d-09bc-44a6-869f-c6741cf167be.pdf.
#  $8 $9
#  -o /opt/openkm/tomcat/repository/cache/swf/abf2f11d-09bc-44a6-869f-c6741cf167be.swf

echo "--pdf2swf convert ---------------" >> /opt/openkm/convert.log
d=`dirname $1`
echo "ls -la $d" >> /opt/openkm/convert.log
ls -la  $d >> /opt/openkm/convert.log 2>&1

filename=$1

f=${filename%???}
echo "Shortened: $f" >> /opt/openkm/convert.log 2>&1

#echo "Trying to copy..." >> /opt/openkm/convert.log
#cp $f "$f[0]" >> /opt/openkm/convert.log 2>&1
#cp $f /opt/openkm/t/

echo "ls -la $d" >> /opt/openkm/convert.log
ls -la  $d >> /opt/openkm/convert.log 2>&1


echo "/usr/local/bin/pdf2swf -v -v $1 $2 $3 $4 $5 $6 $7 $8 $9" >> /opt/openkm/convert.log
/usr/local/bin/pdf2swf -v -v  $1 $2 $3 $4 $5 $6 $7 $8 $9 >> /opt/openkm/convert.log 2>&1

#/usr/local/bin/pdf2swf -v -v  $1 $2 $3 $4 $5 $6 $7 $8 /opt/openkm/BAK/out.swf

echo "-------------------------------------------------------------" >> /opt/openkm/convert.log
echo "" >> /opt/openkm/convert.log
echo "" >> /opt/openkm/convert.log
echo "" >> /opt/openkm/convert.log
echo "" >> /opt/openkm/convert.log
3. change the values of the configuration properties
Code: Select all
system.imagemagick.convert  to  /opt/openkm/tomcat/bin/convert.sh
system.swftools.pdf2swf  to   /opt/openkm/tomcat/bin/pdf2swf.sh -T 9 -t -s storeallcharacters -f ${fileIn} -o ${fileOut}
4. for the production system you should also remove all the "useless" logging lines.

I guess, the problem is somewhere around debian "dash", the shell, variable expansion ...
I'll go in some steps deeper the next days.
 #22669  by pavila
 
According to the error message in the log, your system.swftools.pdf2swf configuration property has an extra space between "/usr/local/bin/pdf2swf" and "-T 9".
 #22679  by joako
 
What I discovered in my case was for whatever reason the document I was testing with (the only .docx in the repository) was not corrupt but simply would not be previewed. When I tested the .pdf files and uploaded other Office documents they all preview perfectly.
 #22846  by dgutierrez
 
You have to delete the cache directory that is on $TOMCAT_HOME//repository/cache
In your .docx give an error because you have on the cache a corrupted conversion to pdf.
Try deleting the folder, in my case this solve my problems with the previsualization.

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.