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 » Fri Dec 17, 2010 8:40 pm

Cache is purged, write permissions are fine, logs are all the same as earlier. Please include more debug messages.

jllort
Moderator
Moderator
Posts: 10244
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 » Sun Dec 19, 2010 6:49 pm

There's no error on log, please post here the log - only the part - where you're converting a document to a pdf

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 » Sun Dec 19, 2010 7:20 pm

Code: Select all

2010-12-17 21:34:53,355 INFO  [com.openkm.util.DocConverter] *** Build Office Manager ***
2010-12-17 21:34:53,474 ERROR [STDERR] Dec 17, 2010 9:34:53 PM org.artofsolving.jodconverter.office.ProcessPoolOfficeManager <init>
INFO: ProcessManager implementation is UnixProcessManager
2010-12-17 21:34:53,590 ERROR [STDERR] Dec 17, 2010 9:34:53 PM org.artofsolving.jodconverter.office.OfficeProcess start
INFO: 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'
2010-12-17 21:34:53,695 ERROR [STDERR] Dec 17, 2010 9:34:53 PM org.artofsolving.jodconverter.office.OfficeProcess start
INFO: started process; pid = 9828
2010-12-17 21:34:54,331 DEBUG [com.openkm.util.Update] query(819174982753882200300-2796848830)
2010-12-17 21:34:55,045 DEBUG [com.openkm.util.Update] query:
2010-12-17 21:34:55,336 ERROR [STDERR] Dec 17, 2010 9:34:55 PM org.artofsolving.jodconverter.office.OfficeConnection connect
INFO: connected: 'socket,host=127.0.0.1,port=2002,tcpNoDelay=1'
2010-12-17 21:34:55,340 WARN  [com.openkm.util.ExecutionUtils] Unable to read script: /web/web/host/foobar.hu/openkm50/start.bsh
...
2010-12-17 21:38:27,280 DEBUG [com.openkm.util.DocConverter] ** Convert from application/msword to PDF **
2010-12-17 21:38:27,281 DEBUG [com.openkm.util.DocConverter] convert(/tmp/okm380966914188629727.doc, application/msword, /web/web/host/foobar.hu/openkm50/cache/pdf/be728040-a7a4-47fe-90e3-8e5353733b44.pdf)
2010-12-17 21:38:27,454 ERROR [com.openkm.util.DocConverter] Error in application/msword to PDF conversion
2010-12-17 21:38:27,454 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:194)
        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 converting document: could not load document: okm380966914188629727.doc
        at com.openkm.util.DocConverter.convert(DocConverter.java:170)
        at com.openkm.util.DocConverter.doc2pdf(DocConverter.java:189)
        ... 21 more
2010-12-17 21:38:27,513 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)

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 » Sun Dec 19, 2010 7:30 pm

Please add more debug messages into the SVN version.

jllort
Moderator
Moderator
Posts: 10244
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 » Tue Dec 21, 2010 9:43 am

About it:

Code: Select all

2010-12-17 21:38:27,281 DEBUG [com.openkm.util.DocConverter] convert(/tmp/okm380966914188629727.doc, application/msword, /web/web/host/foobar.hu/openkm50/cache/pdf/be728040-a7a4-47fe-90e3-8e5353733b44.pdf)
That user has grants to write into tmp folder ? you might debug application, it's no a problem to adding more logs ... the error is a IO error the file not exists, take a look at tmp folder while you're trying conversion ... it generates any file ?

We're looking for app problem, but really I think it's not there ... all our installations runs fine in windows and linux systems ... I continue thinking you've got a problem on tmp folder creation.

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 21, 2010 12:06 pm

The application runs as root. It definetly has write permission to /tmp.
Just tell me how could I be sure if a temp file existed for a few milliseconds? Of course I cannot.
We need more debug messages here, at the point when OpenKM tries to copy/create the .doc file.

jllort
Moderator
Moderator
Posts: 10244
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 » Wed Dec 22, 2010 7:13 am

We can try a more interesting operation, remotelly debug jboss server.

Go to http://wiki.openkm.com/index.php/Developer_Guide
Intall development IDE as is explained in guide
Checkout the source code from svn ( version 5.0 stable )
In this page it's explained how doing remote debuging jboss server http://wiki.openkm.com/index.php/Debugg ... ote_server I think it's gthe best option.

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 22, 2010 10:26 am

