feature:repo-add mvn:org.ops4j.pax.jdbc/pax-jdbc-features/0.8.0/xml/featuresfeature:install transaction jndi pax-jdbc-mysql pax-jdbc-pool-dbcp2 pax-jdbc-config |
Chenkai,
I dug into the issue you are seeing. It appears to be related to an issue where Karaf is adding a “confiurationPid” to prevent installing a configuration multiple times. PAX JDBC forwards any additional properties to the DataSourceFactory which doesn’t know how to handle “configurationPid”.
The instructions you linked to are specific to Karaf 3.0.x while DDF is built upon Karaf 4.0.x which is likely why it works in Karaf but not DDF. According to github, it is still possible to create a DataSource via blueprint although it is considered deprecated. It may get you passed this issue. https://github.com/cschneider/Karaf-Tutorial/tree/master/db/datasource
I would recommend following this bug ticket for more information: https://issues.apache.org/jira/browse/KARAF-4124
PAX JDBC documentation for your reference: https://ops4j1.jira.com/wiki/display/PAXJDBC/Create+DataSource+from+config
I would be curious to know what you want to use MySQL for and if the same goals could be accomplished using the included SolrCatalogProvider in DDF as an alternative.
For reference here is what I did to reproduce the error:
1. Edit org.ops4j.pax.url.mvn.cfg and uncomment the last property “org.ops4j.pax.url.mvn.cfg” and its values.
2. Start DDF
3. feature:repo-add mvn:org.ops4j.pax.jdbc/pax-jdbc-features/0.8.0/xml/features
4. feature:repo-add org.apache.karaf.features/enterprise/4.0.7/xml/features
5. feature:install transaction jndi pax-jdbc-mysql pax-jdbc-pool-dbcp2 pax-jdbc-config
--Keith
From:
<ddf-dev...@googlegroups.com> on behalf of
杨晨凯 <ckya...@gmail.com>
Date: Thursday, December 8, 2016 at 7:09 AM
To: ddf-developers <ddf-dev...@googlegroups.com>
Subject: MySQL Database connection in DDF
I'm trying to develop database storage provider in DDF. But when I configure the data source for mysql database, the DDF.log gives the error "java.sql.SQLException: cannot set properties [configurationPid]".
The steps of configuration are just like the tutorial in Apache Karaf Tutorial Part 6 - Database Access.
|
|
It really works in Karaf since I have tried it in an independent Karaf. However, I get the mentioned error information in the log of DDF.
I want to know if anyone has configured database in DDF and how to configure it. Thanks!
By the way, the error information is given at the end.
--
You received this message because you are subscribed to the Google Groups "ddf-developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
ddf-developer...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
That plugin is used for Configuration Admin and should have nothing to do with connecting up DDF to a data store other than Solr.
--
You received this message because you are subscribed to a topic in the Google Groups "ddf-developers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ddf-developers/RPEqdMQEijg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ddf-developers+unsubscribe@googlegroups.com.