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
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.