Page 1 of 3
Auto Preview
PostPosted:Tue Feb 14, 2012 2:45 pm
by matt@theforce
Hi,
I'm not only new to OpenKM but I am also new to Unix & have been asked to build a Wiki for our support team to use.
So far everything seems to have installed correctly, all except Auto Preview work for our testing purposes
I have installed
OpenKM 5.1.9
freetype 2.4.8
swftools 0.9.1
xpdf 3.03
Imagemagick 6.7.4-6
Centos 6.1 (Office Production ticked @ install)
I'm unsure what files you will need to help me diagnose what I have missed/not configured correctly so for now I have attached a copy of the logfile from when I was last on shift and able to look into this.
I have done a search and found various other threads about the same problem but those solutions haven't helped me get mine to work.
Many Thanks
Matthew
Re: Auto Preview
PostPosted:Wed Feb 15, 2012 4:10 pm
by pavila
This server has no Internet connection, as far I can see in the log file (Connection timed out). Take a look at
http://wiki.openkm.com/index.php/Proper ... definition to solve it.
Also I can see you have a problem with the OpenOffice integration, because:
Code: Select allCaused by: java.lang.NullPointerException
at org.artofsolving.jodconverter.OfficeDocumentConverter.convert(OfficeDocumentConverter.java:75)
at org.artofsolving.jodconverter.OfficeDocumentConverter.convert(OfficeDocumentConverter.java:66)
at com.openkm.util.DocConverter.convert(DocConverter.java:251)
at com.openkm.util.DocConverter.doc2pdf(DocConverter.java:308)
But I can't know why it is happening.
Re: Auto Preview
PostPosted:Thu Mar 01, 2012 3:19 pm
by matt@theforce
I think I'm making some progress. Would I be correct in thinking I have an issue with the install of pdf2swf?
Code: Select all2012-03-01 15:10:42,221 ERROR [com.openkm.servlet.frontend.ConverterServlet] IO exception executing command: /usr/bin/pdf2swf -T 9 -f /tmp/okm5721188889159079605.pdf -o /opt/jboss-4.2.3.GA/cache/swf/db40e9f4-3509-4ee1-ac0e-f4fa8be6d5b9.swf
com.openkm.core.ConversionException: IO exception executing command: /usr/bin/pdf2swf -T 9 -f /tmp/okm5721188889159079605.pdf -o /opt/jboss-4.2.3.GA/cache/swf/db40e9f4-3509-4ee1-ac0e-f4fa8be6d5b9.swf
at com.openkm.util.DocConverter.pdf2swf(DocConverter.java:535)
at com.openkm.servlet.frontend.ConverterServlet.toSWF(ConverterServlet.java:223)
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:636)
Caused by: java.io.IOException: Cannot run program "/usr/bin/pdf2swf": java.io.IOException: error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:475)
at com.openkm.util.ExecutionUtils.runCmdImpl(ExecutionUtils.java:246)
at com.openkm.util.ExecutionUtils.runCmd(ExecutionUtils.java:225)
at com.openkm.util.DocConverter.pdf2swf(DocConverter.java:525)
... 22 more
Caused by: java.io.IOException: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.<init>(UNIXProcess.java:164)
at java.lang.ProcessImpl.start(ProcessImpl.java:81)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:468)
Re: Auto Preview
PostPosted:Sun Mar 04, 2012 11:28 am
by jllort
Error is clear, indicates that the file in your server path not exists.
Cannot run program "/usr/bin/pdf2swf": java.io.IOException: error=2,
Re: Auto Preview
PostPosted:Mon Mar 05, 2012 7:08 am
by vkasgpta
hello,
im having an issue with auto preview as well... belows the log:
Code: Select all15:05:20,406 ERROR [ConverterServlet] Error in application/vnd.ms-excel to PDF conversion
com.openkm.core.ConversionException: Error in application/vnd.ms-excel 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:662)
Caused by: java.lang.IllegalStateException: this OfficeManager is currently stopped
at org.artofsolving.jodconverter.office.ProcessPoolOfficeManager.execute(ProcessPoolOfficeManager.java:67)
at org.artofsolving.jodconverter.OfficeDocumentConverter.convert(OfficeDocumentConverter.java:75)
at org.artofsolving.jodconverter.OfficeDocumentConverter.convert(OfficeDocumentConverter.java:66)
at com.openkm.util.DocConverter.convert(DocConverter.java:251)
at com.openkm.util.DocConverter.doc2pdf(DocConverter.java:308)
... 23 more
How to i 'start' office manager..?
thx!!
Re: Auto Preview
PostPosted:Mon Mar 05, 2012 7:21 am
by vkasgpta
i did install openoffice as a service as they instructed at :
http://wiki.openkm.com/index.php/Third- ... Office.org
and i have a service 'openoffice' running at the time of the error...
Re: Auto Preview
PostPosted:Tue Mar 06, 2012 8:07 am
by pavila
If you have properly set the "system.openoffice.path" configuration property, OpenKM will start OpenOffice / LibreOffice automatically when needed.
Re: Auto Preview
PostPosted:Wed Mar 07, 2012 11:26 am
by vkasgpta
thx for the reply pavila
well my setting has a string of this value:
D:\jboss-4.2.3.GA\lib\openoffice
i have installed the openoffice in
D:\jboss-4.2.3.GA\lib\openoffice\
same thing for the pdf2swf, its in the lib folder of jboss
i have tried changing the path to
D:\jboss-4.2.3.GA\lib\openoffice\
(added the \) but still no dice

