You are viewing a plain text version of this content. The canonical link for it is here.
Posted to api@openoffice.apache.org by Wei Min Teo <sh...@hotmail.com> on 2013/09/18 11:37:36 UTC

cppu::bootstrap() does not work with OpenOffice 4.0.0

Hi,
I'm writing in C++ and testing on OpenOffice 4.0.0. I encountered a problem where cppu::bootstrap() throws a cppu::BootstrapException with the message "no soffice installation found!". 
Prior to this, I have started the soffice process and passed in the -accept flag to open up a listening port. Running netstat has confirmed this. However, bootstrap still fails. This code was previously working with OO 3.x. 
It'll be great if anyone can give me some advice on this.
Thanks.


Cheers,
Wei Min 		 	   		  

Re: cppu::bootstrap() does not work with OpenOffice 4.0.0

Posted by Shemil Hashan <sh...@gmail.com>.
when i was going to test the example(RNG) which provided in
"calc/Add-in/Simple Calc Add-In" tutorial in Apache open office wiki I got
the error "cppuhelper/implbase4.hxx: No such file or directory" while
exucuting make file. Can you give a solution for this problem?


On Wed, Sep 18, 2013 at 5:37 AM, Wei Min Teo <sh...@hotmail.com> wrote:

> Hi,
> I'm writing in C++ and testing on OpenOffice 4.0.0. I encountered a
> problem where cppu::bootstrap() throws a cppu::BootstrapException with the
> message "no soffice installation found!".
> Prior to this, I have started the soffice process and passed in the
> -accept flag to open up a listening port. Running netstat has confirmed
> this. However, bootstrap still fails. This code was previously working with
> OO 3.x.
> It'll be great if anyone can give me some advice on this.
> Thanks.
>
>
> Cheers,
> Wei Min

Re: cppu::bootstrap() does not work with OpenOffice 4.0.0

Posted by Jürgen Schmidt <jo...@gmail.com>.
On 9/18/13 11:37 AM, Wei Min Teo wrote:
> Hi,
> I'm writing in C++ and testing on OpenOffice 4.0.0. I encountered a problem where cppu::bootstrap() throws a cppu::BootstrapException with the message "no soffice installation found!". 
> Prior to this, I have started the soffice process and passed in the -accept flag to open up a listening port. Running netstat has confirmed this. However, bootstrap still fails. This code was previously working with OO 3.x. 
> It'll be great if anyone can give me some advice on this.
> Thanks.
> 
 which operating system you are using?

when  you want to use a specific connecton url you have to use the
XUnoUrlResolver to connect.

cppu:bootstrap() looks for the default office installed on your system,
start it on demand and connect to it.

I need more info about your work environment . Have you tried the SDK
samples?

Juergen


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
For additional commands, e-mail: dev-help@openoffice.apache.org


Re: cppu::bootstrap() does not work with OpenOffice 4.0.0

Posted by Shemil Hashan <sh...@gmail.com>.
when i was going to test the example(RNG) which provided in
"calc/Add-in/Simple Calc Add-In" tutorial in Apache open office wiki I got
the error "cppuhelper/implbase4.hxx: No such file or directory" while
exucuting make file. Can you give a solution for this problem?


On Wed, Sep 18, 2013 at 5:37 AM, Wei Min Teo <sh...@hotmail.com> wrote:

> Hi,
> I'm writing in C++ and testing on OpenOffice 4.0.0. I encountered a
> problem where cppu::bootstrap() throws a cppu::BootstrapException with the
> message "no soffice installation found!".
> Prior to this, I have started the soffice process and passed in the
> -accept flag to open up a listening port. Running netstat has confirmed
> this. However, bootstrap still fails. This code was previously working with
> OO 3.x.
> It'll be great if anyone can give me some advice on this.
> Thanks.
>
>
> Cheers,
> Wei Min

RE: cppu::bootstrap() does not work with OpenOffice 4.0.0

Posted by Wei Min Teo <sh...@hotmail.com>.
Hi,
1) I've tried the code in: http://wiki.openoffice.org/wiki/Documentation/DevGuide/ProUNO/C%2B%2B/Establishing_Interprocess_Connections
However, it fails at the following call:     // instantiate a sample service with the service manager.
     Reference< XInterface > rInstance =
         rServiceManager->createInstanceWithContext( 
         OUString::createFromAscii("com.sun.star.bridge.UnoUrlResolver" ),
         rComponentContext );A null object was returned.
2) I have also tried to set the UNO_PATH as an environment variable. I set it as "C:\program files\openoffice 4\program". However, the bootstrap exception was thrown: "No soffice installation!".
Thanks.
> Date: Thu, 19 Sep 2013 12:31:47 +0200
> From: jogischmidt@gmail.com
> To: api@openoffice.apache.org
> Subject: Re: cppu::bootstrap() does not work with OpenOffice 4.0.0
> 
> On 9/19/13 12:14 PM, Ariel Constenla-Haile wrote:
> > Hi,
> > 
> > On Thu, Sep 19, 2013 at 01:46:16PM +0800, Wei Min Teo wrote:
> >> Hi all, Thanks for all replies.  The OS that I tested on is
> >> Windows XP. The reason why I started a openoffice process in
> >> listening mode is to run an invisible instance that runs in the
> >> background for automated tasks.  Ariel Constenla-Haile have
> >> tested that the simple bootstrap example from the SDK. Anything
> >> else I can try? Are there alternate methods to bootstrap?
> > 
> > Yes. If the simple bootstrap mechanism is broken, you have to use
> > the old method of first starting the office listening for
> > interprocess connections.
> > 
> > Documentation: 
> > http://wiki.openoffice.org/wiki/Documentation/DevGuide/ProUNO/UNO_Interprocess_Connections
> >
> > 
> http://wiki.openoffice.org/wiki/Documentation/DevGuide/ProUNO/C%2B%2B/Establishing_Interprocess_Connections
> > 
> > Sample code: - in the SDK installation, C++ examples using the 
> > com.sun.star.bridge.UnoUrlResolver
> > 
> > examples/DevelopersGuide/ProfUNO/CppBinding/office_connect.cxx 
> > examples/cpp/DocumentLoader/DocumentLoader.cxx
> > 
> > - there is a C++ "connection aware client" in 
> > http://svn.apache.org/viewvc/openoffice/devtools/sdk-examples/trunk/cpp/cppbindings/ConnectionAwareClient/
> >
> > 
> or setting the UNO_PATH variable to specify exactly which office
> should be used. In case of testing this should be used anyway.
> Otherwise the default office on the system is used but probably not
> wanted for the test.
> 
> The fix for the bootstrap problem is available.
> 
> Juergen
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: api-unsubscribe@openoffice.apache.org
> For additional commands, e-mail: api-help@openoffice.apache.org
> 
 		 	   		  

Re: cppu::bootstrap() does not work with OpenOffice 4.0.0

Posted by Jürgen Schmidt <jo...@gmail.com>.
On 9/19/13 12:14 PM, Ariel Constenla-Haile wrote:
> Hi,
> 
> On Thu, Sep 19, 2013 at 01:46:16PM +0800, Wei Min Teo wrote:
>> Hi all, Thanks for all replies.  The OS that I tested on is
>> Windows XP. The reason why I started a openoffice process in
>> listening mode is to run an invisible instance that runs in the
>> background for automated tasks.  Ariel Constenla-Haile have
>> tested that the simple bootstrap example from the SDK. Anything
>> else I can try? Are there alternate methods to bootstrap?
> 
> Yes. If the simple bootstrap mechanism is broken, you have to use
> the old method of first starting the office listening for
> interprocess connections.
> 
> Documentation: 
> http://wiki.openoffice.org/wiki/Documentation/DevGuide/ProUNO/UNO_Interprocess_Connections
>
> 
http://wiki.openoffice.org/wiki/Documentation/DevGuide/ProUNO/C%2B%2B/Establishing_Interprocess_Connections
> 
> Sample code: - in the SDK installation, C++ examples using the 
> com.sun.star.bridge.UnoUrlResolver
> 
> examples/DevelopersGuide/ProfUNO/CppBinding/office_connect.cxx 
> examples/cpp/DocumentLoader/DocumentLoader.cxx
> 
> - there is a C++ "connection aware client" in 
> http://svn.apache.org/viewvc/openoffice/devtools/sdk-examples/trunk/cpp/cppbindings/ConnectionAwareClient/
>
> 
or setting the UNO_PATH variable to specify exactly which office
should be used. In case of testing this should be used anyway.
Otherwise the default office on the system is used but probably not
wanted for the test.

