Apache OpenOffice (AOO) Bugzilla – Issue 48258
error connecting to OOo socket without gnome
Last modified: 2005-05-23 13:52:04 UTC
I am trying to perform some document conversions using automation. They works fine fine with OOo 1.1. I start OOo with soffice -headless -accept="socket,port=8100;urp;" and connect to it from Java (but for testing purposes I also wrote a Python script pasted below) The problem: from my X session everything was working fine. Then I tried to run OOo in a Xvfb server, and the connection attempt produced the following error on the console where OOo was running Xlib: unexpected async reply (sequence 0x???) (where the sequence code varies) and the client program hanged. Then I discovered that the same error occurs in a regular (not Xvfb) X server as well if Gnome is not running. So I tried starting gnome-session inside Xvfb prior to OOo, and it worked. After some more attempts, it seems that only nautilus is required, not the whole gnome-session. So the test results are as follow: start Xvfb, start OOo, run conversion script: failure start Xvfb, start nautilus, start OOo, run conversion: success additionally start Xvfb, start nautilus, start OOo, stop nautilus (--quit), run conversion: success My guess is that nautilus initialises some bonobo component required by OOo, but I could not find exactly which one. System: tested on both Fedora Core 3 and CentOS 3.3 OOo is the RPM version downloaded from http://www.mirror.ac.uk/mirror/sunsite.dk/openoffice/developer/680_m95/OOo_1.9.95_LinuxIntel_install.tar.gz 1.9.93 had the same problem. Using the OOo GUI works fine without Gnome. But connecting to a OOo connection fails without Gnome even without the -headless switch. Below the python script used for testing. --- file: ooo2pdf.py --- import uno from unohelper import absolutize from os import getcwd from sys import argv, exit from com.sun.star.beans import PropertyValue from com.sun.star.io import IOException, XOutputStream def prop(name, value): return PropertyValue(name, 0, value, 0) input = absolutize('file://'+ getcwd(), argv[1]) output = absolutize('file://'+ getcwd(), argv[2]) localContext = uno.getComponentContext() resolver = localContext.ServiceManager.createInstanceWithContext('com.sun.star.bridge.UnoUrlResolver', localContext) context = resolver.resolve('uno:socket,host=localhost,port=8100;urp;StarOffice.ComponentContext') serviceManager = context.ServiceManager desktop = serviceManager.createInstanceWithContext('com.sun.star.frame.Desktop', context) document = desktop.loadComponentFromURL(input, '_blank', 0, (prop('Hidden', True),)) document.storeToURL(output, (prop('FilterName', "writer_pdf_Export"),)) document.dispose()
Version 1.9.100 works fine! :-)
Hi mnasato, thanks for using and supporting OpenOffice.org... May you test this using OOom104 to be sure your problem has really gone?
Yep no problems with 1.9.104 either, thanks
Hi mnasato, thansk for your response... :) I'm going to close this issue now.
closing