Help with JODConverter Install

1,963 views
Skip to first unread message

Gallagher

unread,
Jun 30, 2012, 2:57:38 PM6/30/12
to jodcon...@googlegroups.com
Hi,

I've been trying to get JODConverter installed and running as a web service on a Windows 2008 box with Tomcat but I'm having no luck. Would anyone be willing to help? If needed I could pay you for assistance.

Thank you!

Gallagher

unread,
Jun 30, 2012, 3:06:16 PM6/30/12
to jodcon...@googlegroups.com
FYI, what I've be able to manage so far is installing OpenOffice, setting OO to run as a server using AlwaysUp. My problem is where/how to install the JODConverter. I don't have much experience with java. I tried coping and pasting the jodconverter-core-3.0-beta-4.jar file from the unzipped download I got from http://code.google.com/p/jodconverter/ into the Java\jre7\bin I then tried testing this via command line using command java -jar jodconverter-core-3.0-beta-4.jar -f pdf *.ppt but I get the following error (see below). Although I do see OO is running as a service listening on the port I set, when I check this by running command netstat -anp tcp in cmd prompt.

Error when run in Command Prompt:

Exception in thread "main" java.lang.IllegalStateException: officeHome not set and could not be auto-detected
at org.artofsolving.jodconverter.office.DefaultOfficeManagerConfiguration.buildOfficeManager(DefaultOfficeManagerConfiguration.java:163)
at org.artofsolving.jodconverter.cli.Convert.main(Convert.java:111)

Server/Software Details:
Windows 2008 Server
Tomcat installed (Java jre7)
ODConverter core 3 beta 4
Open Office (latest version)

holgt

unread,
Jun 30, 2012, 5:17:37 PM6/30/12
to jodcon...@googlegroups.com
Hi,

well i am wondering right now, why you did setup tomcat in this purpose, even so i would encourage you to go this way.
For the command line tool you will not need to have tomcat running at all.
The command line tool will want to use socket host OO listening on port 2002 (?) given DefaultOfficeManagerConfiguration.java.
Anyway coming back to tomcat setup as a service, AFAIK the common port there is 8100, if you managed to build the sample web app (which is gorgeous, and automatically manage more than one OO service) and configure tomcat to run it, or upload the build build .jar via the tomcat management tool.
Then in the other hand it is you upload the source file and request a output format, which in turn will deliver the converted document,:
e.g. outputFormat as 'pdf'  and inputDocument as fiel path using curl here ...
            c.setopt(c.HTTPPOST, [("inputDocument", (c.FORM_FILE, str(fin))), ("outputFormat", outputFormat)])

Anyway i used debian linux, and also i remember on other linuxes (gentoo e.g.) i explictly needed to compile OO from sources.
The steps on Windows might vary, but reading the logs i needed to do often ...

Cheers
Holger

Gallagher

unread,
Jun 30, 2012, 7:08:18 PM6/30/12
to jodcon...@googlegroups.com
Hi Holger!

Thank you for your reply. I'm still very unsure what to do here. I tried changing the port to 2002 and tried 8100 and either worked. What I'm trying to do is set up the JODConverter as a web service as described on this page http://www.artofsolving.com/node/15

Maybe I should sort of start over. So, let's start from how to install JODConverter? Once I've downloaded and unziped it, what do I do next?

Thanks in advance!

- Gallagher

Holger Trahe

unread,
Jun 30, 2012, 8:12:01 PM6/30/12
to jodcon...@googlegroups.com
Hi Gallagher,

well it seems you did download the source, but not build it.


states you will need maven build system, you can download from :

and also libsigar:

which should mean sigar.jar and also sigar-amd64-winnt.dll assuming you are using 64bit Windows,
it might help to use an IDE like Netbeans, which is able to open an maven based src project.
There you will first need to build the core, and ontop of the core the sample web app, which in the end you can deploy into tomcat,
basically, the tests may fail bcs of timing problems related to the startup and initialization of OO, but nevertheless the console output will tell you, if the connection and ports have been established, so you can skip the tests for the build, after you see the appropriate OO instances listening to the ports are fired up.

Cheers
Holger

--
You received this message because you are subscribed to the Google Groups "JODConverter" group.
To view this discussion on the web visit https://groups.google.com/d/msg/jodconverter/-/WGUCuXYeoV8J.
To post to this group, send email to jodcon...@googlegroups.com.
To unsubscribe from this group, send email to jodconverter...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/jodconverter?hl=en.

Reply all
Reply to author
Forward
0 new messages