The fix for the bootstrap problem is available.

Juergen

---------------------------------------------------------------------
To unsubscribe, e-mail: api-unsubscribe@openoffice.apache.org
For additional commands, e-mail: api-help@openoffice.apache.org


Re: cppu::bootstrap() does not work with OpenOffice 4.0.0

Posted by Ariel Constenla-Haile <ar...@apache.org>.
Hi,

On Thu, Sep 19, 2013 at 01:46:16PM +0800, Wei Min Teo wrote:
> Hi all, Thanks for all replies.  The OS that I tested on is Windows
> XP. The reason why I started a openoffice process in listening mode is
> to run an invisible instance that runs in the background for automated
> tasks.  Ariel Constenla-Haile have tested that the simple bootstrap
> example from the SDK. Anything else I can try? Are there alternate
> methods to bootstrap?

Yes. If the simple bootstrap mechanism is broken, you have to use the
old method of first starting the office listening for interprocess
connections.

Documentation:
http://wiki.openoffice.org/wiki/Documentation/DevGuide/ProUNO/UNO_Interprocess_Connections
http://wiki.openoffice.org/wiki/Documentation/DevGuide/ProUNO/C%2B%2B/Establishing_Interprocess_Connections

Sample code:
- in the SDK installation, C++ examples using the
  com.sun.star.bridge.UnoUrlResolver

examples/DevelopersGuide/ProfUNO/CppBinding/office_connect.cxx
examples/cpp/DocumentLoader/DocumentLoader.cxx

- there is a C++ "connection aware client" in
  http://svn.apache.org/viewvc/openoffice/devtools/sdk-examples/trunk/cpp/cppbindings/ConnectionAwareClient/



Regards
-- 
Ariel Constenla-Haile
La Plata, Argentina

RE: cppu::bootstrap() does not work with OpenOffice 4.0.0

