On 07/16/10 13:48, rony wrote:
On 16.07.2010 08:48, Stephan Bergmann wrote:
On 07/15/10 22:10, Rony G. Flatscher wrote:
today I stumbled over the following interesting (read: time-consuming)
problem: while caching Java objects representing individual UNO_ENUM
values, all of a sudden om.sun.star.lang.DisposedException started to be
thrown. Here is one such received exception message:
... getCause(): [com.sun.star.lang.DisposedException:
java_remote_bridge
com.sun.star.lib.uno.bridges.java_remote.java_remote_bri...@105b99f
is disposed]
That DisposedException had more than likely a different reason. Java
objects representing UNO enumeration type values are completely
"local" -- none of their methods initiate any URP communication.
This is the use case using the Java bridge, where invocations of UNO
APIs via Java are carried out using Java reflection (this allows me to
basically address UNO typelessly from the perspective of Rexx users):
* get all the enum values of "com.sun.star.style.ParagraphAdjust"
and cache them for later use, e.g. the value for "RIGHT" is
assigned to a local variable named "right",
* then, later, an XParagraphCursor is queried for its XPropertySet
and then this is used to setPropertyValue("ParaAdjust", right).
It is in this invocation where unexpectedly the above exception is
thrown.
Now, querying for the enum value "RIGHT" before using it in the
setPropertyValue() works reliably.
Can you present the exact failing code here? What type is the variable
named "right," and how exactly does the (reflective, IIUC) call to
setPropertyValue look like?
The DisposedException indicates either a problem in the bridge (say, it
is asked to marshal an object of unexpected type, and thus shuts down)
or in the remote soffice.bin process (it likely crashed).
-Stephan
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]