Re: OpenOffice sample TextReplace throws BootstrapException
Ariel Constenla-Haile <[email protected]>
| Newsgroups | gmane.comp.openoffice.devel.general |
|---|---|
| Message-ID | <[email protected]> |
Hello Harsha, On Friday 10 December 2010, 02:47, Harsha Ravnikar wrote: > Hi, > > I am trying out OpenOffice example "TextReplace" available from the > following URL: > > http://wiki.services.openoffice.org/wiki/API/Samples/Java/Writer/TextReplac > e > > I am also using bootstrapconnector.jar available from > http://user.services.openoffice.org/en/forum/viewtopic.php?t=2520 > > While executing it, I get the following exception: > > com.sun.star.comp.helper.BootstrapException > at > ooo.connector.BootstrapConnector.connect(BootstrapConnector.java:129) > at > ooo.connector.BootstrapSocketConnector.connect(BootstrapSocketConnector.jav > a:68) at > ooo.connector.BootstrapSocketConnector.connect(BootstrapSocketConnector.jav > a:45) at > ooo.connector.BootstrapSocketConnector.bootstrap(BootstrapSocketConnector.j > ava:82) at > org.openoffice.sdk.example.text.TextReplace.getDesktop(TextReplace.java:175 > ) at > org.openoffice.sdk.example.text.TextReplace.main(TextReplace.java:63) > > > I have pasted below the full method thats corresponds to > BootstrapConnector.java:129. Exception occurs when the statement > oooServer.start(oooAcceptOption);is executed. The exception occurs > even when OpenOffice write is running. Can > anyone let me know how to resolve this issue? this example does not throw the exception, it's the bootstrapconnector.jar, so you should ask the one who delivers that jar. I don't have time to look at that forum, but simply reading that it suggests to hard-code the "folder of your OpenOffice.org executable to a String variable" makes this look rather suspicious to me. On the other hand, the TextReplace sample comes with the SDK, did you try to build it and run it in the SDK env.? I just did and works fine. The sample is in </opt/openoffice.org/basis3.4/>sdk/examples/java/Text/TextReplace.java Notice that the NetBeans project on that wiki page that you can download: http://wiki.services.openoffice.org/wiki/File:TextReplace.zip was outdated (made for OOo 2.4), and it misses the bootstrap glue code, that's why you get a com.sun.star.comp.helper.BootstrapException: no office executable found! even if you fix the missing OOo 2.4 library issue. I loaded a new version now, you can try it with the latest NetBeans and latest OOo (you just have to change the project's settings, because I'm working with a OOo 3.4). Regards -- Ariel Constenla-Haile La Plata, Argentina
signature.asc
(application/pgp-signature, 836 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) iQIcBAABCAAGBQJNAiPZAAoJEMjP1bm45QNWPRAQAKXpH/i0uQcxJD1hA+Sz3IFu 9nSEQc9vsWHpaRcj9D1CoiH/nPP4+1cubP+cp2ZYH06ZQakY+5z4KPHcnk9peGnE E33zQwKjro/H4nAo6us6bbUlY9zXnZsJ7cDmVahM7pz7KXUJbdBB4WzFRyJhWCx+ IlcM9zsjiME+kdYW6KBVTEkxxmgr6Eqs5ZUeobKta5UKoUAwnSJYQH+ZC7zllntH tFNexxnUvSrTpNnjauDSOMwSaqaL99+gr4gdLakqLSU9qDjyrZWBPUyayWHmHhK/ c3DXg2JzNINDMuQ9kceMcc7LYJ9aQI9G1Mw3alEWBw96oXOLFyUmxiE1Jjmjs8S7 sEniTkvWzy6BOaAuGCNlfS0jTqRuFCjXNL0riDNaGRkikojUUlm+WKmokplNrKsI oEcNeP6acBnf37RIREXVCpVcI5fQlVSRlo2l6MeKYTQJEWIMRZsa9PxFtn2Iqfx1 LBnbN57bHxGEV68/JDvk+J/hfLy3VkTmQUUPm1N2mS6Wt6s6AVtD0uXlw4m2CaY+ O4x2tfdBHz9GVj5nyJNG8fg0HXzsyo/eTp7OdS+PkO08vVP7lw7b5ZqijQTKIfLf U7Xdh+cjJKBBvi0nKDD1WOLtMfH1/2rmq3MMQHuRVBdL3voAWNxoq/l3Eik0z5eG sjRdxfm8+jCHenAd3WxQ =ZCIR -----END PGP SIGNATURE-----