You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "Jean-Baptiste Onofré (JIRA)" <ji...@apache.org> on 2016/08/23 19:25:20 UTC
[jira] [Updated] (KARAF-4124) feature config installer adds
property to config
[ https://issues.apache.org/jira/browse/KARAF-4124?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jean-Baptiste Onofré updated KARAF-4124:
----------------------------------------
Fix Version/s: (was: 4.0.6)
4.0.7
> feature config installer adds property to config
> ------------------------------------------------
>
> Key: KARAF-4124
> URL: https://issues.apache.org/jira/browse/KARAF-4124
> Project: Karaf
> Issue Type: Bug
> Components: karaf-feature
> Affects Versions: 4.0.3
> Reporter: Markus Rathgeb
> Assignee: Jean-Baptiste Onofré
> Fix For: 4.1.0, 4.0.7
>
>
> The <config/> element in a feature XML allows a feature to create and/or populate a configuration (identified by a configuration PID).
> The "FeatureConfigInstaller" adds a custom property to the configuration.
> key = "org.apache.karaf.features.configKey"
> value = result of function call "createConfigurationKey(pid[0], pid[1])"
> There are bundles that cannot handle additional properties in the configuration.
> For example:
> * using Aries JPA + Hiberante + h2
> * the configuration is installed by a feature and a realted config entry
> * this will result in a non working setup
> {noformat}
> Caused by: org.h2.jdbc.JdbcSQLException: Unsupported connection setting "ORG.APACHE.KARAF.FEATURES.CONFIGKEY" [90113-172]
> at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
> at org.h2.message.DbException.get(DbException.java:169)
> at org.h2.message.DbException.get(DbException.java:146)
> at org.h2.engine.ConnectionInfo.readSettingsFromURL(ConnectionInfo.java:266)
> at org.h2.engine.ConnectionInfo.<init>(ConnectionInfo.java:77)
> at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:90)
> at org.h2.Driver.connect(Driver.java:73)
> at org.h2.jdbcx.JdbcDataSource.getJdbcConnection(JdbcDataSource.java:187)
> at org.h2.jdbcx.JdbcDataSource.getXAConnection(JdbcDataSource.java:323)
> at org.apache.commons.dbcp2.managed.DataSourceXAConnectionFactory.createConnection(DataSourceXAConnectionFactory.java:112)
> at org.apache.commons.dbcp2.managed.PoolableManagedConnectionFactory.makeObject(PoolableManagedConnectionFactory.java:66)
> at org.apache.commons.pool2.impl.GenericObjectPool.create(GenericObjectPool.java:868)
> at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:435)
> at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:363)
> at org.apache.commons.dbcp2.managed.ManagedConnection.updateTransactionStatus(ManagedConnection.java:127)
> ... 132 more
> {noformat}
> There is a conditional branch in the "findExistingConfiguration" function to filter (find) the configuration using that property instead of the service.pid (this is another conditional branch).
> Is there any reason for using that property?
> I changed the "FeatureConfigInstaller" to not append that property and the above example is working now.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)