Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Problem with Platform.startup and UNC paths(Trying to Platform.startup with a UNC path but is doesn't initialise correctly)
Problem with Platform.startup and UNC paths [message #628904] Fri, 24 September 2010 16:44 Go to next message
Stuart Roe is currently offline Stuart RoeFriend
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 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

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 #629116 is a reply to message #628922] Mon, 27 September 2010 09:27 Go to previous messageGo to next message
Stuart Roe is currently offline Stuart RoeFriend
Messages: 4
Registered: September 2010
Junior Member
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
Re: Problem with Platform.startup and UNC paths [message #629288 is a reply to message #629116] Mon, 27 September 2010 16:07 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

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
Re: Problem with Platform.startup and UNC paths [message #629291 is a reply to message #629288] Mon, 27 September 2010 16:53 Go to previous messageGo to next message
Stuart Roe is currently offline Stuart RoeFriend
Messages: 4
Registered: September 2010
Junior Member
Jason Weathersby wrote on Mon, 27 September 2010 17:07
Did you try this with 2.6?
No, I will try this tomorrow.

Jason Weathersby wrote on Mon, 27 September 2010 17:07
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
Smart, I'll make the appropriate changes.

Stuart
Re: Problem with Platform.startup and UNC paths [message #629424 is a reply to message #629291] Tue, 28 September 2010 08:59 Go to previous message
Stuart Roe is currently offline Stuart RoeFriend
Messages: 4
Registered: September 2010
Junior Member
Stuart Roe wrote on Mon, 27 September 2010 17:53
I will try this tomorrow.

Ok, I've tried this and this is working correctly, so it's a feature of the Ver. 2.2.1.1 that the UNC path doesn't work while masking it with a driving mapping does work. At least I have a patch whilst the engine upgrade can be tried and tested.

I had a quick look at the referenced thread yesterday and I may have a question regarding this. I'll take a closer look to see if it is answered before posting.

Stuart
Previous Topic:Starting Issues
Next Topic:BIRT in eclipse without design IDE
Goto Forum:
  


Current Time: Thu Mar 28 20:15:26 GMT 2024

Powered by FUDForum. Page generated in 0.02620 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top