You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "Guillaume Nodet (JIRA)" <ji...@apache.org> on 2015/12/08 11:48:10 UTC

[jira] [Commented] (KARAF-4172) Karaf must be restarted for pax-jdbc see driver adapters

    [ https://issues.apache.org/jira/browse/KARAF-4172?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15046720#comment-15046720 ] 

Guillaume Nodet commented on KARAF-4172:
----------------------------------------

You should try to deploy the bundles {{mvn:org.postgresql/postgresql/9.4-1200-jdbc41}} and {{mvn:postgres/test2}} using a feature.
This will solve the problem.
The reason is that you manually install bundles without using the deployer, so that the wiring is done according to the OSGi rules, which in this case, is valid.  The observed behaviour is caused by the org.osgi.jdbc package being exported twice and the two manually installed bundles are wired to the incorrect package.

> Karaf must be restarted for pax-jdbc see driver adapters
> --------------------------------------------------------
>
>                 Key: KARAF-4172
>                 URL: https://issues.apache.org/jira/browse/KARAF-4172
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf-jdbc
>    Affects Versions: 4.0.3
>         Environment: Windows 7 version 6.1 x64
> Java 1.7.0_80 x64
>            Reporter: Viktor Kozlov
>            Priority: Blocker
>             Fix For: 4.0.4
>
>
> I made some tests with DataSourceFactory being visible by pax-jdbc. Here is the results:
> Karaf must be restarted for pax-jdbc see my adapters. It doesn't matter i install my adapters after Karaf restart or before. It doesn't matter how I register my services via blueprint or by activator. I install my adapters via bundle:install mvn: wrap command.
> When I install build-in pax-jdbc adapter features everything works fine.
> How to reproduce:
> 1. build simple driver adapter: http://www.lorien.biz/karaf/test2.zip
> 2. run clear Karaf 4.0.3
> 3. run script (please, do not modify, run as is):
> feature:install -v eventadmin;
> feature:install -v http-whiteboard;
> feature:install -v jdbc;
> feature:install -v pax-jdbc-pool-dbcp2/0.7.0;
> feature:install -v eclipselink/2.6.0;
> feature:install -v jpa/2.2.0;
> bundle:install -s mvn:org.postgresql/postgresql/9.4-1200-jdbc41;
> bundle:install -s mvn:postgres/test2;
> 4. type ds-factories
> you will see empty list
> 5. type service:list DataSourceFactory
> you will see some factories registered
> 6. restart karaf and type ds-factories
> you will see factories appeared
> It is strange but 0.7.0 marked as unreleased version here in Jira.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)