After checking out the source code from SVN, I realized your recommendation with remote jboss debugging has no sense as the issue has nothing to do with OpenKM but JODConverter. After some debugging, I figured it out that the real error is the already pasted "Caused by: com.sun.star.lang.IllegalArgumentException: URL seems to be an unsupported one." After some query to google I found a forum post with the solution, openoffice.org-writer is needed to be installed and everything works like a charm.

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

Re: Error in application/msword to PDF conversion

Post by pavila » Thu Jan 20, 2011 12:22 pm

Conversion logic has been improved in OpenKm 5.0.1 (actually under development, but you can grab a nightbuild from http://integration.openkm.com/5.0/OpenKM.war). Please, test it and tell us if the problem persist.

joel.alexandre
Fresh Boarder
Fresh Boarder
Posts: 9
Joined: Mon Jan 17, 2011 7:03 am

Re: Error in application/msword to PDF conversion

Post by joel.alexandre » Sun Jan 30, 2011 1:04 am

I have the same problem -

Code: Select all

 Error converting document: could not load document: okm303231042220094485.doc
The process openoffice process is started by openkm and is running:

Code: Select all

root     31274  0.0  4.0 476068 42072 pts/3    Sl+  00:53   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 -norestore
i execute bin/run.sh as root.

I'm running openkm 5.0.1.

Converter Debug:

Code: Select all

2011-01-30 01:06:36,598 DEBUG [com.openkm.util.DocConverter] convert(/tmp/okm7865257857575822274.doc, application/msword, /opt/openkm-5.0.1/jboss-4.2.3.GA/ca
che/pdf/7b2c3e37-471e-468b-94dc-59b1bd88d989.pdf)
2011-01-30 01:06:36,697 ERROR [com.openkm.util.DocConverter] Error in application/msword to PDF conversion
2011-01-30 01:06:36,698 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:195)
        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:662)
Caused by: java.io.IOException: Error converting document: could not load document: okm7865257857575822274.doc
        at com.openkm.util.DocConverter.convert(DocConverter.java:171)
        at com.openkm.util.DocConverter.doc2pdf(DocConverter.java:190)
        ... 21 more
2011-01-30 01:06:36,702 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:662)
I've checked and the file "/tmp/okm7865257857575822274.doc" does not exist.

/tmp has write permition to the world:

Code: Select all

drwxrwxrwt 15 root root 4096 Jan 30 01:06 /tmp

jllort
Moderator
Moderator
Posts: 10244
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 » Sun Jan 30, 2011 10:21 am

Are you using OpenKM version 5.0.1 ? or 5.0 ?

joel.alexandre
Fresh Boarder
Fresh Boarder
Posts: 9
Joined: Mon Jan 17, 2011 7:03 am

Re: Error in application/msword to PDF conversion

Post by joel.alexandre » Sun Jan 30, 2011 10:30 am

jllort wrote:Are you using OpenKM version 5.0.1 ? or 5.0 ?
5.0.1

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 » Sun Jan 30, 2011 12:12 pm

I cant really understand why even the devs are mentally handycapped here, I clearly stated the problem was fixed, and even shared the solution.

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

Re: Error in application/msword to PDF conversion

Post by pavila » Mon Feb 14, 2011 3:57 pm

Is quite weird for me. I have included enhancements in document conversion logic and can't reproduce the problem in any way. Also I have made lots of OpenKM installations and never encountered that problem. The only issue which can deliver that error which can't find the desired file is a conversion problem. But with the appropriate debug log level should be found in the log. See DocConverter source code and tell me how can I improve it.

cnzhcn
Fresh Boarder
Fresh Boarder
Posts: 5
Joined: Thu Mar 17, 2011 2:53 am

Re: Error in application/msword to PDF conversion

Post by cnzhcn » Tue Mar 29, 2011 11:15 am

hi ,
i used openkm on win7. Just now ,i met this problem ,but i solved it now . My solution is:
  • 1. download and install OpenKM v5.0.3
  • 2. download and install openoffice3.3
  • 3. download and install swftools
  • 4. modify OpenKM.cfg file like this :

Code: Select all

system.openoffice.path=D:/Program Files/OpenOffice.org 3/
system.pdf2swf=D:/Program Files/SWFTools/pdf2swf
it works , i hope this works for you too.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest