Either through OOoBean or XComponentLoader I am unable to load a byte array into a document. Code sample #1: OOoBean bean = new OOoBean(); bean.loadFromByteArray(..., new PropertyValue[0]); OfficeDocument loaded = bean.getDocument(); Exception: com.sun.star.lang.IllegalArgumentException: URL seems to be an unsupported one. 14:42:46.258 [main] ERROR Unable to open document at com.sun.star.lib.uno.environments.remote.Job.remoteUnoRequestRaisedException(Job.java:177) java.io.IOException: null at com.sun.star.lib.uno.environments.remote.Job.execute(Job.java:143) at com.sun.star.lib.uno.environments.remote.JobQueue.enter(JobQueue.java:335) at com.sun.star.comp.beans.OOoBean.loadFromURL(OOoBean.java:691) ~[officebean.jar:na] at com.sun.star.lib.uno.environments.remote.JobQueue.enter(JobQueue.java:304) at com.sun.star.comp.beans.OOoBean.loadFromByteArray(OOoBean.java:787) ~[officebean.jar:na] at ... Code sample #2 PropertyValue[] args = new PropertyValue[]{ new PropertyValue("InputStream", 0, new ByteArrayToXInputStreamAdapter(...), PropertyState.DIRECT_VALUE)}; XComponent loaded = m_xCompLoader.loadComponentFromURL("private:stream", "_blank", 0, args); com.sun.star.lang.IllegalArgumentException: URL seems to be an unsupported one. at com.sun.star.lib.uno.environments.remote.Job.remoteUnoRequestRaisedException(Job.java:177) ~[jurt.jar:na] at ... Environment: Fedora 15. LibreOffice SDK 3.3.3.1. Oracle Java version "1.6.0_25"
Created attachment 50528 [details] Test case
Created attachment 50529 [details] File used in test case
Output of running the test case: com.sun.star.lang.IllegalArgumentException: URL seems to be an unsupported one. at com.sun.star.lib.uno.environments.remote.Job.remoteUnoRequestRaisedException(Job.java:177) at com.sun.star.lib.uno.environments.remote.Job.execute(Job.java:143) at com.sun.star.lib.uno.environments.remote.JobQueue.enter(JobQueue.java:335) at com.sun.star.lib.uno.environments.remote.JobQueue.enter(JobQueue.java:304) at com.sun.star.lib.uno.environments.remote.JavaThreadPool.enter(JavaThreadPool.java:91) at com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge.sendRequest(java_remote_bridge.java:639) at com.sun.star.lib.uno.bridges.java_remote.ProxyFactory$Handler.request(ProxyFactory.java:151) at com.sun.star.lib.uno.bridges.java_remote.ProxyFactory$Handler.invoke(ProxyFactory.java:133) at $Proxy15.loadComponentFromURL(Unknown Source) at com.sun.star.comp.beans.OOoBean.loadFromURL(OOoBean.java:654) at com.sun.star.comp.beans.OOoBean.loadFromByteArray(OOoBean.java:787) main(APITester.java:32)
export CLASSPATH=/usr/lib64/libreoffice/basis3.3/program/classes/officebean.jar:/usr/lib64/libreoffice/basis3.3/program/classes/unoil.jar:/usr/lib64/libreoffice/ure/share/java/ridl.jar:/usr/lib64/libreoffice/ure/share/java/juh.jar:/usr/share/java/apache-commons-io.jar:. javac APITester.java export UNO_PATH=/usr/lib64/libreoffice/program java APITester fails export UNO_PATH=/home/caolan/LibreOffice/core/install/program java APITester works, i.e. local copy of master export UNO_PATH=/home/caolan/LibreOffice/libreoffice-3-4/install/program/ works, i.e. local copy of 3-4
groan, and the second I copy a debugging libfilterconfig1.so into the old one it "works"
what comes to mind is possibly the std::hash_map foo change over, there was a difference in the hash thing
grrr, loading component library failed: file:///usr/lib64/libreoffice/program/../basis-link/program/libsvgfilterlx.so its because private:stream causes deep type detection, and if the services for a typedetection isn't there, because that filter is in a different module, then the throw kills off the detection. I had just copied all my debugging libs in, including the missing one. right
I fixed this a long time ago as http://cgit.freedesktop.org/libreoffice/filters/commit/?id=e425df9c7703f23a8aa367f99d9bed354b67c6c4 so should be good in >= 3.4. Didn't backport it to our own 3.3.X, will be in fedora's >= 3.3.3.1-6 if we do another update >= that