Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Setting OSGI properties using System.setProperty is not working
Setting OSGI properties using System.setProperty is not working [message #242978] Fri, 15 June 2007 23:00 Go to next message
Nicolas Thuillier is currently offline Nicolas ThuillierFriend
Messages: 17
Registered: July 2009
Junior Member
Hi,
I want to integrate Birt in a webapp, for that I am using the servlet
example describes in http://wiki.eclipse.org/index.php/Servlet_Example.

Everything works fine but the OSGI module writes files in the
configuration directory of my webapp.

I know I can change the directory where OSGI writes the files by editing
the config.ini file located in WEB-INF/platform/configuration and set the
following line:
osgi.configuration.area= file:/C:/temp/
osgi.instance.area= file:/C:/temp/
osgi.instance.area.default= file:/C:/temp/

But I would like to set the properties using the System.setProperty
methods.
A lot of article say it is possible and a bug has been created and fixed
on this subject:
http://dev.eclipse.org/mhonarc/lists/birt-dev/msg06530.html

Unfortunately it does not work for me, I tried with BIRT 2.1.1, 2.1.2 and
2.2RC2.

In the WebReport.java servlet, in the init method I have:

public void init() throws ServletException {
System.setProperty("osgi.configuration.area","C:/Temp");
System.setProperty("osgi.instance.area","C:/Temp");
System.setProperty("osgi.instance.area.default","C:/Temp");
BirtEngine.initBirtConfig();
}

But it does not work, no files are created in c:\temp.
Someone knows what is wrong with my code? Or how should I set the
properties?

Thanking you in advance for your help
Re: Setting OSGI properties using System.setProperty is not working [message #242991 is a reply to message #242978] Sat, 16 June 2007 03:30 Go to previous message
Eclipse UserFriend
Originally posted by: jasonweathersby.alltel.net

Nicolas,

Did you try the setOsgi methods in the EngineConfig?
The bug concerning this is:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=159445

Jason

Nicolas wrote:
> Hi,
> I want to integrate Birt in a webapp, for that I am using the servlet
> example describes in http://wiki.eclipse.org/index.php/Servlet_Example.
>
> Everything works fine but the OSGI module writes files in the
> configuration directory of my webapp.
>
> I know I can change the directory where OSGI writes the files by editing
> the config.ini file located in WEB-INF/platform/configuration and set
> the following line:
> osgi.configuration.area= file:/C:/temp/
> osgi.instance.area= file:/C:/temp/ osgi.instance.area.default=
> file:/C:/temp/
>
> But I would like to set the properties using the System.setProperty
> methods.
> A lot of article say it is possible and a bug has been created and fixed
> on this subject:
> http://dev.eclipse.org/mhonarc/lists/birt-dev/msg06530.html
>
> Unfortunately it does not work for me, I tried with BIRT 2.1.1, 2.1.2
> and 2.2RC2.
>
> In the WebReport.java servlet, in the init method I have:
>
> public void init() throws ServletException {
> System.setProperty("osgi.configuration.area","C:/Temp");
> System.setProperty("osgi.instance.area","C:/Temp");
> System.setProperty("osgi.instance.area.default","C:/Temp");
> BirtEngine.initBirtConfig();
> }
>
> But it does not work, no files are created in c:\temp.
> Someone knows what is wrong with my code? Or how should I set the
> properties?
>
> Thanking you in advance for your help
>
Previous Topic:How can I get the value of bound parameter?
Next Topic:RenderOption for DOC, PPT and XLS
Goto Forum:
  


Current Time: Sun Jul 07 08:31:40 GMT 2024

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

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

Back to the top