[ 
https://jira.nuxeo.com/browse/NXP-7177?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=97932#comment-97932
 ] 

Julien Carsique commented on NXP-7177:
--------------------------------------

[quote=sachamasry from http://forum.nuxeo.com/t/5124/]
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.Service' " & > 
/dev/null 2>&1
  to:
    su - $USER -c "$OOO_HOME/program/soffice.bin -headless -nofirststartwizard 
-accept='socket,host=localhost,port=2003;urp;StarOffice.Service' " & > 
/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.
[quote]

> Jodconverter must not raise a NPE on unkown OS
> ----------------------------------------------
>
>                 Key: NXP-7177
>                 URL: https://jira.nuxeo.com/browse/NXP-7177
>             Project: Nuxeo Enterprise Platform
>          Issue Type: Bug
>    Affects Versions: 5.4.2
>            Reporter: Julien Carsique
>            Assignee: Julien Carsique
>             Fix For: 5.4.3
>
>
> 17:14:57,898 ERROR [OSGiRuntimeService] Failed to notify components on 
> application started
> java.lang.NullPointerException
> at java.util.Arrays$ArrayList.<init>(Arrays.java:3357)
> at java.util.Arrays.asList(Arrays.java:3343)
> at 
> org.artofsolving.jodconverter.util.PlatformUtils.findOfficeHome(PlatformUtils.java:108)
> at 
> org.artofsolving.jodconverter.office.OfficeUtils.getDefaultOfficeHome(OfficeUtils.java:85)
> at org.artofsolving.jodconverter.office.DefaultOfficeManagerConfiguration. 
> <init>(DefaultOfficeManagerConfiguration.java:33)
> at 
> org.nuxeo.ecm.platform.convert.ooomanager.OOoManagerComponent.startOOoManager(OOoManagerComponent.java:107)
> at 
> org.nuxeo.ecm.platform.convert.ooomanager.OOoManagerComponent.applicationStarted(OOoManagerComponent.java:212)
> at 
> org.nuxeo.runtime.model.impl.RegistrationInfoImpl.notifyApplicationStarted(RegistrationInfoImpl.java:321)
> at 
> org.nuxeo.runtime.osgi.OSGiRuntimeService.notifyComponentsOnStarted(OSGiRuntimeService.java:458)
> at 
> org.nuxeo.runtime.osgi.OSGiRuntimeService.fireApplicationStarted(OSGiRuntimeService.java:483)
> at 
> org.nuxeo.runtime.osgi.OSGiRuntimeService.frameworkEvent(OSGiRuntimeService.java:493)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        
_______________________________________________
ECM-tickets mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm-tickets

Reply via email to