Julien, it's working. It's breathtakingly simple, but I
couldn't have done it without you.

At first, looking at 
nuxeo-platform-convert/src/main/java/org/nuxeo/ecm/platform/
convert/ooomanager/OOoManagerComponent.java, I thought it
was the hard-wired DEFAULT_LINUX_OO_HOME variable. In the
source file this points to /usr/lib/openoffice/, which is
exactly where it is on Ubuntu (where I know the preview
works out of the box). I created a symbolic link on FreeBSD,
and it still couldn't find it.

I tinkered with loads of possible values in jod.office.home
and jod.jpipe.lib.path, and nothing did it.

Finally I changed the port in bin/openofficectl to 2003,
having already changed the OOO_HOME and USER values to the
FreeBSD OpenOffice installation location and root,
respectively, because this is where jod keeps looking to
connect all the time, no matter what (unless I change it in
the templates I guess):
        
        INFO: starting process with acceptString
'socket,host=127.0.0.1,port=2003,tcpNoDelay=1' and
profileDir 
'/tmp/nuxeo-dm-5.4.2-tomcat/tmp/.jodconverter_socket_host-12
7.0.0.1_port-2003'

And, it worked. I've now gone through all the paring back to
default I can think of, and this is the situation:

- Start with a fresh nuxeo-dm-5.4.2 distribution zip
(tomcat)
- Edit bin/nuxeo.conf and add the jod.office.home 
(jod.office.home=/usr/local/openoffice.org-3.3.0/openoffice.
org3, in my case)
- Edit bin/openofficectl, modify OOO_HOME
(OOO_HOME=/usr/local/openoffice.org-3.3.0/openoffice.org3,
in my case), and the USER (root, in my case, while I'm
testing)
- and change the following line:

    su - $USER -c "$OOO_HOME/program/soffice.bin -headless
-nofirststartwizard 
-accept='socket,host=localhost,port=8100;urp;StarOffice.Serv
ice' "
& > /dev/null 2>&1

  to:

    su - $USER -c "$OOO_HOME/program/soffice.bin -headless
-nofirststartwizard 
-accept='socket,host=localhost,port=2003;urp;StarOffice.Serv
ice' " &
 > /dev/null 2>&1

- And it won't work. Yet. Not until the distributed
nxserver/lib/jodconverter-core-3.0-NX3.jar is replaced with
the one contributed by you, Julien, earlier in this
discussion. Without it, the error I noted in the original
post will still occur:

    ERROR [OSGiRuntimeService] Failed to notify components
on application started java.lang.NullPointerException

and the preview won't work, failing with the same error:

    ERROR [PreviewRestlet] could not build preview for
missing blob at default
org.nuxeo.ecm.platform.preview.api.PreviewException:
Converter any2pdf is not available
- Then start the soffice listener by running
./bin/openofficectl start, then start the DM, ./bin/nuxeoctl
start, and you're good to go.


Julien, once again, thank you for your assistance in getting
this resolved. I know that all this tinkering is 'dirty' and
isn't an elegant solution, as it should ideally be possible
to set openoffice listener values in the first run wizard
and later in the administrative control panel. As others
will undoubtedly hit upon the same problem, and as your link
to the jodconverter patch above may break, could you bump up
the nuxeo-dm distribution, including your patch, please?
---
Mailing list: [email protected]
Forum: http://forum.nuxeo.org/f/1/

Reply via email to