Reputation: 585
i'm working an a tool which connects to a Open Office writer application. The writer runs in a different process than my java tool. For communication between the two components i use the UNO Api. Regulary i get an error message that the Open Office Part of program crashed. When this happens a stack Trace like this can be found in the logs:
com.sun.star.lang.DisposedException: java_remote_bridge com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge@8ebb23 is disposed
at com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge.checkDisposed(java_remote_bridge.java:715)
at com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge.sendRequest(java_remote_bridge.java:634)
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 $Proxy69.getCurrentController(Unknown Source)
Has anyone any idea, how i can find out why the bridge gets disposed? I'm grateful for any hint.
Upvotes: 1
Views: 5892
Reputation: 388
I ran into similar issues with a project way back. Was unable to ascertain the reason why the bridge gets disposed, except for one specific instance. When another OOo Writer instance is opened and closed while the bridge is open it also closes the bridge. But the problem is definitely not limited to this single instance.
I wound up using the OOoBean which simplified the opening, closing and keeping open the connection. The OOoBean has not been updated since 2006: OOoBeans dead? - What are my alternatives?. That same post mentions a new library (NOA) that can accomplish similar tasks as the OOoBean: http://www.usegroup.de/software/noa/index.php/Main_Page.
Upvotes: 2