Skip to main content



      Home
Home » Archived » BIRT » Changing path for OSGi configuration
Changing path for OSGi configuration [message #203973] Thu, 30 November 2006 06:06 Go to next message
Eclipse UserFriend
Originally posted by: oliver.zein.email.de

I need to change the location of the OSGi configuration files which is by
default /WEB-INF/platform/confguration.

This is necessary, because it runs in a Tomcat clustered environment and
the files in the webapps directory are not replicated. Right now I get an
error message that the file
WEB-INF\platform\configuration\org.eclipse.osgi\.manager\.fi leTableLock
can not be read.

I'm using the birt web-viewer under Tomcat 5.

Is this possible?
Re: Changing path for OSGi configuration [message #204159 is a reply to message #203973] Thu, 30 November 2006 13:09 Go to previous messageGo to next message
Eclipse UserFriend
Oliver,

I dont think this is possible with BIRT currently without making mods to the
WebViewer.
Is there a reason why you can not war the WebViewer example and deploy to
each node?

Jason

"Oliver Zein" <oliver.zein@email.de> wrote in message
news:5fe85784cd076973fb8872b9e8beb6fd$1@www.eclipse.org...
>I need to change the location of the OSGi configuration files which is by
>default /WEB-INF/platform/confguration.
> This is necessary, because it runs in a Tomcat clustered environment and
> the files in the webapps directory are not replicated. Right now I get an
> error message that the file
> WEB-INF\platform\configuration\org.eclipse.osgi\.manager\.fi leTableLock
> can not be read.
>
> I'm using the birt web-viewer under Tomcat 5.
>
> Is this possible?
>
Re: Changing path for OSGi configuration [message #204236 is a reply to message #203973] Thu, 30 November 2006 17:19 Go to previous messageGo to next message
Eclipse UserFriend
I don't think this is currently doable. Please open a Bugzilla enhancement
for the BIRT dev team to take a look at this.

thanks,

--
Gary Xue [Actuate Corporation | BIRT Committer]


"Oliver Zein" <oliver.zein@email.de> wrote in message
news:5fe85784cd076973fb8872b9e8beb6fd$1@www.eclipse.org...
>I need to change the location of the OSGi configuration files which is by
>default /WEB-INF/platform/confguration.
> This is necessary, because it runs in a Tomcat clustered environment and
> the files in the webapps directory are not replicated. Right now I get an
> error message that the file
> WEB-INF\platform\configuration\org.eclipse.osgi\.manager\.fi leTableLock
> can not be read.
>
> I'm using the birt web-viewer under Tomcat 5.
>
> Is this possible?
>
Re: Changing path for OSGi configuration [message #204294 is a reply to message #204159] Fri, 01 December 2006 04:07 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: oliver.zein.email.de

Hi Jason

I think it would be possible to deploy to all nodes. But if one node
writes to those files, the other nodes won't see the change.

Oliver.
Re: Changing path for OSGi configuration [message #204457 is a reply to message #204294] Fri, 01 December 2006 13:21 Go to previous messageGo to next message
Eclipse UserFriend
Are you using sticky sessions?
Another thought may be to setup the tmp dir and reports directory for BIRT
to point to a network share.

Jason

"Oliver Zein" <oliver.zein@email.de> wrote in message
news:74fc603e91ca95e1e4bb7071129bf07a$1@www.eclipse.org...
> Hi Jason
>
> I think it would be possible to deploy to all nodes. But if one node
> writes to those files, the other nodes won't see the change.
>
> Oliver.
>
Re: Changing path for OSGi configuration [message #204625 is a reply to message #204457] Mon, 04 December 2006 08:49 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: oliver.zein.email.de

I already changed the following properties in web.xml:

- BIRT_VIEWER_WORKING_FOLDER
- BIRT_VIEWER_DOCUMENT_FOLDER
- BIRT_RESOURCE_PATH

But that did not change the location of the OSGi configuration. Is there
any other parameter I could try?

- Oliver
Re: Changing path for OSGi configuration [message #204867 is a reply to message #204625] Tue, 05 December 2006 12:02 Go to previous messageGo to next message
Eclipse UserFriend
Oliver,

There is no setting to change the location of the OSGi configuration for the
Web Viewer.
If you are using the engine this is possible but the Viewer looks in the
WEB-INF/platform directory.
You could check out the web viewer code an modifiy it, but I still do not
understand the issue.

Jason

"Oliver Zein" <oliver.zein@email.de> wrote in message
news:3e993c102404ded1a681926cdccd0523$1@www.eclipse.org...
>I already changed the following properties in web.xml:
>
> - BIRT_VIEWER_WORKING_FOLDER
> - BIRT_VIEWER_DOCUMENT_FOLDER
> - BIRT_RESOURCE_PATH
>
> But that did not change the location of the OSGi configuration. Is there
> any other parameter I could try?
>
> - Oliver
>
Re: Changing path for OSGi configuration [message #205056 is a reply to message #204867] Wed, 06 December 2006 06:04 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: oliver.zein.email.de

I think the most important question is:
Does the web viewer need to write to any of the files under
WEB-INF\platform\configuration\org.eclipse.osgi\?

If yes, that would be the problem. Because any change made by one node is
not visible to any of the other nodes in the tomcat cluster.

- Oliver
Re: Changing path for OSGi configuration [message #208183 is a reply to message #205056] Fri, 22 December 2006 09:25 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: arne.degenring.com

Oliver Zein wrote:

> I think the most important question is:
> Does the web viewer need to write to any of the files under
> WEB-INFplatformconfigurationorg.eclipse.osgi?
>
> If yes, that would be the problem. Because any change made
> by one node is not visible to any of the other nodes in the
> tomcat cluster.

Oliver,

the fact that the web viewer does by default write to the
WEB-INF/platform/configuration directory is something I don't like either.

I believe the written files are only some kind of cached OSGi plugin
metadata, so I assume it wouldn't be a problem that the changes wouldn't
be visible to other nodes.

But anyway, in some production environments write access to the deployment
directories might be disabled which would lead to problems. I started to
experiment with the following setting that I added to the
platform/configuration/config.ini file:

osgi.configuration.area.readOnly=true

Afterwards, nothing seems to be written to the configuration directory any
more. Could anyone with deeper OSGi knowledge confirm, that adding this
setting won't lead to problems?

Thanks
-- Arne
Re: Changing path for OSGi configuration [message #208605 is a reply to message #208183] Tue, 02 January 2007 04:08 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: arne.degenring.com

Update: In the meantime, I did some more testing. Adding
"osgi.configuration.area.readOnly=true" to the
platform/configuration/config.ini did not have an effect. After setting it
as a JVM system parameter, only a log file and
org.eclipse.update/platform.xml still were written to the
platform/configuration dir. But, when I tried to execute reports, I
experienced a class loading error:

java.lang.ClassCastException: java.lang.NoClassDefFoundError
at
org.eclipse.birt.report.soapengine.processor.AbstractBaseCom ponentProcessor.process(AbstractBaseComponentProcessor.java: 115)
at
org.eclipse.birt.report.soapengine.endpoint.BirtSoapBindingI mpl.getUpdatedObjects(BirtSoapBindingImpl.java:66)
....

Maybe "osgi.configuration.area" could be used to move the whole
configuration directory away instead of setting it read-only, but I
haven't tried it yet.

Regards,
--Arne



Arne Degenring wrote:

> Oliver Zein wrote:

>> I think the most important question is:
>> Does the web viewer need to write to any of the files under
>> WEB-INFplatformconfigurationorg.eclipse.osgi?
>>
>> If yes, that would be the problem. Because any change made
>> by one node is not visible to any of the other nodes in the
>> tomcat cluster.

> Oliver,

> the fact that the web viewer does by default write to the
> WEB-INF/platform/configuration directory is something I don't like either.

> I believe the written files are only some kind of cached OSGi plugin
> metadata, so I assume it wouldn't be a problem that the changes wouldn't
> be visible to other nodes.

> But anyway, in some production environments write access to the deployment
> directories might be disabled which would lead to problems. I started to
> experiment with the following setting that I added to the
> platform/configuration/config.ini file:

> osgi.configuration.area.readOnly=true

> Afterwards, nothing seems to be written to the configuration directory any
> more. Could anyone with deeper OSGi knowledge confirm, that adding this
> setting won't lead to problems?

> Thanks
> -- Arne
Re: Changing path for OSGi configuration [message #208859 is a reply to message #208605] Wed, 03 January 2007 04:36 Go to previous messageGo to next message
Eclipse UserFriend
We were facing the same problem that the engine is installed in a read-only
environment and the configuration area must be somewhere else.
I believe, since the config.ini is found in the configuration ares, this
property cannot be configured here but must be set via the system property
osgi.configuration.area.
Since we choose to use Version 2.1.0, I modified the code to check whether
the
system property is already set an only set the value if it is not.
This can be done in the class OSGILauncher in
org.eclipse.birt.core.framework.osgi

Line60: // configuration.area
-> String configDir = System.getProperty("osgi.configuration.area");
-> File configurationDirectory =
((configDir == null) || (configDir.equals(""))) ?
new File( platformDirectory, "configuration" ) : new File (configDir);
//$NON-NLS-1$
if ( !configurationDirectory.exists( ) )
{
configurationDirectory.mkdirs( );
}
System
.setProperty(
"osgi.configuration.area", configurationDirectory.getAbsolutePath( )
); //$NON-NLS-1$

// instance.area
-> String workspaceDir = System.getProperty("osgi.instance.area");
-> File workspaceDirectory =
((workspaceDir == null) || (workspaceDir.equals(""))) ?
new File( platformDirectory, "workspace" ) : new File (workspaceDir);
//$NON-NLS-1$
if ( !workspaceDirectory.exists( ) )
{
workspaceDirectory.mkdirs( );
}
System.setProperty(
"osgi.instance.area", workspaceDirectory.getAbsolutePath( ) );
//$NON-NLS-1$

The configuration area and the instance area (which are the only
directories
which are written to - I think) can now be set via system properties.

Hope this helps.

Peter Fopma
Re: Changing path for OSGi configuration [message #208867 is a reply to message #208859] Wed, 03 January 2007 04:42 Go to previous message
Eclipse UserFriend
There also is a bug for this issue: 159445
Previous Topic:how to turn off locale settings?
Next Topic:NoSuchMethodError: allowsEmptyValueAsNull()Z
Goto Forum:
  


Current Time: Sat Jun 07 04:58:01 EDT 2025

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

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

Back to the top