Re: Auto Preview
PostPosted:Wed Mar 07, 2012 6:32 pm
by pavila
Follow these steps (
http://wiki.openkm.com/index.php/Debug_log_info) and post the server.log (zipped, please) file.
Re: Auto Preview
PostPosted:Thu Mar 08, 2012 6:25 am
by vkasgpta
done

i have attached the log
hopefully i followed it right.. ><
Re: Auto Preview
PostPosted:Thu Mar 08, 2012 4:02 pm
by matt@theforce
After endless hours of changing bits & pieces I decided it was time to rebuild the server to start from a default install. I still had the same issue, Document preview wouldn't work with any file format.
I've managed to get .pdf / .doc / .xls / .xlsx working but still have problems with .docx / .ppt / .pptx / .txt / .jpg
For now my primary concern is .docx, I've un-installed OpenOffice (that came with Centos) and installed LibreOffice 3.5 but get the following error when trying to auto preview a .docx file
Code: Select all2012-03-08 15:44:12,146 ERROR [com.openkm.servlet.frontend.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:636)
Caused by: java.lang.IllegalStateException: this OfficeManager is currently stopped
at org.artofsolving.jodconverter.office.ProcessPoolOfficeManager.execute(ProcessPoolOfficeManager.java:67)
at org.artofsolving.jodconverter.OfficeDocumentConverter.convert(OfficeDocumentConverter.java:75)
at org.artofsolving.jodconverter.OfficeDocumentConverter.convert(OfficeDocumentConverter.java:66)
at com.openkm.util.DocConverter.convert(DocConverter.java:251)
at com.openkm.util.DocConverter.doc2pdf(DocConverter.java:308)
... 23 more
Re: Auto Preview
PostPosted:Fri Mar 09, 2012 4:21 am
by vkasgpta
that looks like the same error message im facing!
im using open office though...

Re: Auto Preview
PostPosted:Sat Mar 10, 2012 4:24 pm
by pavila
vkasgpta wrote:done 
i have attached the log
After review the log, I have two questions:
- Do you have any application running attached to the 2002 port?
- There is a "program/soffice.bin" file inside "D:\jboss-4.2.3.GA\lib\openoffice\" ?
Re: Auto Preview
PostPosted:Sat Mar 10, 2012 4:56 pm
by pavila
I have write a short guide to configure OpenOffice properly at
http://wiki.openkm.com/index.php/OpenOf ... iew_issues. Comments are welcome.
Re: Auto Preview
PostPosted:Sat Mar 10, 2012 9:30 pm
by matt@theforce
I've checked everything on the link provided, even removing settings on the system.openoffice.xxxxx but still no avail
I've cleared the server.log and done a start of OpenKM & tried the AutoPreview for docx/ppt/pptx/txt (in that order) to show the errors more clearly.
doc/pdf/xls/xlsx still work in AutoPreview
Here is my config
Code: Select allsystem.ghostscript.ps2pdf String /usr/local/bin/pdf2swf
system.imagemagick.convert String /usr/local/bin/convert
system.openoffice.dictionary String
system.openoffice.path String /opt/libreoffice3.5
system.openoffice.port Integer 2222
system.openoffice.server String
system.openoffice.tasks Integer 5
system.swftools.pdf2swf String /usr/local/bin/pdf2swf -T 9 -f ${fileIn} -o ${fileOut}
Matthew