Hi Erwin, First, I'm suggesting to upgrade to Pax JDBC 1.3.5 containing fixes.
I guess you have both pax-jdbc-config feature and pax-jdbc bundle installed. pax-jdbc bundle is a wrapper that automatically detect and expose a factory. It's similar to what I fixed in https://ops4j1.jira.com/browse/PAXJDBC-135. You should not install pax-jdbc bundle IMHO as you are using pax-jdbc-mysql feature. Regards JB On 22/05/2019 04:28, Erwin Hogeweg wrote: > Hi, > > Not sure if I am doing something wrong or if this is a known issue. I am > using Karaf-4.2.5 with pax-jdbc-1.3.1 and I end up with two identical > DataSourceFactories and 2 identical Data Sources. One from the > mysql-5.1.34 Oracle bundle and one from the pax-jdbc-mysql adapter bundle. > > When I use jdbc:ds-list I see 2 Datasources for ea. database and Karaf > even generates a warning msg that I have duplicate DataSources and that > I should check my config. > > I only have ONE config file for ea. database. > > Name │ Product │ Version │ URL > │ Status > ───────────────┼─────────┼────────────┼─────────────────────────────────────────────────────────────────────────────────────────────┼─────── > jdbc/database1 │ MySQL │ 5.5.61-cll │ > jdbc:mysql://p.q.r.s:3306/Schema?useSSL=false&zeroDateTimeBehavior=convertToNull > │ OK > jdbc/database2 │ MySQL │ 5.6.31-log │ > jdbc:mysql://the_db_server:3306/schema?useSSL=false > │ OK > jdbc/database2 │ MySQL │ 5.6.31-log │ > jdbc:mysql://the_db_server:3306/schema?useSSL=false > │ OK > jdbc/databawe1 │ MySQL │ 5.5.61-cll │ > jdbc:mysql://p.q.r.s:3306/Schema?useSSL=false&zeroDateTimeBehavior=convertToNull > │ OK > > [pipe-jdbc:ds-list] WARN > org.apache.karaf.jdbc.internal.JdbcServiceImpl - Multiple JDBC > datasources found with the same service ranking for jdbc/myDB > > > [org.osgi.service.jdbc.DataSourceFactory] > ----------------------------------------- > osgi.jdbc.driver.class = com.mysql.jdbc.Driver > osgi.jdbc.driver.name = com.mysql.jdbc > osgi.jdbc.driver.version = 5.1.34 > service.bundleid = 172 > service.id <http://service.id> = 415 > service.scope = singleton > *Provided by : > Oracle Corporation's JDBC Driver for MySQL (172)* > Used by: > OPS4J Pax JDBC Config (12) > > [org.osgi.service.jdbc.DataSourceFactory] > ----------------------------------------- > osgi.jdbc.driver.class = com.mysql.jdbc.Driver > osgi.jdbc.driver.name = mysql > service.bundleid = 235 > service.id <http://service.id> = 420 > service.scope = singleton > *Provided by : > OPS4J Pax JDBC MySQL Driver Adapter (235)* > Used by: > OPS4J Pax JDBC Config (12) > > > Kind Regards, > > Erwin -- Jean-Baptiste Onofré [email protected] http://blog.nanthrax.net Talend - http://www.talend.com
