karaf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Baptiste Onofré ...@nanthrax.net>
Subject Re: pax-jdbc-config connection pool configuration
Date Mon, 14 May 2018 20:07:22 GMT
Hi Alex,

the MariaDbDataSourceFactory uses MySQLDataSource internally. And the 
properties is not passed in the factory.

Can you please create a Jira at pax jdbc ?

Thanks
Regards
JB

On 14/05/2018 21:47, Alex Soto wrote:
> Using Karaf  4.2.0, I am trying to configure connection pool 
> using pax-jdbc-config  approach.  I installed features:
> 
>     pax-jdbc-mariadb
>     pax-jdbc-config
>     pax-jdbc-pool-dbcp2
> 
> 
> 
> 
> I dropped a /org.ops4j.datasource-responder.cfg/ file in the etc directory:
> 
> 
>     osgi.jdbc.driver.name = mariadb
>     dataSourceName=responder
>     url = jdbc:mariadb://localhost:3306/responder
>     user=XXXX
>     password=XXXX
>     pool=dbcp2
>     xa=true
>     databaseName=responder
>     jdbc.pool.maxTotal=8
> 
> 
> The last line causes this error:
> 
>     cannot set properties [pool.maxTotal]
>     java.sql.SQLException: cannot set properties [pool.maxTotal]
>     at org.ops4j.pax.jdbc.mariadb.impl.MariaDbDataSourceFactory.setProperties(MariaDbDataSourceFactory.java:70)
>     ~[?:?]
>     at org.ops4j.pax.jdbc.mariadb.impl.MariaDbDataSourceFactory.createDataSource(MariaDbDataSourceFactory.java:36)
>     ~[?:?]
>     at
>     org.ops4j.pax.jdbc.config.impl.DataSourceRegistration.createDs(DataSourceRegistration.java:134)
>     ~[?:?]
>     at
>     org.ops4j.pax.jdbc.config.impl.DataSourceRegistration.<init>(DataSourceRegistration.java:80)
>     ~[?:?]
>     at
>     org.ops4j.pax.jdbc.config.impl.DataSourceConfigManager.lambda$null$0(DataSourceConfigManager.java:81)
>     ~[?:?]
>     at
>     org.ops4j.pax.jdbc.config.impl.ServiceTrackerHelper$1.addingService(ServiceTrackerHelper.java:131)
>     ~[?:?]
>     at
>     org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:941)
>     ~[?:?]
>     at
>     org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:870)
>     ~[?:?]
>     at
>     org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
>     ~[?:?]
>     at
>     org.osgi.util.tracker.AbstractTracked.trackInitial(AbstractTracked.java:183)
>     ~[?:?]
>     at
>     org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:318)
>     ~[?:?]
>     at
>     org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:261)
>     ~[?:?]
>     at
>     org.ops4j.pax.jdbc.config.impl.ServiceTrackerHelper.track(ServiceTrackerHelper.java:140)
>     ~[?:?]
>     at
>     org.ops4j.pax.jdbc.config.impl.DataSourceConfigManager.lambda$null$1(DataSourceConfigManager.java:77)
>     ~[?:?]
>     at
>     org.ops4j.pax.jdbc.config.impl.ServiceTrackerHelper.track(ServiceTrackerHelper.java:146)
>     ~[?:?]
>     at
>     org.ops4j.pax.jdbc.config.impl.ServiceTrackerHelper.track(ServiceTrackerHelper.java:85)
>     ~[?:?]
>     at
>     org.ops4j.pax.jdbc.config.impl.DataSourceConfigManager.lambda$null$2(DataSourceConfigManager.java:76)
>     ~[?:?]
>     at
>     org.ops4j.pax.jdbc.config.impl.ServiceTrackerHelper$1.addingService(ServiceTrackerHelper.java:131)
>     ~[?:?]
>     at
>     org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:941)
>     ~[?:?]
>     at
>     org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:870)
>     ~[?:?]
>     at
>     org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
>     ~[?:?]
>     at
>     org.osgi.util.tracker.AbstractTracked.trackInitial(AbstractTracked.java:183)
>     ~[?:?]
>     at
>     org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:318)
>     ~[?:?]
>     at
>     org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:261)
>     ~[?:?]
>     at
>     org.ops4j.pax.jdbc.config.impl.ServiceTrackerHelper.track(ServiceTrackerHelper.java:140)
>     ~[14:org.ops4j.pax.jdbc.config:1.2.0]
>     at
>     org.ops4j.pax.jdbc.config.impl.ServiceTrackerHelper.track(ServiceTrackerHelper.java:85)
>     ~[14:org.ops4j.pax.jdbc.config:1.2.0]
>     at org.ops4j.pax.jdbc.config.impl.DataSourceConfigManager.lambda$updated$3(DataSourceConfigManager.java:75)
>     ~[14:org.ops4j.pax.jdbc.config:1.2.0]
>     at
>     org.ops4j.pax.jdbc.config.impl.ServiceTrackerHelper.track(ServiceTrackerHelper.java:146) [14:org.ops4j.pax.jdbc.config:1.2.0]
>     at
>     org.ops4j.pax.jdbc.config.impl.ServiceTrackerHelper.track(ServiceTrackerHelper.java:85) [14:org.ops4j.pax.jdbc.config:1.2.0]
>     at
>     org.ops4j.pax.jdbc.config.impl.DataSourceConfigManager.updated(DataSourceConfigManager.java:74) [14:org.ops4j.pax.jdbc.config:1.2.0]
>     at org.apache.felix.cm.impl.helper.ManagedServiceFactoryTracker.updated(ManagedServiceFactoryTracker.java:159) [8:org.apache.felix.configadmin:1.8.16]
>     at org.apache.felix.cm.impl.helper.ManagedServiceFactoryTracker.provideConfiguration(ManagedServiceFactoryTracker.java:93)
>     [8:org.apache.felix.configadmin:1.8.16]
>     at
>     org.apache.felix.cm.impl.ConfigurationManager$UpdateConfiguration.run(ConfigurationManager.java:1792) [8:org.apache.felix.configadmin:1.8.16]
>     at
>     org.apache.felix.cm.impl.UpdateThread.run0(UpdateThread.java:141) [8:org.apache.felix.configadmin:1.8.16]
>     at
>     org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:109) [8:org.apache.felix.configadmin:1.8.16]
>     at java.lang.Thread.run(Thread.java:748) [?:?]
> 
> 
> 
> How do I configure the various parameters of the connection pool?
> 
> 
> Best regards,
> Alex soto
> 
> 
> 
> 

Mime
View raw message