How to find true cause of com.sun.star.uno.RuntimeException?
February 17th, 2009 | Published in java, oss | 2 Comments
I’m stuck with OpenOffice. I’m hoping somebody can help me with this. I’ve also posted the question to the OpenOffice.org forums and to StackOverflow, but so far no luck.
I’m trying to replace a field in an openoffice document using the OpenOffice java api. I’m using the insertString method:
xText.insertString(((XTextField) fieldMaster).getAnchor(), value.toString(), false);
The stacktrace is as follows:
com.sun.star.uno.RuntimeException: at com.sun.star.lib.uno.environments.remote.Job.remoteUnoRequestRaisedException(Job.java:182) at com.sun.star.lib.uno.environments.remote.Job.execute(Job.java:148) at com.sun.star.lib.uno.environments.remote.JobQueue.enter(JobQueue.java:344) at com.sun.star.lib.uno.environments.remote.JobQueue.enter(JobQueue.java:313) at com.sun.star.lib.uno.environments.remote.JavaThreadPool.enter(JavaThreadPool.java:101) at com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge.sendRequest(java_remote_bridge.java:652) at com.sun.star.lib.uno.bridges.java_remote.ProxyFactory$Handler.request(ProxyFactory.java:154) at com.sun.star.lib.uno.bridges.java_remote.ProxyFactory$Handler.invoke(ProxyFactory.java:136) at $Proxy14.insertString(Unknown Source) ...
If i interpret this correctly, it’s telling me that it connected to a different process from java, something in the other process failed, but it’s not telling me what.
I found that there are some environment variables (PROT_REMOTE…) that would let me log messages from these remote (different process, same computer, btw) processes, but only if i run an OpenOffice version with debugging enabled? I’m using an openoffice version from an deb repository on ubuntu, and have to interest in compiling my own openoffice version.
Is there any way i can get some useful error messages from the remote process to help me understand why my code is failing?
February 18th, 2009 at 5:11 pm (#)
[...] when trying to replace a database field in the header of a document. So, in that sense, Python is no better than Java. Share and [...]
August 25th, 2010 at 4:07 pm (#)
ubuntu ? try sudo apt-get install openoffice.org-java-common