Posted by Wei Min Teo <sh...@hotmail.com>.
Hi all,
Thanks for all replies.
The OS that I tested on is Windows XP. The reason why I started a openoffice process in listening mode is to run an invisible instance that runs in the background for automated tasks.
Ariel Constenla-Haile have tested that the simple bootstrap example from the SDK. Anything else I can try? Are there alternate methods to bootstrap? Will this be fixed in the coming version? Any estimated release date?
> Date: Wed, 18 Sep 2013 10:44:14 -0300
> From: arielch@apache.org
> To: api@openoffice.apache.org
> Subject: Re: cppu::bootstrap() does not work with OpenOffice 4.0.0
> 
> On Wed, Sep 18, 2013 at 08:43:09AM -0300, Ariel Constenla-Haile wrote:
> > Hi,
> > 
> > On Wed, Sep 18, 2013 at 05:37:36PM +0800, Wei Min Teo wrote:
> > > Hi, I'm writing in C++ and testing on OpenOffice 4.0.0. I encountered
> > > a problem where cppu::bootstrap() throws a cppu::BootstrapException
> > > with the message "no soffice installation found!".  Prior to this,
> > > I have started the soffice process and passed in the -accept flag to
> > > open up a listening port. Running netstat has confirmed this. However,
> > > bootstrap still fails. This code was previously working with OO 3.x.
> > > It'll be great if anyone can give me some advice on this.  Thanks.
> > 
> > You need to start the office in listening mode only if you are using the
> > com.sun.star.bridge.UnoUrlResolver or a connection-aware client [1], but
> > the simple bootstrap mechanism does not require a running office
> > listening for interprocess connections.
> > 
> > The simple bootstrap mechanism was broken due to changes in the office
> > installation structure (the so called 3-layer removal), this was
> > reported for Linux in
> > https://issues.apache.org/ooo/show_bug.cgi?id=122483
> > At that time I couldn't test it on Windows, because C++ examples could
> > not even be compiled.
> > 
> > What is your OS? On Linux, running client applications from outside the
> > SDK environment works fine (didn't try on Windows yet).
> 
> This simple bootstrap example from the SDK
> http://svn.apache.org/viewvc/openoffice/trunk/main/odk/examples/DevelopersGuide/ProfUNO/SimpleBootstrap_cpp/
> does not run when double-clicking on SimpleBootstrap_cpp.exe, looks like
> a regression on the unoapploader Windows code.
> 
> 
> Regards
> -- 
> Ariel Constenla-Haile
> La Plata, Argentina
 		 	   		  

Re: cppu::bootstrap() does not work with OpenOffice 4.0.0

Posted by Ariel Constenla-Haile <ar...@apache.org>.
On Wed, Sep 18, 2013 at 08:43:09AM -0300, Ariel Constenla-Haile wrote:
> Hi,
> 
> On Wed, Sep 18, 2013 at 05:37:36PM +0800, Wei Min Teo wrote:
> > Hi, I'm writing in C++ and testing on OpenOffice 4.0.0. I encountered
> > a problem where cppu::bootstrap() throws a cppu::BootstrapException
> > with the message "no soffice installation found!".  Prior to this,
> > I have started the soffice process and passed in the -accept flag to
> > open up a listening port. Running netstat has confirmed this. However,
> > bootstrap still fails. This code was previously working with OO 3.x.
> > It'll be great if anyone can give me some advice on this.  Thanks.
> 
> You need to start the office in listening mode only if you are using the
> com.sun.star.bridge.UnoUrlResolver or a connection-aware client [1], but
> the simple bootstrap mechanism does not require a running office
> listening for interprocess connections.
> 
> The simple bootstrap mechanism was broken due to changes in the office
> installation structure (the so called 3-layer removal), this was
> reported for Linux in
> https://issues.apache.org/ooo/show_bug.cgi?id=122483
> At that time I couldn't test it on Windows, because C++ examples could
> not even be compiled.
> 
> What is your OS? On Linux, running client applications from outside the
> SDK environment works fine (didn't try on Windows yet).

This simple bootstrap example from the SDK
http://svn.apache.org/viewvc/openoffice/trunk/main/odk/examples/DevelopersGuide/ProfUNO/SimpleBootstrap_cpp/
does not run when double-clicking on SimpleBootstrap_cpp.exe, looks like
a regression on the unoapploader Windows code.


Regards
-- 
Ariel Constenla-Haile
La Plata, Argentina

Re: cppu::bootstrap() does not work with OpenOffice 4.0.0

Posted by Ariel Constenla-Haile <ar...@apache.org>.
Hi,

On Wed, Sep 18, 2013 at 05:37:36PM +0800, Wei Min Teo wrote:
> Hi, I'm writing in C++ and testing on OpenOffice 4.0.0. I encountered
> a problem where cppu::bootstrap() throws a cppu::BootstrapException
> with the message "no soffice installation found!".  Prior to this,
> I have started the soffice process and passed in the -accept flag to
> open up a listening port. Running netstat has confirmed this. However,
> bootstrap still fails. This code was previously working with OO 3.x.
> It'll be great if anyone can give me some advice on this.  Thanks.

You need to start the office in listening mode only if you are using the
com.sun.star.bridge.UnoUrlResolver or a connection-aware client [1], but
the simple bootstrap mechanism does not require a running office
listening for interprocess connections.

The simple bootstrap mechanism was broken due to changes in the office
installation structure (the so called 3-layer removal), this was
reported for Linux in
https://issues.apache.org/ooo/show_bug.cgi?id=122483
At that time I couldn't test it on Windows, because C++ examples could
not even be compiled.

What is your OS? On Linux, running client applications from outside the
SDK environment works fine (didn't try on Windows yet).


[1] http://wiki.openoffice.org/wiki/Documentation/DevGuide/ProUNO/C%2B%2B/Establishing_Interprocess_Connections
http://wiki.openoffice.org/wiki/Documentation/DevGuide/ProUNO/UNO_Interprocess_Connections


Regards
-- 
Ariel Constenla-Haile
La Plata, Argentina