Error in application/msword to PDF conversion

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.
Erno
Junior Boarder
Junior Boarder
Posts: 22
Joined: Mon Nov 22, 2010 4:56 pm

Re: Error in application/msword to PDF conversion

Post by Erno » Thu Dec 02, 2010 11:27 pm

I have never used openoffice-headless as CLI application. Can you tell me what commands i should run to test it?

Erno
Junior Boarder
Junior Boarder
Posts: 22
Joined: Mon Nov 22, 2010 4:56 pm

Re: Error in application/msword to PDF conversion

Post by Erno » Thu Dec 02, 2010 11:38 pm

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

rstone
Fresh Boarder
Fresh Boarder
Posts: 1
Joined: Fri Dec 03, 2010 1:40 am

Re: Error in application/msword to PDF conversion

Post by rstone » Fri Dec 03, 2010 6:50 am

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)


pavila
Moderator
Moderator
Posts: 3051
Joined: Tue Dec 11, 2007 6:02 pm
Location: Alicante, Spain
Contact:

Re: Error in application/msword to PDF conversion

Post by pavila » Thu Dec 09, 2010 10:54 am

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.

Erno
Junior Boarder
Junior Boarder
Posts: 22
Joined: Mon Nov 22, 2010 4:56 pm

Re: Error in application/msword to PDF conversion

Post by Erno » Thu Dec 09, 2010 11:50 am

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

mari43
Fresh Boarder
Fresh Boarder
Posts: 1
Joined: Tue Dec 14, 2010 2:33 am

Re: Error in application/msword to PDF conversion

Post by mari43 » Tue Dec 14, 2010 2:40 am

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

Erno
Junior Boarder
Junior Boarder
Posts: 22
Joined: Mon Nov 22, 2010 4:56 pm

Re: Error in application/msword to PDF conversion

Post by Erno » Tue Dec 14, 2010 8:56 am

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.

pavila
Moderator
Moderator
Posts: 3051
Joined: Tue Dec 11, 2007 6:02 pm
Location: Alicante, Spain
Contact:

Re: Error in application/msword to PDF conversion

Post by pavila » Wed Dec 15, 2010 12:30 pm

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.

Erno
Junior Boarder
Junior Boarder
Posts: 22
Joined: Mon Nov 22, 2010 4:56 pm

Re: Error in application/msword to PDF conversion

Post by Erno » Wed Dec 15, 2010 9:02 pm

Jboss/OpenKM runs as root. It of course has all the permissions.

Erno
Junior Boarder
Junior Boarder
Posts: 22
Joined: Mon Nov 22, 2010 4:56 pm

Re: Error in application/msword to PDF conversion

Post by Erno » Thu Dec 16, 2010 1:26 pm

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.

nightskull
Fresh Boarder
Fresh Boarder
Posts: 3
Joined: Fri Oct 08, 2010 5:14 am

Re: Error in application/msword to PDF conversion

Post by nightskull » Thu Dec 16, 2010 7:57 pm

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 6140 times

Erno
Junior Boarder
Junior Boarder
Posts: 22
Joined: Mon Nov 22, 2010 4:56 pm

Re: Error in application/msword to PDF conversion

Post by Erno » Thu Dec 16, 2010 8:09 pm

thanks nightskull, its fixed the problem, now i have the original issue again (could not load document: okm1168057070023039807.doc)...

jllort
Moderator
Moderator
Posts: 10341
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

Re: Error in application/msword to PDF conversion

Post by jllort » Fri Dec 17, 2010 11:07 am

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.

Erno
Junior Boarder
Junior Boarder
Posts: 22
Joined: Mon Nov 22, 2010 4:56 pm

Re: Error in application/msword to PDF conversion

Post by Erno » Fri Dec 17, 2010 12:35 pm

We would need more debug messages.

jllort
Moderator
Moderator
Posts: 10341
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

Re: Error in application/msword to PDF conversion

Post by jllort » Fri Dec 17, 2010 7:51 pm

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.

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests