Apache OpenOffice (AOO) Bugzilla – Issue 499
InterruptedException when calling getProperties at a text document
Last modified: 2007-06-18 10:47:24 UTC
I'm using Java to access 619 from the downloadable install set. I try to use getProperties() at a newly created text document and get a java.lang.InterruptedException. Here is my example. I've connected to a running office instance and used the servicemanager to get the desktop, then the componentloader to load a new writer document to a variable oUnoObject. Next: XPropertySet xPropertySet = (XPropertySet) UnoRuntime.queryInterface (XPropertySet.class, oUnoObject); XPropertySetInfo xPropertySetInfo = xPropertySet.getPropertySetInfo(); Property[] mProperties = xPropertySetInfo.getProperties(); for (int l = 0; l < mProperties.length; l++) { System.out.println("." + mProperties[l].Name + "<BR>"); } The exception occurs when I call getProperties(). Seems to be a bug, right? I set it to prio 4 because I need this for the instance inspector mentioned on http://udk.openoffice.org/common/man/tasks.html. Here's the callstack: java.lang.InterruptedException at java.lang.Object.wait(Native Method) at com.sun.star.lib.uno.environments.remote.JobQueue.removeJob (JobQueue.java:311) at com.sun.star.lib.uno.environments.remote.JobQueue.enter (JobQueue.java:434) at com.sun.star.lib.uno.environments.remote.JobQueue.enter (JobQueue.java:409) at com.sun.star.lib.uno.environments.remote.JavaThreadPool.enter (JavaThreadPool.java:287) at com.sun.star.lib.uno.environments.remote.JavaThreadPool.enter (JavaThreadPool.java:305) at com.sun.star.lib.uno.environments.remote.ThreadPool.enter (ThreadPool.java:138) at com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge.sendRequest (java_remote_bridge.java:889) at com.sun.star.lib.uno.environments.java.Proxy$IDispatcher.invoke (Proxy.java:239) at com.sun.star.lib.sandbox.generic.DispatcherAdapterBase.invokeSec (DispatcherAdapterBase.java:91) at com.sun.star.lib.sandbox.generic.DispatcherAdapterBase.invokeL (DispatcherAdapterBase.java:311) at JSGencom_sun_star_beans_XPropertySetInfocom_sun_star_lib_uno_environments_java_P roxy.getProperties(Unknown Source) at java.lang.reflect.Method.invoke(Native Method) at com.sun.star.lib.uno.environments.java.java_environment$HolderProxy.invoke (java_environment.java:161) at com.sun.star.lib.sandbox.generic.DispatcherAdapterBase.invokeSec (DispatcherAdapterBase.java:91) at com.sun.star.lib.sandbox.generic.DispatcherAdapterBase.invokeL (DispatcherAdapterBase.java:311) at JSGencom_sun_star_beans_XPropertySetInfocom_sun_star_lib_uno_environments_java_j ava_environment_HolderProxy.getProperties(Unknown Source) at apilyzer.Deconstructor.apilyze(Deconstructor.java:103) at apilyzer.Deconstructor.display(Deconstructor.java:122) at apilyzer.Frame1.btnIntrospect_actionPerformed(Frame1.java:152) at apilyzer.Frame1$3.actionPerformed(Frame1.java:100) at javax.swing.AbstractButton.fireActionPerformed (AbstractButton.java:1450) at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed (AbstractButton.java:1504) at javax.swing.DefaultButtonModel.fireActionPerformed (DefaultButtonModel.java:378) at javax.swing.DefaultButtonModel.setPressed (DefaultButtonModel.java:250) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased (BasicButtonListener.java:216) at java.awt.Component.processMouseEvent(Component.java:3717) at java.awt.Component.processEvent(Component.java:3546) at java.awt.Container.processEvent(Container.java:1164) at java.awt.Component.dispatchEventImpl(Component.java:2595) at java.awt.Container.dispatchEventImpl(Container.java:1213) at java.awt.Component.dispatchEvent(Component.java:2499) at java.awt.LightweightDispatcher.retargetMouseEvent (Container.java:2451) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:2216) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:2125) at java.awt.Container.dispatchEventImpl(Container.java:1200) at java.awt.Window.dispatchEventImpl(Window.java:912) at java.awt.Component.dispatchEvent(Component.java:2499) at java.awt.EventQueue.dispatchEvent(EventQueue.java:319) at java.awt.EventDispatchThread.pumpOneEvent (EventDispatchThread.java:103) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:84) Dietrich
Seems to be a marshalling problem.
The types for the API i18n package were missing in java. This should be fixed in SRC625. You can workaround it the following way : - get the udk/unoil module, build it - add the directory udk/unoil/com/sun/star/i18n - copy a makefile from udk/unoil/com/sun/star/awt to i18n directory - replace every occurence of awt with i18n - build the i18n directory and afterwards the udk/unoil/util directory Use now the resulting unoil.jar instead of the original one
reassigned to correct account
The buf was fixed some time ago (I think for 627).
*** Issue 19921 has been marked as a duplicate of this issue. ***
This issue has been "RESOLVED" for quite a time, I assume I can close it ...