[Java solution] "no office executable found!"

Java, C++, C#, Delphi, ??? - Using the UNO bridges

Re: [Java solution] "no office executable found!"

Postby sekkuar » Wed Aug 17, 2011 6:39 pm

Hello again,

I say, this is a really good solution.


I made it work right on windows 7, however, I can't make it work at all on my new Ubuntu

first, I can't install "OpenOffice", it only lets me install the new LibreOffice, which suposedly should work
as it is OpenOffice-based.

It have all those jars too, but I can't figure the right files
After looking a lot on my System, I found a "soffice.sh" on "/etc/libreoffice"

Trying putting this as String for the bootstrap, but it gets me a "BootstrapException"

any ideas how can I make this work? thanks in advance

edit:
here's the stack trace... not very helpful
Code: Select all   Expand viewCollapse view
        at ooo.connector.BootstrapConnector.connect(BootstrapConnector.java:129)
   at ooo.connector.BootstrapSocketConnector.connect(BootstrapSocketConnector.java:68)
   at ooo.connector.BootstrapSocketConnector.connect(BootstrapSocketConnector.java:45)
   at ooo.connector.BootstrapSocketConnector.bootstrap(BootstrapSocketConnector.java:82)
   at br.com.virou.contas.Recibo.getRemoteServiceManager(Recibo.java:235)


my code is like this, as I said, it works on windows with the right String
Code: Select all   Expand viewCollapse view
private XMultiComponentFactory getRemoteServiceManager()
        throws java.lang.Exception
    {
        if (mxRemoteContext == null && mxRemoteServiceManager == null) {
            // get the remote office context. If necessary a new office
            // process is started
            String oooExeFolder = "/etc/libreoffice";
                    //"C:/Program Files (x86)/OpenOffice.org 3/program";
            mxRemoteContext = BootstrapSocketConnector.bootstrap(oooExeFolder); //Here is the Exception
            System.out.println("Connected to a running office ...");
            mxRemoteServiceManager = mxRemoteContext.getServiceManager();
            Object oDesktop =  mxRemoteServiceManager.createInstanceWithContext
                    ("com.sun.star.frame.Desktop", mxRemoteContext);
            xDesk = (com.sun.star.frame.XDesktop) UnoRuntime.queryInterface(
                    com.sun.star.frame.XDesktop.class, oDesktop);
        }
        return mxRemoteServiceManager;       
    }   


also, this is the version I got from LibreOffice help>>about

LibreOffice 3.3.3
OOO330m19 (Build:301)
tag libreoffice-3.3.3.1, Ubuntu package 1:3.3.3-1ubuntu2
OpenOffice 3.3 on Windows 7 Professional
LibreOffice 3.3.3 on Ubuntu 11.04
sekkuar
 
Posts: 3
Joined: Mon May 16, 2011 4:43 pm

Re: [Java solution] "no office executable found!"

Postby sekkuar » Wed Aug 17, 2011 9:16 pm

oh

nevermind, I found the right file

the actual path is

/usr/lib/libreoffice/program

then it works again.
OpenOffice 3.3 on Windows 7 Professional
LibreOffice 3.3.3 on Ubuntu 11.04
sekkuar
 
Posts: 3
Joined: Mon May 16, 2011 4:43 pm

Re: [Java solution] "no office executable found!"

Postby sudhanshu » Thu Nov 27, 2014 5:21 pm

Hi guys,
I am using OpenOffice.org 3 when I run my web application on server with multiple request for converting odt to pdf i am getting error "com.sun.star.uno.RuntimeException: socket,host=localhost,port=8100;urp already exists". I tried to make my code synchronized also but still I am getting the same error.
If you guys have any solution or can suggest something please help me
OpenOffice.org 3, windows 7
sudhanshu
 
Posts: 2
Joined: Thu Nov 27, 2014 5:13 pm

Previous

Return to External Programs

Who is online

Users browsing this forum: No registered users and 1 guest