JOD and Jenkins as Windows service

127 views
Skip to first unread message

flsobral

unread,
Apr 2, 2012, 11:29:00 AM4/2/12
to JODConverter
Hi everyone!

I've been using JODConverter with Jenkins for over a year now.
The JODConverter is actually started by the ANT target below, which is
executed by Jenkins:

<!-- Get the Open Office path -->
<win32.registry root="HKEY_LOCAL_MACHINE" key="SOFTWARE\\Microsoft\
\Windows\\CurrentVersion\\App Paths\\soffice.exe">
<get property="soffice.path" entry="Path"/>
</win32.registry>

<java classname="org.artofsolving.jodconverter.cli.Convert"
fork="yes" dir="${env.ANT_HOME}/lib">
<classpath>
<fileset dir="${env.ANT_HOME}/lib">
<include name="jodconverter-core*.jar"/>
</fileset>
</classpath>
<!-- set the environment variable office.home with the soffice path
-->
<sysproperty key="office.home" value="${soffice.path}"/>
<arg line='"${source.path}/docs/file.odt"'/>
<arg line='"${target.path}/docs/file.pdf"'/>
</java>

It works fine when I'm running Jenkins using the war dist with Tomcat
running on a regular user account. But recently I've decided to move
to the Windows service dist of Jenkins and now the build fails with
the following stack trace:

[java] 30/03/2012 18:18:26
org.artofsolving.jodconverter.office.ProcessPoolOfficeManager <init>
[java] INFO: ProcessManager implementation is
PureJavaProcessManager
[java] 30/03/2012 18:18:26
org.artofsolving.jodconverter.office.OfficeProcess start
[java] INFO: starting process with acceptString
'socket,host=127.0.0.1,port=2002,tcpNoDelay=1' and profileDir 'C:
\Windows\TEMP\.jodconverter_socket_host-127.0.0.1_port-2002'
[java] 30/03/2012 18:18:26
org.artofsolving.jodconverter.office.OfficeProcess start
[java] INFO: started process
[java] Exception in thread "main"
org.artofsolving.jodconverter.office.OfficeException: failed to start
and connect
[java] at
org.artofsolving.jodconverter.office.ManagedOfficeProcess.startAndWait(ManagedOfficeProcess.java:
64)
[java] at
org.artofsolving.jodconverter.office.PooledOfficeManager.start(PooledOfficeManager.java:
101)
[java] at
org.artofsolving.jodconverter.office.ProcessPoolOfficeManager.start(ProcessPoolOfficeManager.java:
62)
[java] at
org.artofsolving.jodconverter.cli.Convert.main(Convert.java:112)
[java] Caused by: java.util.concurrent.ExecutionException:
org.artofsolving.jodconverter.office.OfficeException: could not
establish connection
[java] at java.util.concurrent.FutureTask
$Sync.innerGet(FutureTask.java:222)
[java] at java.util.concurrent.FutureTask.get(FutureTask.java:
83)
[java] at
org.artofsolving.jodconverter.office.ManagedOfficeProcess.startAndWait(ManagedOfficeProcess.java:
62)
[java] ... 3 more
[java] Caused by:
org.artofsolving.jodconverter.office.OfficeException: could not
establish connection
[java] at
org.artofsolving.jodconverter.office.ManagedOfficeProcess.doStartProcessAndConnect(ManagedOfficeProcess.java:
142)
[java] at
org.artofsolving.jodconverter.office.ManagedOfficeProcess.access
$000(ManagedOfficeProcess.java:31)
[java] at
org.artofsolving.jodconverter.office.ManagedOfficeProcess
$1.run(ManagedOfficeProcess.java:58)
[java] at java.util.concurrent.Executors
$RunnableAdapter.call(Executors.java:441)
[java] at java.util.concurrent.FutureTask
$Sync.innerRun(FutureTask.java:303)
[java] at java.util.concurrent.FutureTask.run(FutureTask.java:
138)
[java] at java.util.concurrent.ThreadPoolExecutor
$Worker.runTask(ThreadPoolExecutor.java:886)
[java] at java.util.concurrent.ThreadPoolExecutor
$Worker.run(ThreadPoolExecutor.java:908)
[java] at java.lang.Thread.run(Thread.java:662)
[java] Caused by:
org.artofsolving.jodconverter.office.OfficeException: office process
died with exit code -1073741515
[java] at
org.artofsolving.jodconverter.office.ManagedOfficeProcess
$6.attempt(ManagedOfficeProcess.java:136)
[java] at
org.artofsolving.jodconverter.office.Retryable.execute(Retryable.java:
40)
[java] at
org.artofsolving.jodconverter.office.Retryable.execute(Retryable.java:
30)
[java] at
org.artofsolving.jodconverter.office.ManagedOfficeProcess.doStartProcessAndConnect(ManagedOfficeProcess.java:
120)
[java] ... 8 more
[java] Java Result: 1


Any ideas of what may be wrong?

TIA,

Fabio.

flsobral

unread,
Apr 2, 2012, 11:52:01 AM4/2/12
to JODConverter
I kept searching about this problem and just found the issue 103:
http://code.google.com/p/jodconverter/issues/detail?id=103

I forgot to mention I decided to try Jenkins as a Winodws service
because I'm configuring a new computer to use as a build server, and I
just checked and it has LibreOffice 3.5 installed, and I'm guessing
the old server had a previous version of LibreOffice.

I'm gonna try using the LibreOffice 3.4.6, hopefully this should solve
my problem.

flsobral

unread,
Apr 2, 2012, 5:29:27 PM4/2/12
to JODConverter
Moving back to LibreOffice 3.4.6 solved my problem! :)
Reply all
Reply to author
Forward
0 new messages