I got error when i try this code
I get MultipartTamplateFile from http request.
XComponentLoader xComponentLoader = UnoRuntime.queryInterface(XComponentLoader.class, desktop);
PropertyValue[] props = new PropertyValue[2];
props[0] = new PropertyValue();
props[1] = new PropertyValue();
props[0].Name = "InputStream";
props[0].Value = multipartTemplate.getInputStream();
props[1].Name = "Hidden";
props[1].Value = true;
XComponent xSpreadsheetComponent= xComponentLoader.loadComponentFromURL("private:stream", "_blank", 0, props);
Error is
com.sun.star.lang.DisposedException
at com.sun.star.lib.uno.environments.remote.JobQueue.removeJob(JobQueue.java:201)
at com.sun.star.lib.uno.environments.remote.JobQueue.enter(JobQueue.java:308)
at com.sun.star.lib.uno.environments.remote.JobQueue.enter(JobQueue.java:281)
at com.sun.star.lib.uno.environments.remote.JavaThreadPool.enter(JavaThreadPool.java:81)
at com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge.sendRequest(java_remote_bridge.java:619)
at com.sun.star.lib.uno.bridges.java_remote.ProxyFactory$Handler.request(ProxyFactory.java:145)
at com.sun.star.lib.uno.bridges.java_remote.ProxyFactory$Handler.invoke(ProxyFactory.java:129)
at jdk.proxy2/jdk.proxy2.$Proxy77.loadComponentFromURL(Unknown Source)
at de.kybeidos.LibreOfficeExcelUpdater.util.StreamInserter.insert