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:
[junit] com.sun.star.uno.RuntimeException:
[junit] at com.sun.star.lib.uno.environments.remote.Job.remoteUnoRequestRaisedException(Job.java:182)
[junit] at com.sun.star.lib.uno.environments.remote.Job.execute(Job.java:148)
[junit] at com.sun.star.lib.uno.environments.remote.JobQueue.enter(JobQueue.java:344)
[junit] at com.sun.star.lib.uno.environments.remote.JobQueue.enter(JobQueue.java:313)
[junit] at com.sun.star.lib.uno.environments.remote.JavaThreadPool.enter(JavaThreadPool.java:101)
[junit] at com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge.sendRequest(java_remote_bridge.java:652)
[junit] at com.sun.star.lib.uno.bridges.java_remote.ProxyFactory$Handler.request(ProxyFactory.java:154)
[junit] at com.sun.star.lib.uno.bridges.java_remote.ProxyFactory$Handler.invoke(ProxyFactory.java:136)
[junit] at $Proxy14.insertString(Unknown Source)
...
If I interpret this correctly, it's telling me that it connected to a different proces from Java, something in the other proces failed, but it's not telling me what the problem is.
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?