officeHome doesn't exist or is not a directory

4,660 views
Skip to first unread message

Alaattin Kahramanlar

unread,
Jul 10, 2009, 7:08:19 AM7/10/09
to jodcon...@googlegroups.com
Hi,

today I made a fresh Debian installation and grabbed the backports.org OOo packages for OpenOffice 3.1. Then, 
got JODConverter 3.0-Beta and tried to execute it via CLI. But I get "officeHome doesn't exist or is not a directory: /opt/openoffice.org3"
error, I tried to make a symlink from /opt/openoffice3 to /usr/lib/openoffice/program/ where soffice.bin exists however
no resolution. Then I created the directory /opt/openoffice.org3 and created a symlink for the soffice.bin but unfortunately
no progress.

Am I required to configure this "officeHome" setting of am I allowed to do that via CLI? Or is there anything to be
configured by the system side?

Following is what I did, if you need to follow:

Regards,

Alaattin-

---

PDFMaker:~# java -version
java version "1.6.0_12"
Java(TM) SE Runtime Environment (build 1.6.0_12-b04)
Java HotSpot(TM) Client VM (build 11.2-b01, mixed mode, sharing)
PDFMaker:~# dpkg -l | grep openoffice.org
ii  openoffice.org                    1:3.1.0-5~bpo50+1          full-featured office productivity suite
ii  openoffice.org-base               1:3.1.0-5~bpo50+1          full-featured office productivity suite -- d
ii  openoffice.org-base-core          1:3.1.0-5~bpo50+1          full-featured office productivity suite -- s
ii  openoffice.org-calc               1:3.1.0-5~bpo50+1          full-featured office productivity suite -- s
ii  openoffice.org-common             1:3.1.0-5~bpo50+1          full-featured office productivity suite -- a
ii  openoffice.org-core               1:3.1.0-5~bpo50+1          full-featured office productivity suite -- a
ii  openoffice.org-draw               1:3.1.0-5~bpo50+1          full-featured office productivity suite -- d
ii  openoffice.org-emailmerge         1:3.1.0-5~bpo50+1          full-featured office productivity suite -- e
ii  openoffice.org-filter-binfilter   1:3.1.0-5~bpo50+1          full-featured office productivity suite -- l
ii  openoffice.org-filter-mobiledev   1:3.1.0-5~bpo50+1          full-featured office productivity suite -- m
ii  openoffice.org-impress            1:3.1.0-5~bpo50+1          full-featured office productivity suite -- p
ii  openoffice.org-java-common        1:3.1.0-5~bpo50+1          full-featured office productivity suite -- a
ii  openoffice.org-math               1:3.1.0-5~bpo50+1          full-featured office productivity suite -- e
ii  openoffice.org-officebean         1:3.1.0-5~bpo50+1          full-featured office productivity suite -- J
ii  openoffice.org-report-builder-bin 1:3.1.0-5~bpo50+1          OpenOffice.org extension for building databa
ii  openoffice.org-style-crystal      1:3.1.0-5~bpo50+1          full-featured office productivity suite -- C
ii  openoffice.org-style-galaxy       1:3.1.0-5~bpo50+1          full-featured office productivity suite -- G
ii  openoffice.org-style-tango        1:3.1.0-5~bpo50+1          full-featured office productivity suite -- T
ii  openoffice.org-writer             1:3.1.0-5~bpo50+1          full-featured office productivity suite -- w
PDFMaker:~# soffice -nologo -nofirststartwizard -headless -norestore -invisible "-accept=socket,host=localhost,port=8100,tcpNoDelay=1;urp;" &
[1] 6468
PDFMaker:~# ps aux | grep soffice
root      6468  0.0  0.4   2600  1144 pts/1    S    10:46   0:00 /bin/sh /usr/bin/soffice -nologo -nofirststartwizard -headless -norestore -invisible -accept=socket,host=localhost,port=8100,tcpNoDelay=1;urp;
root      6497  2.0  8.8  94108 23228 pts/1    Sl   10:46   0:00 /usr/lib/openoffice/program/soffice.bin -nologo -nofirststartwizard -headless -norestore -invisible -accept=socket,host=localhost,port=8100,tcpNoDelay=1;urp;
root      6503  0.0  0.1   1848   516 pts/1    S+   10:46   0:00 grep soffice
PDFMaker:~# java -jar /opt/artofsolving/jodconverter/3.0-Beta/lib/jodconverter-core-3.0-beta-3.jar /root/test.ppt /root/test.pdf
Exception in thread "main" java.lang.IllegalStateException: officeHome doesn't exist or is not a directory: /opt/openoffice.org3
        at org.artofsolving.jodconverter.office.DefaultOfficeManagerConfiguration.buildOfficeManager(DefaultOfficeManagerConfiguration.java:117)
        at org.artofsolving.jodconverter.cli.Convert.main(Convert.java:97)


PDFMaker:~# cd /opt/                          
PDFMaker:/opt# ln -s /usr/lib/openoffice/program/ openoffice.org3
PDFMaker:/opt# java -jar /opt/artofsolving/jodconverter/3.0-Beta/lib/jodconverter-core-3.0-beta-3.jar /root/test.ppt /root/test.pdf
Exception in thread "main" java.lang.IllegalStateException: invalid officeHome: it doesn't contain soffice.bin: /opt/openoffice.org3
        at org.artofsolving.jodconverter.office.DefaultOfficeManagerConfiguration.buildOfficeManager(DefaultOfficeManagerConfiguration.java:119)
        at org.artofsolving.jodconverter.cli.Convert.main(Convert.java:97)


