You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Paul Spencer <pa...@apache.org> on 2018/07/24 16:02:39 UTC
Creating an JDBC
Karaf 4.2
I am trying to create a JDBC datasource for a DBMS not natively supported by
PAX-JDBC, specifically Ingres. Below are the commands I am using to
install the Ingres JDBC driver and create the datasource. Based on the log
files, the creation process is waiting on a service dependency.
karaf@root()> bundle:install wrap:mvn:com.ingres.jdbc/iijdbc/9.2-3.4.10
karaf@root()> jdbc:ds-create -url jdbc:ingres://localhost/dbname -u user -p
password -dc com.ingres.jdbc.IngresDataSource myDS
karaf@root()> log:display
11:47:35.465 INFO [CM Configuration Updater (Update:
pid=org.ops4j.datasource.b91f90b0-b399-49ab-9f55-9ab522d24833)] Waiting for
service dependency:
(&(objectClass=org.osgi.service.jdbc.DataSourceFactory)(osgi.jdbc.driver.class=com.ingres.jdbc.IngresDataSource))
How to I create a JDBC datasource using com.ingres.jdbc.IngresDataSource?
--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
Re: Creating an JDBC
Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi,
As a workaround, you can try to use the bundle:dynamic-import command on
Pax JDBC bundles.
I will check later today if it makes sense to enable by default for
generic driver support.
Regards
JB
On 25/07/2018 04:43, Paul Spencer wrote:
> JB,
> I am not sure how to "enable dynamic import for Pax JDBC".
>
> Paul Spencer
>
>> On Jul 24, 2018, at 1:03 PM, Jean-Baptiste Onofré <jb...@nanthrax.net> wrote:
>>
>> Hi Paul,
>>
>> can you try to enable dynamic import for Pax JDBC ?
>>
>> I will add this natively.
>>
>> Regards
>> JB
>>
>> On 24/07/2018 18:02, Paul Spencer wrote:
>>> Karaf 4.2
>>>
>>> I am trying to create a JDBC datasource for a DBMS not natively supported by
>>> PAX-JDBC, specifically Ingres. Below are the commands I am using to
>>> install the Ingres JDBC driver and create the datasource. Based on the log
>>> files, the creation process is waiting on a service dependency.
>>>
>>> karaf@root()> bundle:install wrap:mvn:com.ingres.jdbc/iijdbc/9.2-3.4.10
>>> karaf@root()> jdbc:ds-create -url jdbc:ingres://localhost/dbname -u user -p
>>> password -dc com.ingres.jdbc.IngresDataSource myDS
>>> karaf@root()> log:display
>>> 11:47:35.465 INFO [CM Configuration Updater (Update:
>>> pid=org.ops4j.datasource.b91f90b0-b399-49ab-9f55-9ab522d24833)] Waiting for
>>> service dependency:
>>> (&(objectClass=org.osgi.service.jdbc.DataSourceFactory)(osgi.jdbc.driver.class=com.ingres.jdbc.IngresDataSource))
>>>
>>> How to I create a JDBC datasource using com.ingres.jdbc.IngresDataSource?
>>>
>>>
>>>
>>> --
>>> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
>>>
>
Re: Creating an JDBC
Posted by Paul Spencer <pa...@mindspring.com>.
JB,
I am not sure how to "enable dynamic import for Pax JDBC".
Paul Spencer
> On Jul 24, 2018, at 1:03 PM, Jean-Baptiste Onofré <jb...@nanthrax.net> wrote:
>
> Hi Paul,
>
> can you try to enable dynamic import for Pax JDBC ?
>
> I will add this natively.
>
> Regards
> JB
>
> On 24/07/2018 18:02, Paul Spencer wrote:
>> Karaf 4.2
>>
>> I am trying to create a JDBC datasource for a DBMS not natively supported by
>> PAX-JDBC, specifically Ingres. Below are the commands I am using to
>> install the Ingres JDBC driver and create the datasource. Based on the log
>> files, the creation process is waiting on a service dependency.
>>
>> karaf@root()> bundle:install wrap:mvn:com.ingres.jdbc/iijdbc/9.2-3.4.10
>> karaf@root()> jdbc:ds-create -url jdbc:ingres://localhost/dbname -u user -p
>> password -dc com.ingres.jdbc.IngresDataSource myDS
>> karaf@root()> log:display
>> 11:47:35.465 INFO [CM Configuration Updater (Update:
>> pid=org.ops4j.datasource.b91f90b0-b399-49ab-9f55-9ab522d24833)] Waiting for
>> service dependency:
>> (&(objectClass=org.osgi.service.jdbc.DataSourceFactory)(osgi.jdbc.driver.class=com.ingres.jdbc.IngresDataSource))
>>
>> How to I create a JDBC datasource using com.ingres.jdbc.IngresDataSource?
>>
>>
>>
>> --
>> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
>>
Re: Creating an JDBC
Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Paul,
can you try to enable dynamic import for Pax JDBC ?
I will add this natively.
Regards
JB
On 24/07/2018 18:02, Paul Spencer wrote:
> Karaf 4.2
>
> I am trying to create a JDBC datasource for a DBMS not natively supported by
> PAX-JDBC, specifically Ingres. Below are the commands I am using to
> install the Ingres JDBC driver and create the datasource. Based on the log
> files, the creation process is waiting on a service dependency.
>
> karaf@root()> bundle:install wrap:mvn:com.ingres.jdbc/iijdbc/9.2-3.4.10
> karaf@root()> jdbc:ds-create -url jdbc:ingres://localhost/dbname -u user -p
> password -dc com.ingres.jdbc.IngresDataSource myDS
> karaf@root()> log:display
> 11:47:35.465 INFO [CM Configuration Updater (Update:
> pid=org.ops4j.datasource.b91f90b0-b399-49ab-9f55-9ab522d24833)] Waiting for
> service dependency:
> (&(objectClass=org.osgi.service.jdbc.DataSourceFactory)(osgi.jdbc.driver.class=com.ingres.jdbc.IngresDataSource))
>
> How to I create a JDBC datasource using com.ingres.jdbc.IngresDataSource?
>
>
>
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
>
Re: Creating an JDBC
Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Christian,
I thought we provide a GenericDataSourceFactory taking just a driver (as
we did with the generic datasource when we used blueprint).
I will check and add this if required: it should be easier for our end
users as they should be able to create a generic datasource without code.
Regards
JB
On 25/07/2018 07:11, Christian Schneider wrote:
> You need a DataSourceFactory for this to work. As ingres probably does
> not offer this you can create your own bundle with a class that
> implements DataSourceFactory and returns a DataSource. This class then
> must be published as a service with the above property.
>
> Christian
>
> Am Di., 24. Juli 2018 um 18:02 Uhr schrieb Paul Spencer
> <paulsp@apache.org <ma...@apache.org>>:
>
> Karaf 4.2
>
> I am trying to create a JDBC datasource for a DBMS not natively
> supported by
> PAX-JDBC, specifically Ingres. Below are the commands I am using to
> install the Ingres JDBC driver and create the datasource. Based on
> the log
> files, the creation process is waiting on a service dependency.
>
> karaf@root()> bundle:install wrap:mvn:com.ingres.jdbc/iijdbc/9.2-3.4.10
> karaf@root()> jdbc:ds-create -url jdbc:ingres://localhost/dbname -u
> user -p
> password -dc com.ingres.jdbc.IngresDataSource myDS
> karaf@root()> log:display
> 11:47:35.465 INFO [CM Configuration Updater (Update:
> pid=org.ops4j.datasource.b91f90b0-b399-49ab-9f55-9ab522d24833)]
> Waiting for
> service dependency:
> (&(objectClass=org.osgi.service.jdbc.DataSourceFactory)(osgi.jdbc.driver.class=com.ingres.jdbc.IngresDataSource))
>
> How to I create a JDBC datasource using
> com.ingres.jdbc.IngresDataSource?
>
>
>
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
>
>
>
> --
> --
> Christian Schneider
> http://www.liquid-reality.de
>
> Computer Scientist
> http://www.adobe.com
>
Re: Creating an JDBC
Posted by Christian Schneider <ch...@die-schneider.net>.
You need a DataSourceFactory for this to work. As ingres probably does not
offer this you can create your own bundle with a class that implements
DataSourceFactory and returns a DataSource. This class then must be
published as a service with the above property.
Christian
Am Di., 24. Juli 2018 um 18:02 Uhr schrieb Paul Spencer <pa...@apache.org>:
> Karaf 4.2
>
> I am trying to create a JDBC datasource for a DBMS not natively supported
> by
> PAX-JDBC, specifically Ingres. Below are the commands I am using to
> install the Ingres JDBC driver and create the datasource. Based on the log
> files, the creation process is waiting on a service dependency.
>
> karaf@root()> bundle:install wrap:mvn:com.ingres.jdbc/iijdbc/9.2-3.4.10
> karaf@root()> jdbc:ds-create -url jdbc:ingres://localhost/dbname -u user
> -p
> password -dc com.ingres.jdbc.IngresDataSource myDS
> karaf@root()> log:display
> 11:47:35.465 INFO [CM Configuration Updater (Update:
> pid=org.ops4j.datasource.b91f90b0-b399-49ab-9f55-9ab522d24833)] Waiting for
> service dependency:
>
> (&(objectClass=org.osgi.service.jdbc.DataSourceFactory)(osgi.jdbc.driver.class=com.ingres.jdbc.IngresDataSource))
>
> How to I create a JDBC datasource using com.ingres.jdbc.IngresDataSource?
>
>
>
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
>
--
--
Christian Schneider
http://www.liquid-reality.de
Computer Scientist
http://www.adobe.com