• Error in application/msword to PDF conversion

  • 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.
 #7365  by Erno
 
I dont know if this helps anything, I just tested JODConverter with the same doc file:
Code: Select all
# /etc/init.d/openkm stop
...
# /usr/bin/soffice -headless -accept="socket,host=127.0.0.1,port=8100;urp;" -nofirststartwizard

# java -jar lib/jodconverter-cli-2.2.2.jar foobar.doc document.pdf
Dec 3, 2010 12:35:01 AM com.artofsolving.jodconverter.openoffice.connection.AbstractOpenOfficeConnection connect
INFO: connected
Dec 3, 2010 12:35:01 AM com.artofsolving.jodconverter.openoffice.connection.AbstractOpenOfficeConnection disposing
INFO: disconnected
Exception in thread "main" com.artofsolving.jodconverter.openoffice.connection.OpenOfficeException: conversion failed: could not load input document
        at com.artofsolving.jodconverter.openoffice.converter.OpenOfficeDocumentConverter.loadAndExport(OpenOfficeDocumentConverter.java:131)
        at com.artofsolving.jodconverter.openoffice.converter.OpenOfficeDocumentConverter.convertInternal(OpenOfficeDocumentConverter.java:120)
        at com.artofsolving.jodconverter.openoffice.converter.AbstractOpenOfficeDocumentConverter.convert(AbstractOpenOfficeDocumentConverter.java:104)
        at com.artofsolving.jodconverter.openoffice.converter.AbstractOpenOfficeDocumentConverter.convert(AbstractOpenOfficeDocumentConverter.java:74)
        at com.artofsolving.jodconverter.openoffice.converter.AbstractOpenOfficeDocumentConverter.convert(AbstractOpenOfficeDocumentConverter.java:70)
        at com.artofsolving.jodconverter.cli.ConvertDocument.convertOne(ConvertDocument.java:154)
        at com.artofsolving.jodconverter.cli.ConvertDocument.main(ConvertDocument.java:133)
Caused by: com.sun.star.lang.IllegalArgumentException: URL seems to be an unsupported one.
        at com.sun.star.lib.uno.environments.remote.Job.remoteUnoRequestRaisedException(Job.java:182)
        at com.sun.star.lib.uno.environments.remote.Job.execute(Job.java:148)
        at com.sun.star.lib.uno.environments.remote.JobQueue.enter(JobQueue.java:344)
        at com.sun.star.lib.uno.environments.remote.JobQueue.enter(JobQueue.java:313)
        at com.sun.star.lib.uno.environments.remote.JavaThreadPool.enter(JavaThreadPool.java:101)
        at com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge.sendRequest(java_remote_bridge.java:652)
        at com.sun.star.lib.uno.bridges.java_remote.ProxyFactory$Handler.request(ProxyFactory.java:154)
        at com.sun.star.lib.uno.bridges.java_remote.ProxyFactory$Handler.invoke(ProxyFactory.java:136)
        at $Proxy5.loadComponentFromURL(Unknown Source)
        at com.artofsolving.jodconverter.openoffice.converter.OpenOfficeDocumentConverter.loadDocument(OpenOfficeDocumentConverter.java:150)
        at com.artofsolving.jodconverter.openoffice.converter.OpenOfficeDocumentConverter.loadAndExport(OpenOfficeDocumentConverter.java:127)
        ... 6 more
 #7367  by rstone
 
I have the same problem on 5.0 RC1.
My OS is Centos 4.4, + openoffice 3.2.1(full installation package, includes calc,writer, Impress...) + openoffice SDK

I can convert msword files to pdf by tools "jodconverter-cli-xx.jar" successfully as you mentioned.

Here below are the error messages, please help have a look and any advice would be appreciated.
Code: Select all
2010-12-03 14:30:39,075 ERROR [com.openkm.frontend.server.OKMDownloadServlet] Error in application/msword to PDF conversion
java.io.IOException: Error in application/msword to PDF conversion
        at com.openkm.util.DocConverter.doc2pdf(DocConverter.java:190)
        at com.openkm.frontend.server.OKMDownloadServlet.service(OKMDownloadServlet.java:145)
        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:432)
        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:619)
Caused 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:164)
        at com.openkm.util.DocConverter.doc2pdf(DocConverter.java:185)
        ... 21 more
2010-12-03 14:30:39,076 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/OpenKM].[OKMDownloadServlet]] Servlet.service() for servlet OKMDownloadServlet threw exception
com.openkm.frontend.client.OKMException: Error in application/msword to PDF conversion
        at com.openkm.frontend.server.OKMDownloadServlet.service(OKMDownloadServlet.java:193)
        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:432)
        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:619)

 #7451  by pavila
 
Try to active debug log at $JBOSS_HOME/server/default/conf/jboss-log4j.xml:
Code: Select all
<category name="com.openkm.util">
    <priority value="DEBUG"/>
   </category>
And take a look at $JBOSS_HOME/server/default/log/server.log. Don't paste the whole log file, only the conversion related part, please.
 #7456  by Erno
 
