Apache OpenOffice (AOO) Bugzilla – Issue 56273
URL seems to be an unsupported one
Last modified: 2013-02-24 21:07:50 UTC
The issue happens in the OLE- Automation interface of Open Office 2.0 RC3. If i open a document a second time with the service interface function com.sun.star.frame.Desktop/ XComponentLoader/ LoadComponentFromURL (sFile, '_default', 0, EmptyParams) the Exception "com.sun.star.lang.IllegalArgumentException: URL seems to be an unsupported one" happens. After that the document opens again only if OpenOffice ist finished completly. The behavior differs from SDK documentation and the behavior of OpenOffice 1.1.4. With the parameter "_default" it should shown the opened document.
accoding to the errormessage you send an url with loadComponentFromURL is invalid ... what does sFile look like ?
tagging issue with some keywords.
The variable sFile ist a URL converted to a OpenOffice URL for Example "file:///E|/dir/example.swx". I haven't written the correct params: LoadComponentFromURL(sFile, '_default', 0, CreatePropertys(['Hidden', TRUE,'ReadOnly', FALSE])). The exception happens if the document is opened for writing and open it for writing again. The document will be made visible later. This case i can catch, i search the document first and take the opened document. The problem is if the document is closed manually or per code. The next opening of the document fails with the same exception. It seems the document is not really closed but invisible, but i can't find it with programcode. If i leave the param "ReadOnly" out, the document opens readonly. If i leave the param "Hidden" out, the document opens correct. If i close OpenOffice first (the icon in the Windows toolbar too) the document opens correct. It seems that a first hidden document is not listed in the desktop components enumeration.
Created attachment 31055 [details] VisualBasic Script to demonstrate the behaviour
sw->jl: since opening the same document twice using StarOffice Basic works just fine I send this issue to you, guessing that something goes wrong in the automation bridge. To reproduce: 1. save the attached visual basic script on your local disc 2. create a file named "loadMe.odt" in c:\ 3. execute the script => the document will be loaded once and after you confirmed the appearing message box, the script will attempt to load the same document once again ... this leads to an Error message stating that the url would be an unsupported one.
setting target
Created attachment 31079 [details] Visualbasic script to reproduce the behavior
Execute the changed visual basic script, close the document manually. Execute the script again and the document will not open. With processexplorer i can see that soffice.bin keeps the file open.
.
set target from 2.x to 3.x according to http://wiki.services.openoffice.org/wiki/Target_3x
The "Text" example in the developer's guide shows this issue. When I compile the example using a Makefile, it works fine, but when I try to run the same example in NetBean 6.1 it gives me the error "URL seems to be an unsupported one". I'm using OO version 2.4 on windows.