The adapter bundle is not necessary anymore for the newest postgresql version as it already provides a DataSourceFactory.

I just tried to install pax-jdbc-postgresql 0.5.0 in karaf 4. The problem seems to be that the postgres bundle is not being installed.
I only see the org.osgi.service.jdbc spec bundle.

The strange thing is that when I install the postgresql bundle by hand it works fine.

install -s mvn:org.postgresql/postgresql/9.4-1200-jdbc41

When both are installed I see the DataSourceFactory.

service:list DataSourceFactory
[org.osgi.service.jdbc.DataSourceFactory]
-----------------------------------------
 osgi.jdbc.driver.class = org.postgresql.Driver
 osgi.jdbc.driver.name = PostgreSQL JDBC Driver
 osgi.jdbc.driver.version = PostgreSQL 9.4 JDBC4.1 (build 1200)
 service.bundleid = 54
 service.id = 126
 service.scope = singleton
Provided by :
 PostgreSQL JDBC Driver JDBC41 (54)

No idea why it does not work with the feature. You can work around the problem by defining a feature for your own application that load the bundles using the mvn urls from the pax-jdbc feature file.

Christian

On 08.05.2015 16:29, ellirael wrote:
Is there something wrong with pax-jdbc-postresql?

Compairing 4.0 and 5.0 feature files I found out that one bundle is missed.

<feature name="pax-jdbc-postgresql" description="Provides JDBC PostgreSQL
DataSourceFactory" version="0.5.0"
resolver="(obr)"><feature>transaction</feature><feature>pax-jdbc-spec</feature><bundle
dependency="true">mvn:org.postgresql/postgresql/9.4-1200-jdbc41</bundle></feature>

<feature name="pax-jdbc-postgresql" description="Provides JDBC PostgreSQL
DataSourceFactory" version="0.4.0"
resolver="(obr)"><feature>pax-jdbc</feature><bundle
dependency="true">mvn:org.ancoron.postgresql/org.postgresql/9.1.901.jdbc4.1-rc9</bundle><bundle>mvn:org.ops4j.pax.jdbc/pax-jdbc-postgresql/0.4.0</bundle></feature>

There is no more adapter bundle in 5.0 for postgress. And karaf doesn't
create DataSource without an adapter.

Then I checked git repo: https://github.com/ops4j/org.ops4j.pax.jdbc.
There is no mention about postgress.



--
View this message in context: 
http://karaf.922171.n3.nabble.com/Karaf-JTA-and-JDBC-DataSource-tp4039081p4040239.html
Sent from the Karaf - User mailing list archive at Nabble.com.


--
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com

Reply via email to