loadComponentFromURL crashing

Java, C++, C#, Delphi... - Using the UNO bridges
Post Reply
rjsteele
Posts: 23
Joined: Fri Jul 27, 2012 9:20 pm

loadComponentFromURL crashing

Post by rjsteele »

I posted this in the Macros forum, but think it may be the wrong forum. Hopefully, this is the correct forum. There are updates here though.

I am trying to connect to a remote instance of StarOffice 9(basis3.1) on Solaris 10 x86, however, I am having some strange inconsistencies. On some systems, my application successfully launches the SpreadSheet application by using the bootstrap method, although it fails if I use a user that did not compile the code. However, on other systems (same architecture), the SpreadSheet application will not launch unless I already have StarOffice running, otherwise it throws com.sun.star.lang.DisposedException: java.io.Exception. Any help on this matter would be greatly accepted.

I've narrowed it down to this call:
ProtertyValue[] load_props = new PropertyValue[0];
XComponent comp = xComponentLoader.loadComponentFromURL("private:factory/scalc", "_blank", 0, load_props);

This call never returns and is throwing the exception.

Thanks in Advanced,

Raymond
Raymond
Solaris 10 x86 StarrOffice 9 - basis3.1
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: loadComponentFromURL crashing

Post by Villeroy »

Array load_props has one element but the property struct is empty.
Pass an empty array without any property struct if you don't need any additional information.
Last edited by Villeroy on Sun Aug 12, 2012 10:12 am, edited 1 time in total.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
rjsteele
Posts: 23
Joined: Fri Jul 27, 2012 9:20 pm

Re: loadComponentFromURL crashing

Post by rjsteele »

Thanks for the response. I'm not sure if this is what you meant, but I did the following with the same results.

PropertyValue[] load_props = new PropertyValue[0];
load_props[0] = new PropertyValue();
XComponent comp = xComponentLoader.loadComponentFromURL("private:factory/scalc", "_blank", 0, load_props);

Any ideas?
Raymond
Solaris 10 x86 StarrOffice 9 - basis3.1
hol.sten
Volunteer
Posts: 495
Joined: Mon Oct 08, 2007 1:31 am
Location: Hamburg, Germany

Re: loadComponentFromURL crashing

Post by hol.sten »

rjsteele wrote:I am trying to connect to a remote instance of StarOffice 9(basis3.1) on Solaris 10 x86
That's an environment I've never used. So all I can give you is a little bit of general advice, although that might not be helpful in your case.
rjsteele wrote:I've narrowed it down to this call:
ProtertyValue[] load_props = new PropertyValue[0];
XComponent comp = xComponentLoader.loadComponentFromURL("private:factory/scalc", "_blank", 0, load_props);

This call never returns and is throwing the exception.
This two lines are ok. I've used myself this line, always without any problems:

Code: Select all

XComponent comp = xComponentLoader.loadComponentFromURL("private:factory/scalc", "_blank", 0, new PropertyValue[0]);
So, in my opinion, we both use the same load_props in the loadComponentFromURL() call. If this statements throws an exception, it might be caused by an unsatisfactory initialized xComponentLoader. You didn't post your code, how you initialize that loader and didn't describe how you call that code. So, just as a wild guess, give the bootstrapconnector a try: http://user.services.openoffice.org/en/ ... pconnector
OOo 3.2.0 on Ubuntu 10.04 • OOo 3.2.1 on Windows 7 64-bit and MS Windows XP
Post Reply