Problem with Platform.startup and UNC paths [message #628904] |
Fri, 24 September 2010 16:44 |
Stuart Roe Messages: 4 Registered: September 2010 |
Junior Member |
|
|
I need to setEngineHome to a UNC path but when ever I do Platform.startup completes without error but the following Platform.createFactoryObject returns null! If I replace the UNC path with a mapped drive reference, the code works.
The 'boiled down' code shown below will work. If I switch the comments around on the setEngineHome line, the JOptionPane will be executed.
This is executing with BIRT Ver. 2.2.1.1 on Windows XP.
Other things I have tried - I have looked and cut/paste the OSGILauncher.startup method code into my application along with the searchFor method and have proved that the OSGILauncher is able to locate the org.eclipse.osgi jar when using the UNC path. I assume that the fault must be occuring within the EclipseStarter.startup method. I haven't found this code to investigate what is happening!
Does anyone have any ideas?
Stuart
private static void createInstance(){
EngineConfig config = new EngineConfig();
// config.setEngineHome("\\\\server\\share\\temp\\jar files");
config.setEngineHome("z:\\temp\\jar files");
Platform.startup( ReportEngine.config );
ReportEngine.factory = (IReportEngineFactory) Platform.createFactoryObject(
IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY );
if(null == ReportEngine.factory){
JOptionPane.showMessageDialog(null, "Failed to create factory");
System.exit(0);
}
}
[Updated on: Fri, 24 September 2010 16:44] Report message to a moderator
|
|
|
Re: Problem with Platform.startup and UNC paths [message #628922 is a reply to message #628904] |
Fri, 24 September 2010 17:31 |
|
Stuart,
I tried this with 2.6 and it worked. I used:
config.setBIRTHome(" \\\\Mylocalcomputer\\birt\\birt-runtime-2_6_0\\birt-runtime- 2_6_0\\ReportEngine ");
Do your two locations point to the same place? Does your share have
read and write access? It needs write access osgi configuration.
Jason
On 9/24/2010 12:44 PM, Stuart Roe wrote:
> I need to setEngineHome to a UNC path but when ever I do
> Platform.startup completes without error but the following
> Platform.createFactoryObject returns null! If I replace the UNC path
> with a mapped drive reference, the code works.
> The 'boiled down' code shown below will work. If I switch the comments
> around on the setEngineHome line, the JOptionPane will be executed.
>
> This is executing with BIRT Ver. 2.2.1.1 on Windows XP.
>
> Other things I have tried - I have looked and cut/paste the
> OSGILauncher.startup method code into my application along with the
> searchFor method and have proved that the OSGILauncher is able to locate
> the org.eclipse.osgi jar when using the UNC path. I assume that the
> fault must be occuring within the EclipseStarter.startup method. I
> haven't found this code to investigate what is happening!
>
> Does anyone have any ideas?
>
> private static void createInstance(){
> EngineConfig config = new EngineConfig();
>
> // config.setEngineHome("\\\\server\\share\\temp\\jar files");
> config.setEngineHome("z:\\temp\\jar files");
>
> Platform.startup( ReportEngine.config );
>
> ReportEngine.factory = (IReportEngineFactory)
> Platform.createFactoryObject(
> IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY );
>
> if(null == ReportEngine.factory){
> JOptionPane.showMessageDialog(null, "Failed to create factory");
> System.exit(0);
> }
> }
>
|
|
|
|
Re: Problem with Platform.startup and UNC paths [message #629288 is a reply to message #629116] |
Mon, 27 September 2010 16:07 |
|
Stuart,
Did you try this with 2.6?
on the issue of write accesss. Write access is needed for the osgi
configuration area. You can change this configuration as described in
this thread:
http://www.birt-exchange.org/org/forum/index.php/topic/19968 -change-location-of-birt-config-files/page__hl__OSGi__fromse arch__1
Jason
On 9/27/2010 5:27 AM, Stuart Roe wrote:
> Jason Weathersby wrote on Fri, 24 September 2010 13:31
>> Do your two locations point to the same place? Does your share have
>> read and write access?
>
> Yes. I have just rechecked this. The mapped drive was created with the
> command line:net use z: "\\server\share"
> I'm using the appropriate engine home source
> line:ReportEngine.config.setEngineHome("\\\\server\\share\\temp\\jars ");
> // Results in factory = null
> or
> ReportEngine.config.setEngineHome("z:\\temp\\jars"); // Results in
> factory != null
> and the behaviour was consistent with previous. UNC paths results in
> createFactoryObject returning null whilst mapped drives gives non-null.
>
> Jason Weathersby wrote on Fri, 24 September 2010 13:31
>> I used: config.setBIRTHome("
>> \\\\Mylocalcomputer\\birt\\birt-runtime-2_6_0\\birt-runtime-
>> 2_6_0\\ReportEngine ");
>
> I created a mimic of your configuration with the share being on my local
> machine (it's remote on a Windows 2003 Server in my original case) and
> get the same results, createFactoryObject returns null on UNC path,
> non-null on mapped drive.
>
> Mapped drive created via: net use y: "\\Shuttle\bruntime"
> Engine home source lines
> used:ReportEngine.config.setEngineHome("\\\\Shuttle\\bruntime\\ReportEngine ");
>
> ReportEngine.config.setEngineHome("y:\\ReportEngine");Log file found in
> configuration folder
>> !ENTRY org.eclipse.osgi 4 0 2010-09-27 10:00:01.328
>> !MESSAGE Bundle org.eclipse.birt.api not found.
>>
>> !ENTRY org.eclipse.osgi 4 0 2010-09-27 10:00:01.328
>> !MESSAGE Bundle org.eclipse.equinox.common@2:start not found.
>>
>> !ENTRY org.eclipse.osgi 4 0 2010-09-27 10:00:01.328
>> !MESSAGE Bundle org.eclipse.update.configurator@start not found.
>>
>> !ENTRY org.eclipse.osgi 4 0 2010-09-27 10:00:01.344
>> !MESSAGE Bundle org.eclipse.birt.core@start not found.
> Jason Weathersby wrote on Fri, 24 September 2010 13:31
>> It needs write access osgi configuration.
>
> 2 things here:
>
> 1). As the mapped drive works I guess that the application has all the
> required access permissions to the share.
>
> 2). This does raised an other question, is it possible (via the
> EngineConfig class I guess) to configure BIRT to execute from a read
> only share, using the localhost temporary space for write operations?
>
> Stuart
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03428 seconds