Preview Generation Problems
PostPosted:Sun Jan 08, 2012 11:19 pm
Dear OpenKM community -
Can you suggest debugging steps for preview not working for Word/Excel/Text documents (works fine for pdf); It appears as though the headless openoffice process is starting just fine, Imagemagick convert, and pdf2swf also appear to be working just fine.
The symptom is When selecting the preview tab of the application on one of these kinds of documents, a "There was a problem with the conversion generation." is presented.
It is the same when selecting 'download document as PDF' is selected from the file menu.
I am running OpenKM-5.1.8-2
Example: when selecting preview of an excel document:
Can you suggest debugging steps for preview not working for Word/Excel/Text documents (works fine for pdf); It appears as though the headless openoffice process is starting just fine, Imagemagick convert, and pdf2swf also appear to be working just fine.
The symptom is When selecting the preview tab of the application on one of these kinds of documents, a "There was a problem with the conversion generation." is presented.
It is the same when selecting 'download document as PDF' is selected from the file menu.
I am running OpenKM-5.1.8-2
Example: when selecting preview of an excel document:
Code: Select all
Example: when selecting preview of a text document:17:08:41,204 ERROR [ConverterServlet] Error in application/vnd.openxmlformats-officedocument.wordprocessingml.document to PDF conversion
com.openkm.core.ConversionException: Error in application/vnd.openxmlformats-officedocument.wordprocessingml.document to PDF conversion
at com.openkm.util.DocConverter.doc2pdf(DocConverter.java:311)
at com.openkm.servlet.frontend.ConverterServlet.toPDF(ConverterServlet.java:188)
at com.openkm.servlet.frontend.ConverterServlet.toSWF(ConverterServlet.java:225)
at com.openkm.servlet.frontend.ConverterServlet.service(ConverterServlet.java:106)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
at java.lang.Thread.run(Thread.java:679)
Caused by: com.openkm.core.ConversionException: Error converting document: could not load document: okm3228894779304168456.docx
at com.openkm.util.DocConverter.convert(DocConverter.java:257)
at com.openkm.util.DocConverter.doc2pdf(DocConverter.java:308)
... 23 moreCode: Select all
Example: downloading text document as pdf:17:12:38,442 ERROR [ConverterServlet] Error in text/plain to PDF conversion
com.openkm.core.ConversionException: Error in text/plain to PDF conversion
at com.openkm.util.DocConverter.doc2pdf(DocConverter.java:311)
at com.openkm.servlet.frontend.ConverterServlet.toPDF(ConverterServlet.java:188)
at com.openkm.servlet.frontend.ConverterServlet.toSWF(ConverterServlet.java:225)
at com.openkm.servlet.frontend.ConverterServlet.service(ConverterServlet.java:106)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
at java.lang.Thread.run(Thread.java:679)
Caused by: com.openkm.core.ConversionException: Error converting document: could not load document: okm8887708151858475510.txt
at com.openkm.util.DocConverter.convert(DocConverter.java:257)
at com.openkm.util.DocConverter.doc2pdf(DocConverter.java:308)
... 23 moreCode: Select all
System is a 64-bit Centos 6.2 installation:17:13:30,200 ERROR [ConverterServlet] Error in text/plain to PDF conversion
com.openkm.core.ConversionException: Error in text/plain to PDF conversion
at com.openkm.util.DocConverter.doc2pdf(DocConverter.java:311)
at com.openkm.servlet.frontend.ConverterServlet.toPDF(ConverterServlet.java:188)
at com.openkm.servlet.frontend.ConverterServlet.service(ConverterServlet.java:98)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
at java.lang.Thread.run(Thread.java:679)
Caused by: com.openkm.core.ConversionException: Error converting document: could not load document: okm3674110472317799710.txt
at com.openkm.util.DocConverter.convert(DocConverter.java:257)
at com.openkm.util.DocConverter.doc2pdf(DocConverter.java:308)
... 22 moreCode: Select all
Openoffice 3.2.1 is installed as well as swftools and Imagemagick. The configuration parameters listed in OpenKM.cfg are in place in the Admin console.[root@share ~]# uname -a
Linux share.ep-team.com 2.6.32-220.2.1.el6.x86_64 #1 SMP Fri Dec 23 02:21:33 CST 2011 x86_64 x86_64 x86_64 GNU/Linux
[root@share ~]# cat /etc/redhat-release
CentOS release 6.2 (Final)Code: Select all
Console on the startup shows good startup, including openoffice log follows:[root@share ~]# rpm -qa | grep openoffice
openoffice.org-opensymbol-fonts-3.2.1-19.6.el6_0.5.noarch
openoffice.org-ure-3.2.1-19.6.el6_0.5.x86_64
openoffice.org-core-3.2.1-19.6.el6_0.5.x86_64
openoffice.org-headless-3.2.1-19.6.el6_0.5.x86_64
openoffice.org-brand-3.2.1-19.6.el6_0.5.x86_64
openoffice.org-pyuno-3.2.1-19.6.el6_0.5.x86_64
[root@share ~]# /usr/local/bin/pdf2swf -V
pdf2swf - part of swftools 0.9.1
[root@share ~]# /usr/bin/convert -version
Version: ImageMagick 6.5.4-7 2010-11-10 Q16 OpenMP http://www.imagemagick.org
Copyright: Copyright (C) 1999-2009 ImageMagick Studio LLC
[root@share /]# cat /opt/jboss-4.2.3.GA/OpenKM.cfg
hibernate.dialect=org.hibernate.dialect.HSQLDialect
hibernate.hbm2ddl=none
application.url=http://localhost:8080/OpenKM/frontend/index.jsp
system.imagemagick.convert=/usr/bin/convert
system.swftools.pdf2swf=/usr/local/bin/pdf2swf
system.openoffice.path=/usr/lib64/openoffice.org3Code: Select all
The soffice process is running, and stays running at the same PID (an indication it is not crashing?)[root@share /]# /opt/jboss-4.2.3.GA/bin/run.sh -b 0.0.0.0
=========================================================================
JBoss Bootstrap Environment
JBOSS_HOME: /opt/jboss-4.2.3.GA
JAVA: java
JAVA_OPTS: -Dprogram.name=run.sh -Xms256m -Xmx1024m -XX:PermSize=64m -XX:MaxPermSize=128m -Djava.awt.headless=true -Djava.net.preferIPv4Stack=true
CLASSPATH: /opt/jboss-4.2.3.GA/bin/run.jar
=========================================================================
17:03:47,145 INFO [Server] Starting JBoss (MX MicroKernel)...
17:03:47,146 INFO [Server] Release ID: JBoss [Trinity] 4.2.3.GA (build: SVNTag=JBoss_4_2_3_GA date=200807181439)
17:03:47,147 INFO [Server] Home Dir: /opt/jboss-4.2.3.GA
17:03:47,147 INFO [Server] Home URL: file:/opt/jboss-4.2.3.GA/
17:03:47,147 INFO [Server] Patch URL: null
17:03:47,147 INFO [Server] Server Name: default
17:03:47,147 INFO [Server] Server Home Dir: /opt/jboss-4.2.3.GA/server/default
17:03:47,147 INFO [Server] Server Home URL: file:/opt/jboss-4.2.3.GA/server/default/
17:03:47,147 INFO [Server] Server Log Dir: /opt/jboss-4.2.3.GA/server/default/log
17:03:47,148 INFO [Server] Server Temp Dir: /opt/jboss-4.2.3.GA/server/default/tmp
17:03:47,148 INFO [Server] Root Deployment Filename: jboss-service.xml
17:03:47,326 INFO [ServerInfo] Java version: 1.6.0_22,Sun Microsystems Inc.
17:03:47,327 INFO [ServerInfo] Java VM: OpenJDK 64-Bit Server VM 20.0-b11,Sun Microsystems Inc.
17:03:47,327 INFO [ServerInfo] OS-System: Linux 2.6.32-220.2.1.el6.x86_64,amd64
17:03:47,544 INFO [Server] Core system initialized
17:03:48,801 INFO [WebService] Using RMI server codebase: http://share.ep-team.com:8083/
17:03:48,803 INFO [Log4jService$URLWatchTimerTask] Configuring from URL: resource:jboss-log4j.xml
17:03:50,808 INFO [EJB3Deployer] Starting java:comp multiplexer
17:03:52,065 INFO [NativeServerConfig] JBoss Web Services - Native
17:03:52,066 INFO [NativeServerConfig] jbossws-3.0.1-native-2.0.4.GA (build=200803312044)
17:03:52,584 INFO [Embedded] Catalina naming disabled
17:03:52,664 INFO [AprLifecycleListener] The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/amd64/server:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/amd64:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/../lib/amd64:/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
17:03:52,703 INFO [Http11Protocol] Initializing Coyote HTTP/1.1 on http-0.0.0.0-8080
17:03:52,703 INFO [AjpProtocol] Initializing Coyote AJP/1.3 on ajp-0.0.0.0-8009
17:03:52,703 INFO [Catalina] Initialization processed in 118 ms
17:03:52,703 INFO [StandardService] Starting service jboss.web
17:03:52,705 INFO [StandardEngine] Starting Servlet Engine: JBossWeb/2.0.1.GA
17:03:52,736 INFO [Catalina] Server startup in 32 ms
17:03:52,810 INFO [TomcatDeployer] deploy, ctxPath=/, warUrl=.../deploy/jboss-web.deployer/ROOT.war/
17:03:53,138 INFO [TomcatDeployer] deploy, ctxPath=/invoker, warUrl=.../deploy/http-invoker.sar/invoker.war/
17:03:53,219 INFO [TomcatDeployer] deploy, ctxPath=/jbossws, warUrl=.../deploy/jbossws.sar/jbossws-context.war/
17:03:53,302 INFO [TomcatDeployer] deploy, ctxPath=/jbossmq-httpil, warUrl=.../deploy/jms/jbossmq-httpil.sar/jbossmq-httpil.war/
17:03:53,671 INFO [TomcatDeployer] deploy, ctxPath=/web-console, warUrl=.../deploy/management/console-mgr.sar/web-console.war/
.... SNIP ....
17:04:05,103 INFO [ProcessPoolOfficeManager] ProcessManager implementation is UnixProcessManager
17:04:05,142 INFO [OfficeProcess] starting process with acceptString 'socket,host=127.0.0.1,port=2002,tcpNoDelay=1' and profileDir '/tmp/.jodconverter_socket_host-127.0.0.1_port-2002'
17:04:05,191 INFO [OfficeProcess] started process; pid = 6754
17:04:05,636 INFO [OfficeConnection] connected: 'socket,host=127.0.0.1,port=2002,tcpNoDelay=1'
17:04:05,724 WARN [FileLoader] Supplied path does not exist. Unable to add plugins from there.
17:04:05,726 WARN [ExecutionUtils] Unable to read script: /opt/jboss-4.2.3.GA/start.bsh
17:04:05,727 WARN [ExecutionUtils] Unable to read jar: /opt/jboss-4.2.3.GA/start.jar
17:04:10,499 INFO [WSDLFilePublisher] WSDL published to: file:/opt/jboss-4.2.3.GA/server/default/data/wsdl/OpenKM.war/OKMNoteService7540672213146231821.wsdl
17:04:10,512 INFO [WSDLFilePublisher] WSDL published to: file:/opt/jboss-4.2.3.GA/server/default/data/wsdl/OpenKM.war/OKMWorkflowService2001695774224472075.wsdl
17:04:10,520 INFO [WSDLFilePublisher] WSDL published to: file:/opt/jboss-4.2.3.GA/server/default/data/wsdl/OpenKM.war/OKMPropertyGroupService5233164132728749036.wsdl
17:04:10,525 INFO [WSDLFilePublisher] WSDL published to: file:/opt/jboss-4.2.3.GA/server/default/data/wsdl/OpenKM.war/OKMFolderService5516955029652948998.wsdl
17:04:10,529 INFO [WSDLFilePublisher] WSDL published to: file:/opt/jboss-4.2.3.GA/server/default/data/wsdl/OpenKM.war/OKMNotificationService8676843927616288653.wsdl
17:04:10,532 INFO [WSDLFilePublisher] WSDL published to: file:/opt/jboss-4.2.3.GA/server/default/data/wsdl/OpenKM.war/OKMPropertyService6696136131039740621.wsdl
17:04:10,538 INFO [WSDLFilePublisher] WSDL published to: file:/opt/jboss-4.2.3.GA/server/default/data/wsdl/OpenKM.war/OKMAuthService7949897395642964982.wsdl
17:04:10,544 INFO [WSDLFilePublisher] WSDL published to: file:/opt/jboss-4.2.3.GA/server/default/data/wsdl/OpenKM.war/OKMMailService3809429437034816021.wsdl
17:04:10,558 INFO [WSDLFilePublisher] WSDL published to: file:/opt/jboss-4.2.3.GA/server/default/data/wsdl/OpenKM.war/OKMDocumentService8359108392649229816.wsdl
17:04:10,634 INFO [WSDLFilePublisher] WSDL published to: file:/opt/jboss-4.2.3.GA/server/default/data/wsdl/OpenKM.war/OKMSearchService8201132838887908597.wsdl
17:04:10,639 INFO [WSDLFilePublisher] WSDL published to: file:/opt/jboss-4.2.3.GA/server/default/data/wsdl/OpenKM.war/OKMTestService6346057232438617619.wsdl
17:04:10,644 INFO [WSDLFilePublisher] WSDL published to: file:/opt/jboss-4.2.3.GA/server/default/data/wsdl/OpenKM.war/OKMRepositoryService7220642723416501008.wsdl
17:04:10,648 INFO [WSDLFilePublisher] WSDL published to: file:/opt/jboss-4.2.3.GA/server/default/data/wsdl/OpenKM.war/OKMBookmarkService3579277177097909183.wsdl
17:04:10,669 INFO [TomcatDeployer] deploy, ctxPath=/jmx-console, warUrl=.../deploy/jmx-console.war/
17:04:10,747 INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-0.0.0.0-8080
17:04:10,780 INFO [AjpProtocol] Starting Coyote AJP/1.3 on ajp-0.0.0.0-8009
17:04:10,811 INFO [Server] JBoss (MX MicroKernel) [4.2.3.GA (build: SVNTag=JBoss_4_2_3_GA date=200807181439)] Started in 23s:661msCode: Select all
The system has 2GB or RAMroot 6754 0.0 1.8 894780 38660 pts/0 Sl+ 17:04 0:00 /usr/lib64/openoffice.org3/program/soffice.bin -accept=socket,host=127.0.0.1,port=2002;urp; -env:UserInstallation=file:///tmp/.jodconverter_socket_host-127.0.0.1_port-2002 -headless -nocrashreport -nodefault -nofirststartwizard -nolockcheck -nologo -norestoreCode: Select all
[root@share ~]# cat /proc/meminfo
MemTotal: 2054836 kB
MemFree: 396416 kB
Buffers: 103844 kB
Cached: 620048 kB
SwapCached: 0 kB
Active: 1149088 kB
Inactive: 380688 kB