Here it is, I hope it helps:
Code: Select all
2010-12-09 12:45:14,651 DEBUG [com.openkm.util.UserActivity] {date=Thu Dec 09 12:45:14 CET 2010, user=okmAdmin, action=GET_DOCUMENT_PROPERTIES, item=/okm:root/anathema-2010.doc, params=[]}
2010-12-09 12:45:14,677 DEBUG [com.openkm.util.UserActivity] {date=Thu Dec 09 12:45:14 CET 2010, user=okmAdmin, action=GET_DOCUMENT_CONTENT, item=/okm:root/anathema-2010.doc, params=29696}
2010-12-09 12:45:14,684 DEBUG [com.openkm.util.DocConverter] ** Convert from application/msword to PDF **
2010-12-09 12:45:14,685 DEBUG [com.openkm.util.DocConverter] convert(/tmp/okm1154712682938331151.doc, application/msword, /web/web/host/dms2.foobar.hu/openkm50rc1/cache/pdf/88ffd3b2-7fda-4b56-8ade-bec7e9a5cd07.pdf)
2010-12-09 12:45:14,895 ERROR [com.openkm.util.DocConverter] Error in application/msword to PDF conversion
2010-12-09 12:45:14,896 ERROR [com.openkm.frontend.server.OKMDownloadServlet] Error in application/msword to PDF conversion
java.io.IOException: Error in application/msword to PDF conversion
        at com.openkm.util.DocConverter.doc2pdf(DocConverter.java:190)
        at com.openkm.frontend.server.OKMDownloadServlet.service(OKMDownloadServlet.java:145)
        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:432)
        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:619)
Caused by: java.io.IOException: Error convertind document: could not load document: okm1154712682938331151.doc
        at com.openkm.util.DocConverter.convert(DocConverter.java:166)
        at com.openkm.util.DocConverter.doc2pdf(DocConverter.java:185)
        ... 21 more
2010-12-09 12:45:14,923 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/OpenKM].[OKMDownloadServlet]] Servlet.service() for servlet OKMDownloadServlet threw exception
com.openkm.frontend.client.OKMException: Error in application/msword to PDF conversion
        at com.openkm.frontend.server.OKMDownloadServlet.service(OKMDownloadServlet.java:193)
        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:432)
        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:619)



# ls -ld /tmp
drwxrwxrwt 10 root root 4096 2010-12-09 12:47 /tmp
 #7496  by mari43
 
NO NO NO NO, Now I think I understand what's happening. :D

From version 5.X OpenKM automatically runs Open Office you must not starting as service, OpenKM runs for you.:D If service is yet started then OpenKM can not initiate own,:) and that's I think it's the problem. You can preview pdf because there's no open office conversion needed only pdf2swf, but you can not preview other doc or xls documents - for example - because in that cases we convert to pdf, and without open office it's not possible.:)

Stop jboss, and soffice service and restart only jboss ... :Dtell me if it solves the problem.
:)
 #7501  by Erno
 
mari43 wrote:NO NO NO NO, Now I think I understand what's happening. :D

From version 5.X OpenKM automatically runs Open Office you must not starting as service, OpenKM runs for you.:D If service is yet started then OpenKM can not initiate own,:) and that's I think it's the problem. You can preview pdf because there's no open office conversion needed only pdf2swf, but you can not preview other doc or xls documents - for example - because in that cases we convert to pdf, and without open office it's not possible.:)

Stop jboss, and soffice service and restart only jboss ... :Dtell me if it solves the problem.
:)
NO NO NO NO, I think you cant read the pasted logs above, I do understand that OpenKM stats soffice.bin by itself, I dont run any other instances.
 #7539  by pavila
 
The central point is:
Error convertind document: could not load document: okm1154712682938331151.doc
Which is quite curious. Does the user who runs OpenKM have read and write permissions into /tmp directory? Is the only thing I can imagine. The last resort option is to mount the developing enviroment and debug the source code to see if it creates the temporal file.
 #7566  by Erno
 
I just upgraded 5.0RC1 to 5.0 final, it still has the same issue (pdf, jpg preview works fine, doc/xls doesnot), however it even worse, it just displays "Preview unavailable" and there are no exceptions in the log.
 #7574  by nightskull
 
Hi Erno,
I have the same problem. After installing 5.0 NEW OpenKM no doc and xls files are displayed as a preview. :cry:
Now for the solution:
You must edit the OpenKM.cfg. Here, the string has changed the path statement.

Before: system.openoffice = / usr / lib / openoffice
After: system.openoffice.path = / usr / lib / openoffice

Now start OpenKM still new. That's it.
To look at: Login Administration Configuration

Sorry for my bad English.
Regards Michael
Attachments
pfad.JPG
pfad.JPG (49.49 KiB) Viewed 11153 times
 #7589  by jllort
 
But must be some error no ? because this kind of information we only can use imagination ... not good for trying to solve problems and helping you.
 #7611  by jllort
 
delete all files into cache/pdf
then try previewing the file
there's some error in server.log ? it must be something there, we're only interesting on it.

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.