PDFMaker:/opt# rm openoffice.org3
PDFMaker:/opt# mkdir openoffice.org3
PDFMaker:/opt# cd openoffice.org3/
PDFMaker:/opt/openoffice.org3# ln -s /usr/lib/openoffice/program/soffice.bin soffice.bin
PDFMaker:/opt/openoffice.org3# ls -l
lrwxrwxrwx 1 root root 39 Jul 10 10:55 soffice.bin -> /usr/lib/openoffice/program/soffice.bin
PDFMaker:/opt/openoffice.org3# java -jar /opt/artofsolving/jodconverter/3.0-Beta/lib/jodconverter-core-3.0-beta-3.jar /root/test.ppt /root/test.pdf
Exception in thread "main" java.lang.IllegalStateException: invalid officeHome: it doesn't contain soffice.bin: /opt/openoffice.org3
        at org.artofsolving.jodconverter.office.DefaultOfficeManagerConfiguration.buildOfficeManager(DefaultOfficeManagerConfiguration.java:119)
        at org.artofsolving.jodconverter.cli.Convert.main(Convert.java:97)

Mirko Nasato

unread,
Jul 10, 2009, 12:15:52 PM7/10/09
to jodcon...@googlegroups.com
Hi Alaattin,

Set the office.home as follows

$ java -Doffice.home=/usr/lib/openoffice -jar
lib/jodconverter-core-3.0-beta-3.jar ...

Kind regards

Mirko

2009/7/10 Alaattin Kahramanlar <alaa...@gmail.com>:

Rajinder Singh

unread,
Jul 12, 2013, 3:57:57 AM7/12/13
to jodcon...@googlegroups.com, alaa...@gmail.com

Hi I have same error using JOD converter
and i am using window
can you please tell me how to set officehome in window
thank you

hadv

unread,
Jul 12, 2013, 4:10:44 AM7/12/13
to jodcon...@googlegroups.com, alaa...@gmail.com
And you can also set the office home at runtime programmatically as below:

DefaultOfficeManagerConfiguration configuration = new DefaultOfficeManagerConfiguration();
configuration.setOfficeHome("path to your office home dir");
OfficeManager officeManager = configuration.buildOfficeManager();
OfficeDocumentConverter documentConverter = new OfficeDocumentConverter(officeManager);
officeManager.start();

Hope this help!
--HA

Rajinder Singh

unread,
Jul 12, 2013, 5:34:36 AM7/12/13
to jodcon...@googlegroups.com, alaa...@gmail.com
@hadv
first thank for reply
this code of solution is not working out

I am getting below set of exception on setting openoffice path

SEVERE: Exception sending context initialized event to listener instance of class {project.package}.WebappContextListener
java.lang.IllegalStateException: invalid officeHome: it doesn't contain soffice.bin: C:\Program Files (x86)\OpenOffice.org 3\program
    at org.artofsolving.jodconverter.office.DefaultOfficeManagerConfiguration.buildOfficeManager(DefaultOfficeManagerConfiguration.java:140)
    at {project.package}.WebappContext.<init>(WebappContext.java:74)
    at {project.package}.WebappContext.init(WebappContext.java:79)
    at {project.package}.WebappContextListener.contextInitialized(WebappContextListener.java:9)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4791)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5285)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:618)
    at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:650)
    at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1582)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
    at java.util.concurrent.FutureTask.run(FutureTask.java:166)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:724)

another exception
SEVERE: Exception sending context destroyed event to listener instance of class {project.package}.WebappContextListener
java.lang.NullPointerException
    at {project.package}.WebappContext.destroy(WebappContext.java:87)
    at {project.package}.WebappContextListener.contextDestroyed(WebappContextListener.java:13)
    at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4831)
    at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5478)
    at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:160)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:618)
    at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:650)
    at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1582)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
    at java.util.concurrent.FutureTask.run(FutureTask.java:166)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:724)


my open office port is working (thourgh netstat -anpo tcp)
as  TCP    127.0.0.1:8100         0.0.0.0:0              LISTENING       2472


 


On Friday, July 10, 2009 4:38:19 PM UTC+5:30, Alaattin Kahramanlar wrote:

hadv

unread,
Jul 12, 2013, 5:47:32 AM7/12/13
to jodcon...@googlegroups.com, alaa...@gmail.com
Please confirm that your office home is correct!

Rajinder Singh

unread,
Jul 12, 2013, 5:52:06 AM7/12/13
to jodcon...@googlegroups.com, alaa...@gmail.com
How to do this..
I didnt get you
My open office is installed at
the given location

hadv

unread,
Jul 12, 2013, 5:55:44 AM7/12/13
to jodcon...@googlegroups.com, alaa...@gmail.com
Hi,

Can you post your source code, please?

I want to see which path you set for the office.home.

And FYI, the JodConverter ver. 3 will start the office automatically, you dont need to start manually by command line.

Gud luck!

-- HA
Reply all
Reply to author
Forward
0 new messages