You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Tom Barber <to...@meteorite.bi> on 2015/12/20 11:21:46 UTC

Datasource not found

Hello folks

i have a datasource define in etc/org.ops4j.datasource-users.cfg

When I install my feature I have a persistence bundle that starts but I get:

apache.aries.jpa.container - 1.0.2 | The DataSource
osgi:service/javax.sql.DataSource/(osgi.jndi.service.name=userlist)
required by bundle bi.meteorite.persistence/1.0.0.SNAPSHOT could not be
found.

And my bundle hangs in grace period.

If I then stop and start karaf all my bundles start.

So how do I get it to find the datasource before trying to start my bundle
with blueprint?

Thanks

Tom

Re: Datasource not found

Posted by Tom Barber <to...@meteorite.bi>.
Okay

It appears either a) upgrading to JPA 2 or b) switching from blueprint xml
to blueprint annotations for JPA has fixed the issue as the test suite has
now run a few times without freaking out.

Tom

On Mon, Dec 21, 2015 at 2:53 PM, Tom Barber <to...@meteorite.bi> wrote:

> So I have:
>
> https://github.com/OSBI/meteorite-core/blob/master/karaf/pom.xml#L176
>
> in my custom bundle, and then when you start:
>
> feature:install meteorite-core-features
>
> and all my bundles go to active.
>
> In my itests:
>
>
> https://github.com/OSBI/meteorite-core/blob/master/meteorite-core-itests/src/test/java/bi/meteorite/util/ITestBootstrap.java#L112
>
> install all my bundles then:
>
>
> https://github.com/OSBI/meteorite-core/blob/master/meteorite-core-itests/src/test/java/bi/meteorite/core/security/TestSecurity.java#L72
>
> As far as I can see I'm literally trying to block up everything, yet still
> the data sources don't get resolved, some of the time, but some times they
> do.
>
> The filter timeouts look correct, am I missing anything else I can try?
>
> Thanks
>
> Tom
>
> On Mon, Dec 21, 2015 at 1:44 PM, Achim Nierbeck <bc...@googlemail.com>
> wrote:
>
>> if you want to have your datasource injected into your test, you can also
>> add a timeout on that @Filter annotation.
>> That might help already, especially since your datasource is managed
>> service.
>>
>> regards, Achim
>>
>>
>> 2015-12-21 14:29 GMT+01:00 Tom Barber <to...@meteorite.bi>:
>>
>>> Okay I give up, sometimes pax exam runs okay, sometimes it doesn't, and
>>> I can't work out how to get it to wait for the datasource to become
>>> available.
>>>
>>> I've tried:
>>>
>>>   <reference id="emDataSource" interface="javax.sql.DataSource"
>>>                filter="(osgi.jndi.service.name=jdbc/userlist)"
>>> availability="mandatory"/>
>>> in blueprint
>>>
>>> and
>>>
>>>   @Inject
>>>   @Filter("(osgi.jdbc.driver.class=org.h2.Driver)")
>>>   private DataSourceFactory dsf;
>>>
>>> in the test suite and neither consistently run the test suite.
>>>
>>>
>>>
>>> On Mon, Dec 21, 2015 at 12:07 PM, Tom Barber <to...@meteorite.bi>
>>> wrote:
>>>
>>>> Hmm yeah, although running my Karaf container in pax exam, reverts back
>>>> to throwing the same error, even though running it manually doesn't.....
>>>>
>>>> On Sun, Dec 20, 2015 at 9:42 PM, Jean-Baptiste Onofré <jb...@nanthrax.net>
>>>> wrote:
>>>>
>>>>> OK, it's what I thought. That's why I added the pax-jdbc feature
>>>>> dependency in jdbc now.
>>>>>
>>>>> Regards
>>>>> JB
>>>>>
>>>>> On 12/20/2015 09:29 PM, Tom Barber wrote:
>>>>>
>>>>>> Looks like I was missing pax-jdbc, although I did have 3 other pax
>>>>>> jdbc
>>>>>> related features..... *facepalm*
>>>>>>
>>>>>> On Sun, Dec 20, 2015 at 5:37 PM, Jean-Baptiste Onofré <
>>>>>> jb@nanthrax.net
>>>>>> <ma...@nanthrax.net>> wrote:
>>>>>>
>>>>>>     Can you check if pax-jdbc and pax-jdbc-config feature are
>>>>>> installed
>>>>>>     (boot features in your case I guess) ?
>>>>>>
>>>>>>     Regards
>>>>>>     JB
>>>>>>
>>>>>>     On 12/20/2015 06:00 PM, Tom Barber wrote:
>>>>>>
>>>>>>         Okay so I tried something.
>>>>>>
>>>>>>         If I unzip my distro and start it up and run jdbc:ds-list the
>>>>>> data
>>>>>>         source is listed. If I then install my persistence bundle it
>>>>>>         finds it.
>>>>>>
>>>>>>         If I unzip my distro and start up my persistence bundle, it
>>>>>> doesn't
>>>>>>         detect the datasource.
>>>>>>
>>>>>>         Am I missing some bootstrap?
>>>>>>
>>>>>>         Tom
>>>>>>
>>>>>>
>>>>>>         On Sun, Dec 20, 2015 at 3:52 PM, Jean-Baptiste Onofré
>>>>>>         <jb@nanthrax.net <ma...@nanthrax.net>
>>>>>>         <mailto:jb@nanthrax.net <ma...@nanthrax.net>>> wrote:
>>>>>>
>>>>>>              Hi Tomn
>>>>>>
>>>>>>              what did you define in the cfg file ?
>>>>>>              Anything special in the log ?
>>>>>>
>>>>>>              I guess you use Karaf 4.0.2. Did you install the pax-jdbc
>>>>>>         feature:
>>>>>>
>>>>>>              feature:install pax-jdbc
>>>>>>
>>>>>>              ?
>>>>>>
>>>>>>              I fixed that in next Karaf version: now the jdbc feature
>>>>>>         installs
>>>>>>              pax-jdbc (it wasn't the case before).
>>>>>>
>>>>>>              Regards
>>>>>>              JB
>>>>>>
>>>>>>              On 12/20/2015 11:21 AM, Tom Barber wrote:
>>>>>>
>>>>>>                  Hello folks
>>>>>>
>>>>>>                  i have a datasource define in
>>>>>>         etc/org.ops4j.datasource-users.cfg
>>>>>>
>>>>>>                  When I install my feature I have a persistence
>>>>>> bundle that
>>>>>>                  starts but I get:
>>>>>>
>>>>>>                  apache.aries.jpa.container - 1.0.2 | The DataSource
>>>>>>
>>>>>>         osgi:service/javax.sql.DataSource/(osgi.jndi.service.name
>>>>>>         <http://osgi.jndi.service.name>
>>>>>>                  <http://osgi.jndi.service.name>
>>>>>>                  <http://osgi.jndi.service.name>=userlist) required
>>>>>> by
>>>>>>         bundle
>>>>>>                  bi.meteorite.persistence/1.0.0.SNAPSHOT could not be
>>>>>> found.
>>>>>>
>>>>>>                  And my bundle hangs in grace period.
>>>>>>
>>>>>>                  If I then stop and start karaf all my bundles start.
>>>>>>
>>>>>>                  So how do I get it to find the datasource before
>>>>>> trying
>>>>>>         to start my
>>>>>>                  bundle with blueprint?
>>>>>>
>>>>>>                  Thanks
>>>>>>
>>>>>>                  Tom
>>>>>>
>>>>>>
>>>>>>              --
>>>>>>              Jean-Baptiste Onofré
>>>>>>         jbonofre@apache.org <ma...@apache.org>
>>>>>>         <mailto:jbonofre@apache.org <ma...@apache.org>>
>>>>>>         http://blog.nanthrax.net
>>>>>>              Talend - http://www.talend.com
>>>>>>
>>>>>>
>>>>>>
>>>>>>     --
>>>>>>     Jean-Baptiste Onofré
>>>>>>     jbonofre@apache.org <ma...@apache.org>
>>>>>>     http://blog.nanthrax.net
>>>>>>     Talend - http://www.talend.com
>>>>>>
>>>>>>
>>>>>>
>>>>> --
>>>>> Jean-Baptiste Onofré
>>>>> jbonofre@apache.org
>>>>> http://blog.nanthrax.net
>>>>> Talend - http://www.talend.com
>>>>>
>>>>
>>>>
>>>
>>
>>
>> --
>>
>> Apache Member
>> Apache Karaf <http://karaf.apache.org/> Committer & PMC
>> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer
>> & Project Lead
>> blog <http://notizblog.nierbeck.de/>
>> Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
>>
>> Software Architect / Project Manager / Scrum Master
>>
>>
>

Re: Datasource not found

Posted by Tom Barber <to...@meteorite.bi>.
So I have:

https://github.com/OSBI/meteorite-core/blob/master/karaf/pom.xml#L176

in my custom bundle, and then when you start:

feature:install meteorite-core-features

and all my bundles go to active.

In my itests:

https://github.com/OSBI/meteorite-core/blob/master/meteorite-core-itests/src/test/java/bi/meteorite/util/ITestBootstrap.java#L112

install all my bundles then:

https://github.com/OSBI/meteorite-core/blob/master/meteorite-core-itests/src/test/java/bi/meteorite/core/security/TestSecurity.java#L72

As far as I can see I'm literally trying to block up everything, yet still
the data sources don't get resolved, some of the time, but some times they
do.

The filter timeouts look correct, am I missing anything else I can try?

Thanks

Tom

On Mon, Dec 21, 2015 at 1:44 PM, Achim Nierbeck <bc...@googlemail.com>
wrote:

> if you want to have your datasource injected into your test, you can also
> add a timeout on that @Filter annotation.
> That might help already, especially since your datasource is managed
> service.
>
> regards, Achim
>
>
> 2015-12-21 14:29 GMT+01:00 Tom Barber <to...@meteorite.bi>:
>
>> Okay I give up, sometimes pax exam runs okay, sometimes it doesn't, and I
>> can't work out how to get it to wait for the datasource to become available.
>>
>> I've tried:
>>
>>   <reference id="emDataSource" interface="javax.sql.DataSource"
>>                filter="(osgi.jndi.service.name=jdbc/userlist)"
>> availability="mandatory"/>
>> in blueprint
>>
>> and
>>
>>   @Inject
>>   @Filter("(osgi.jdbc.driver.class=org.h2.Driver)")
>>   private DataSourceFactory dsf;
>>
>> in the test suite and neither consistently run the test suite.
>>
>>
>>
>> On Mon, Dec 21, 2015 at 12:07 PM, Tom Barber <to...@meteorite.bi>
>> wrote:
>>
>>> Hmm yeah, although running my Karaf container in pax exam, reverts back
>>> to throwing the same error, even though running it manually doesn't.....
>>>
>>> On Sun, Dec 20, 2015 at 9:42 PM, Jean-Baptiste Onofré <jb...@nanthrax.net>
>>> wrote:
>>>
>>>> OK, it's what I thought. That's why I added the pax-jdbc feature
>>>> dependency in jdbc now.
>>>>
>>>> Regards
>>>> JB
>>>>
>>>> On 12/20/2015 09:29 PM, Tom Barber wrote:
>>>>
>>>>> Looks like I was missing pax-jdbc, although I did have 3 other pax jdbc
>>>>> related features..... *facepalm*
>>>>>
>>>>> On Sun, Dec 20, 2015 at 5:37 PM, Jean-Baptiste Onofré <jb@nanthrax.net
>>>>> <ma...@nanthrax.net>> wrote:
>>>>>
>>>>>     Can you check if pax-jdbc and pax-jdbc-config feature are installed
>>>>>     (boot features in your case I guess) ?
>>>>>
>>>>>     Regards
>>>>>     JB
>>>>>
>>>>>     On 12/20/2015 06:00 PM, Tom Barber wrote:
>>>>>
>>>>>         Okay so I tried something.
>>>>>
>>>>>         If I unzip my distro and start it up and run jdbc:ds-list the
>>>>> data
>>>>>         source is listed. If I then install my persistence bundle it
>>>>>         finds it.
>>>>>
>>>>>         If I unzip my distro and start up my persistence bundle, it
>>>>> doesn't
>>>>>         detect the datasource.
>>>>>
>>>>>         Am I missing some bootstrap?
>>>>>
>>>>>         Tom
>>>>>
>>>>>
>>>>>         On Sun, Dec 20, 2015 at 3:52 PM, Jean-Baptiste Onofré
>>>>>         <jb@nanthrax.net <ma...@nanthrax.net>
>>>>>         <mailto:jb@nanthrax.net <ma...@nanthrax.net>>> wrote:
>>>>>
>>>>>              Hi Tomn
>>>>>
>>>>>              what did you define in the cfg file ?
>>>>>              Anything special in the log ?
>>>>>
>>>>>              I guess you use Karaf 4.0.2. Did you install the pax-jdbc
>>>>>         feature:
>>>>>
>>>>>              feature:install pax-jdbc
>>>>>
>>>>>              ?
>>>>>
>>>>>              I fixed that in next Karaf version: now the jdbc feature
>>>>>         installs
>>>>>              pax-jdbc (it wasn't the case before).
>>>>>
>>>>>              Regards
>>>>>              JB
>>>>>
>>>>>              On 12/20/2015 11:21 AM, Tom Barber wrote:
>>>>>
>>>>>                  Hello folks
>>>>>
>>>>>                  i have a datasource define in
>>>>>         etc/org.ops4j.datasource-users.cfg
>>>>>
>>>>>                  When I install my feature I have a persistence bundle
>>>>> that
>>>>>                  starts but I get:
>>>>>
>>>>>                  apache.aries.jpa.container - 1.0.2 | The DataSource
>>>>>
>>>>>         osgi:service/javax.sql.DataSource/(osgi.jndi.service.name
>>>>>         <http://osgi.jndi.service.name>
>>>>>                  <http://osgi.jndi.service.name>
>>>>>                  <http://osgi.jndi.service.name>=userlist) required by
>>>>>         bundle
>>>>>                  bi.meteorite.persistence/1.0.0.SNAPSHOT could not be
>>>>> found.
>>>>>
>>>>>                  And my bundle hangs in grace period.
>>>>>
>>>>>                  If I then stop and start karaf all my bundles start.
>>>>>
>>>>>                  So how do I get it to find the datasource before
>>>>> trying
>>>>>         to start my
>>>>>                  bundle with blueprint?
>>>>>
>>>>>                  Thanks
>>>>>
>>>>>                  Tom
>>>>>
>>>>>
>>>>>              --
>>>>>              Jean-Baptiste Onofré
>>>>>         jbonofre@apache.org <ma...@apache.org>
>>>>>         <mailto:jbonofre@apache.org <ma...@apache.org>>
>>>>>         http://blog.nanthrax.net
>>>>>              Talend - http://www.talend.com
>>>>>
>>>>>
>>>>>
>>>>>     --
>>>>>     Jean-Baptiste Onofré
>>>>>     jbonofre@apache.org <ma...@apache.org>
>>>>>     http://blog.nanthrax.net
>>>>>     Talend - http://www.talend.com
>>>>>
>>>>>
>>>>>
>>>> --
>>>> Jean-Baptiste Onofré
>>>> jbonofre@apache.org
>>>> http://blog.nanthrax.net
>>>> Talend - http://www.talend.com
>>>>
>>>
>>>
>>
>
>
> --
>
> Apache Member
> Apache Karaf <http://karaf.apache.org/> Committer & PMC
> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
> Project Lead
> blog <http://notizblog.nierbeck.de/>
> Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
>
> Software Architect / Project Manager / Scrum Master
>
>

Re: Datasource not found

Posted by Achim Nierbeck <bc...@googlemail.com>.
if you want to have your datasource injected into your test, you can also
add a timeout on that @Filter annotation.
That might help already, especially since your datasource is managed
service.

regards, Achim


2015-12-21 14:29 GMT+01:00 Tom Barber <to...@meteorite.bi>:

> Okay I give up, sometimes pax exam runs okay, sometimes it doesn't, and I
> can't work out how to get it to wait for the datasource to become available.
>
> I've tried:
>
>   <reference id="emDataSource" interface="javax.sql.DataSource"
>                filter="(osgi.jndi.service.name=jdbc/userlist)"
> availability="mandatory"/>
> in blueprint
>
> and
>
>   @Inject
>   @Filter("(osgi.jdbc.driver.class=org.h2.Driver)")
>   private DataSourceFactory dsf;
>
> in the test suite and neither consistently run the test suite.
>
>
>
> On Mon, Dec 21, 2015 at 12:07 PM, Tom Barber <to...@meteorite.bi>
> wrote:
>
>> Hmm yeah, although running my Karaf container in pax exam, reverts back
>> to throwing the same error, even though running it manually doesn't.....
>>
>> On Sun, Dec 20, 2015 at 9:42 PM, Jean-Baptiste Onofré <jb...@nanthrax.net>
>> wrote:
>>
>>> OK, it's what I thought. That's why I added the pax-jdbc feature
>>> dependency in jdbc now.
>>>
>>> Regards
>>> JB
>>>
>>> On 12/20/2015 09:29 PM, Tom Barber wrote:
>>>
>>>> Looks like I was missing pax-jdbc, although I did have 3 other pax jdbc
>>>> related features..... *facepalm*
>>>>
>>>> On Sun, Dec 20, 2015 at 5:37 PM, Jean-Baptiste Onofré <jb@nanthrax.net
>>>> <ma...@nanthrax.net>> wrote:
>>>>
>>>>     Can you check if pax-jdbc and pax-jdbc-config feature are installed
>>>>     (boot features in your case I guess) ?
>>>>
>>>>     Regards
>>>>     JB
>>>>
>>>>     On 12/20/2015 06:00 PM, Tom Barber wrote:
>>>>
>>>>         Okay so I tried something.
>>>>
>>>>         If I unzip my distro and start it up and run jdbc:ds-list the
>>>> data
>>>>         source is listed. If I then install my persistence bundle it
>>>>         finds it.
>>>>
>>>>         If I unzip my distro and start up my persistence bundle, it
>>>> doesn't
>>>>         detect the datasource.
>>>>
>>>>         Am I missing some bootstrap?
>>>>
>>>>         Tom
>>>>
>>>>
>>>>         On Sun, Dec 20, 2015 at 3:52 PM, Jean-Baptiste Onofré
>>>>         <jb@nanthrax.net <ma...@nanthrax.net>
>>>>         <mailto:jb@nanthrax.net <ma...@nanthrax.net>>> wrote:
>>>>
>>>>              Hi Tomn
>>>>
>>>>              what did you define in the cfg file ?
>>>>              Anything special in the log ?
>>>>
>>>>              I guess you use Karaf 4.0.2. Did you install the pax-jdbc
>>>>         feature:
>>>>
>>>>              feature:install pax-jdbc
>>>>
>>>>              ?
>>>>
>>>>              I fixed that in next Karaf version: now the jdbc feature
>>>>         installs
>>>>              pax-jdbc (it wasn't the case before).
>>>>
>>>>              Regards
>>>>              JB
>>>>
>>>>              On 12/20/2015 11:21 AM, Tom Barber wrote:
>>>>
>>>>                  Hello folks
>>>>
>>>>                  i have a datasource define in
>>>>         etc/org.ops4j.datasource-users.cfg
>>>>
>>>>                  When I install my feature I have a persistence bundle
>>>> that
>>>>                  starts but I get:
>>>>
>>>>                  apache.aries.jpa.container - 1.0.2 | The DataSource
>>>>
>>>>         osgi:service/javax.sql.DataSource/(osgi.jndi.service.name
>>>>         <http://osgi.jndi.service.name>
>>>>                  <http://osgi.jndi.service.name>
>>>>                  <http://osgi.jndi.service.name>=userlist) required by
>>>>         bundle
>>>>                  bi.meteorite.persistence/1.0.0.SNAPSHOT could not be
>>>> found.
>>>>
>>>>                  And my bundle hangs in grace period.
>>>>
>>>>                  If I then stop and start karaf all my bundles start.
>>>>
>>>>                  So how do I get it to find the datasource before trying
>>>>         to start my
>>>>                  bundle with blueprint?
>>>>
>>>>                  Thanks
>>>>
>>>>                  Tom
>>>>
>>>>
>>>>              --
>>>>              Jean-Baptiste Onofré
>>>>         jbonofre@apache.org <ma...@apache.org>
>>>>         <mailto:jbonofre@apache.org <ma...@apache.org>>
>>>>         http://blog.nanthrax.net
>>>>              Talend - http://www.talend.com
>>>>
>>>>
>>>>
>>>>     --
>>>>     Jean-Baptiste Onofré
>>>>     jbonofre@apache.org <ma...@apache.org>
>>>>     http://blog.nanthrax.net
>>>>     Talend - http://www.talend.com
>>>>
>>>>
>>>>
>>> --
>>> Jean-Baptiste Onofré
>>> jbonofre@apache.org
>>> http://blog.nanthrax.net
>>> Talend - http://www.talend.com
>>>
>>
>>
>


-- 

Apache Member
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
blog <http://notizblog.nierbeck.de/>
Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>

Software Architect / Project Manager / Scrum Master

Re: Datasource not found

Posted by Tom Barber <to...@meteorite.bi>.
Okay I give up, sometimes pax exam runs okay, sometimes it doesn't, and I
can't work out how to get it to wait for the datasource to become available.

I've tried:

  <reference id="emDataSource" interface="javax.sql.DataSource"
               filter="(osgi.jndi.service.name=jdbc/userlist)"
availability="mandatory"/>
in blueprint

and

  @Inject
  @Filter("(osgi.jdbc.driver.class=org.h2.Driver)")
  private DataSourceFactory dsf;

in the test suite and neither consistently run the test suite.



On Mon, Dec 21, 2015 at 12:07 PM, Tom Barber <to...@meteorite.bi>
wrote:

> Hmm yeah, although running my Karaf container in pax exam, reverts back to
> throwing the same error, even though running it manually doesn't.....
>
> On Sun, Dec 20, 2015 at 9:42 PM, Jean-Baptiste Onofré <jb...@nanthrax.net>
> wrote:
>
>> OK, it's what I thought. That's why I added the pax-jdbc feature
>> dependency in jdbc now.
>>
>> Regards
>> JB
>>
>> On 12/20/2015 09:29 PM, Tom Barber wrote:
>>
>>> Looks like I was missing pax-jdbc, although I did have 3 other pax jdbc
>>> related features..... *facepalm*
>>>
>>> On Sun, Dec 20, 2015 at 5:37 PM, Jean-Baptiste Onofré <jb@nanthrax.net
>>> <ma...@nanthrax.net>> wrote:
>>>
>>>     Can you check if pax-jdbc and pax-jdbc-config feature are installed
>>>     (boot features in your case I guess) ?
>>>
>>>     Regards
>>>     JB
>>>
>>>     On 12/20/2015 06:00 PM, Tom Barber wrote:
>>>
>>>         Okay so I tried something.
>>>
>>>         If I unzip my distro and start it up and run jdbc:ds-list the
>>> data
>>>         source is listed. If I then install my persistence bundle it
>>>         finds it.
>>>
>>>         If I unzip my distro and start up my persistence bundle, it
>>> doesn't
>>>         detect the datasource.
>>>
>>>         Am I missing some bootstrap?
>>>
>>>         Tom
>>>
>>>
>>>         On Sun, Dec 20, 2015 at 3:52 PM, Jean-Baptiste Onofré
>>>         <jb@nanthrax.net <ma...@nanthrax.net>
>>>         <mailto:jb@nanthrax.net <ma...@nanthrax.net>>> wrote:
>>>
>>>              Hi Tomn
>>>
>>>              what did you define in the cfg file ?
>>>              Anything special in the log ?
>>>
>>>              I guess you use Karaf 4.0.2. Did you install the pax-jdbc
>>>         feature:
>>>
>>>              feature:install pax-jdbc
>>>
>>>              ?
>>>
>>>              I fixed that in next Karaf version: now the jdbc feature
>>>         installs
>>>              pax-jdbc (it wasn't the case before).
>>>
>>>              Regards
>>>              JB
>>>
>>>              On 12/20/2015 11:21 AM, Tom Barber wrote:
>>>
>>>                  Hello folks
>>>
>>>                  i have a datasource define in
>>>         etc/org.ops4j.datasource-users.cfg
>>>
>>>                  When I install my feature I have a persistence bundle
>>> that
>>>                  starts but I get:
>>>
>>>                  apache.aries.jpa.container - 1.0.2 | The DataSource
>>>
>>>         osgi:service/javax.sql.DataSource/(osgi.jndi.service.name
>>>         <http://osgi.jndi.service.name>
>>>                  <http://osgi.jndi.service.name>
>>>                  <http://osgi.jndi.service.name>=userlist) required by
>>>         bundle
>>>                  bi.meteorite.persistence/1.0.0.SNAPSHOT could not be
>>> found.
>>>
>>>                  And my bundle hangs in grace period.
>>>
>>>                  If I then stop and start karaf all my bundles start.
>>>
>>>                  So how do I get it to find the datasource before trying
>>>         to start my
>>>                  bundle with blueprint?
>>>
>>>                  Thanks
>>>
>>>                  Tom
>>>
>>>
>>>              --
>>>              Jean-Baptiste Onofré
>>>         jbonofre@apache.org <ma...@apache.org>
>>>         <mailto:jbonofre@apache.org <ma...@apache.org>>
>>>         http://blog.nanthrax.net
>>>              Talend - http://www.talend.com
>>>
>>>
>>>
>>>     --
>>>     Jean-Baptiste Onofré
>>>     jbonofre@apache.org <ma...@apache.org>
>>>     http://blog.nanthrax.net
>>>     Talend - http://www.talend.com
>>>
>>>
>>>
>> --
>> Jean-Baptiste Onofré
>> jbonofre@apache.org
>> http://blog.nanthrax.net
>> Talend - http://www.talend.com
>>
>
>

Re: Datasource not found

Posted by Tom Barber <to...@meteorite.bi>.
Hmm yeah, although running my Karaf container in pax exam, reverts back to
throwing the same error, even though running it manually doesn't.....

On Sun, Dec 20, 2015 at 9:42 PM, Jean-Baptiste Onofré <jb...@nanthrax.net>
wrote:

> OK, it's what I thought. That's why I added the pax-jdbc feature
> dependency in jdbc now.
>
> Regards
> JB
>
> On 12/20/2015 09:29 PM, Tom Barber wrote:
>
>> Looks like I was missing pax-jdbc, although I did have 3 other pax jdbc
>> related features..... *facepalm*
>>
>> On Sun, Dec 20, 2015 at 5:37 PM, Jean-Baptiste Onofré <jb@nanthrax.net
>> <ma...@nanthrax.net>> wrote:
>>
>>     Can you check if pax-jdbc and pax-jdbc-config feature are installed
>>     (boot features in your case I guess) ?
>>
>>     Regards
>>     JB
>>
>>     On 12/20/2015 06:00 PM, Tom Barber wrote:
>>
>>         Okay so I tried something.
>>
>>         If I unzip my distro and start it up and run jdbc:ds-list the data
>>         source is listed. If I then install my persistence bundle it
>>         finds it.
>>
>>         If I unzip my distro and start up my persistence bundle, it
>> doesn't
>>         detect the datasource.
>>
>>         Am I missing some bootstrap?
>>
>>         Tom
>>
>>
>>         On Sun, Dec 20, 2015 at 3:52 PM, Jean-Baptiste Onofré
>>         <jb@nanthrax.net <ma...@nanthrax.net>
>>         <mailto:jb@nanthrax.net <ma...@nanthrax.net>>> wrote:
>>
>>              Hi Tomn
>>
>>              what did you define in the cfg file ?
>>              Anything special in the log ?
>>
>>              I guess you use Karaf 4.0.2. Did you install the pax-jdbc
>>         feature:
>>
>>              feature:install pax-jdbc
>>
>>              ?
>>
>>              I fixed that in next Karaf version: now the jdbc feature
>>         installs
>>              pax-jdbc (it wasn't the case before).
>>
>>              Regards
>>              JB
>>
>>              On 12/20/2015 11:21 AM, Tom Barber wrote:
>>
>>                  Hello folks
>>
>>                  i have a datasource define in
>>         etc/org.ops4j.datasource-users.cfg
>>
>>                  When I install my feature I have a persistence bundle
>> that
>>                  starts but I get:
>>
>>                  apache.aries.jpa.container - 1.0.2 | The DataSource
>>
>>         osgi:service/javax.sql.DataSource/(osgi.jndi.service.name
>>         <http://osgi.jndi.service.name>
>>                  <http://osgi.jndi.service.name>
>>                  <http://osgi.jndi.service.name>=userlist) required by
>>         bundle
>>                  bi.meteorite.persistence/1.0.0.SNAPSHOT could not be
>> found.
>>
>>                  And my bundle hangs in grace period.
>>
>>                  If I then stop and start karaf all my bundles start.
>>
>>                  So how do I get it to find the datasource before trying
>>         to start my
>>                  bundle with blueprint?
>>
>>                  Thanks
>>
>>                  Tom
>>
>>
>>              --
>>              Jean-Baptiste Onofré
>>         jbonofre@apache.org <ma...@apache.org>
>>         <mailto:jbonofre@apache.org <ma...@apache.org>>
>>         http://blog.nanthrax.net
>>              Talend - http://www.talend.com
>>
>>
>>
>>     --
>>     Jean-Baptiste Onofré
>>     jbonofre@apache.org <ma...@apache.org>
>>     http://blog.nanthrax.net
>>     Talend - http://www.talend.com
>>
>>
>>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>

Re: Datasource not found

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
OK, it's what I thought. That's why I added the pax-jdbc feature 
dependency in jdbc now.

Regards
JB

On 12/20/2015 09:29 PM, Tom Barber wrote:
> Looks like I was missing pax-jdbc, although I did have 3 other pax jdbc
> related features..... *facepalm*
>
> On Sun, Dec 20, 2015 at 5:37 PM, Jean-Baptiste Onofré <jb@nanthrax.net
> <ma...@nanthrax.net>> wrote:
>
>     Can you check if pax-jdbc and pax-jdbc-config feature are installed
>     (boot features in your case I guess) ?
>
>     Regards
>     JB
>
>     On 12/20/2015 06:00 PM, Tom Barber wrote:
>
>         Okay so I tried something.
>
>         If I unzip my distro and start it up and run jdbc:ds-list the data
>         source is listed. If I then install my persistence bundle it
>         finds it.
>
>         If I unzip my distro and start up my persistence bundle, it doesn't
>         detect the datasource.
>
>         Am I missing some bootstrap?
>
>         Tom
>
>
>         On Sun, Dec 20, 2015 at 3:52 PM, Jean-Baptiste Onofré
>         <jb@nanthrax.net <ma...@nanthrax.net>
>         <mailto:jb@nanthrax.net <ma...@nanthrax.net>>> wrote:
>
>              Hi Tomn
>
>              what did you define in the cfg file ?
>              Anything special in the log ?
>
>              I guess you use Karaf 4.0.2. Did you install the pax-jdbc
>         feature:
>
>              feature:install pax-jdbc
>
>              ?
>
>              I fixed that in next Karaf version: now the jdbc feature
>         installs
>              pax-jdbc (it wasn't the case before).
>
>              Regards
>              JB
>
>              On 12/20/2015 11:21 AM, Tom Barber wrote:
>
>                  Hello folks
>
>                  i have a datasource define in
>         etc/org.ops4j.datasource-users.cfg
>
>                  When I install my feature I have a persistence bundle that
>                  starts but I get:
>
>                  apache.aries.jpa.container - 1.0.2 | The DataSource
>
>         osgi:service/javax.sql.DataSource/(osgi.jndi.service.name
>         <http://osgi.jndi.service.name>
>                  <http://osgi.jndi.service.name>
>                  <http://osgi.jndi.service.name>=userlist) required by
>         bundle
>                  bi.meteorite.persistence/1.0.0.SNAPSHOT could not be found.
>
>                  And my bundle hangs in grace period.
>
>                  If I then stop and start karaf all my bundles start.
>
>                  So how do I get it to find the datasource before trying
>         to start my
>                  bundle with blueprint?
>
>                  Thanks
>
>                  Tom
>
>
>              --
>              Jean-Baptiste Onofré
>         jbonofre@apache.org <ma...@apache.org>
>         <mailto:jbonofre@apache.org <ma...@apache.org>>
>         http://blog.nanthrax.net
>              Talend - http://www.talend.com
>
>
>
>     --
>     Jean-Baptiste Onofré
>     jbonofre@apache.org <ma...@apache.org>
>     http://blog.nanthrax.net
>     Talend - http://www.talend.com
>
>

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: Datasource not found

Posted by Tom Barber <to...@meteorite.bi>.
Looks like I was missing pax-jdbc, although I did have 3 other pax jdbc
related features..... *facepalm*

On Sun, Dec 20, 2015 at 5:37 PM, Jean-Baptiste Onofré <jb...@nanthrax.net>
wrote:

> Can you check if pax-jdbc and pax-jdbc-config feature are installed (boot
> features in your case I guess) ?
>
> Regards
> JB
>
> On 12/20/2015 06:00 PM, Tom Barber wrote:
>
>> Okay so I tried something.
>>
>> If I unzip my distro and start it up and run jdbc:ds-list the data
>> source is listed. If I then install my persistence bundle it finds it.
>>
>> If I unzip my distro and start up my persistence bundle, it doesn't
>> detect the datasource.
>>
>> Am I missing some bootstrap?
>>
>> Tom
>>
>>
>> On Sun, Dec 20, 2015 at 3:52 PM, Jean-Baptiste Onofré <jb@nanthrax.net
>> <ma...@nanthrax.net>> wrote:
>>
>>     Hi Tomn
>>
>>     what did you define in the cfg file ?
>>     Anything special in the log ?
>>
>>     I guess you use Karaf 4.0.2. Did you install the pax-jdbc feature:
>>
>>     feature:install pax-jdbc
>>
>>     ?
>>
>>     I fixed that in next Karaf version: now the jdbc feature installs
>>     pax-jdbc (it wasn't the case before).
>>
>>     Regards
>>     JB
>>
>>     On 12/20/2015 11:21 AM, Tom Barber wrote:
>>
>>         Hello folks
>>
>>         i have a datasource define in etc/org.ops4j.datasource-users.cfg
>>
>>         When I install my feature I have a persistence bundle that
>>         starts but I get:
>>
>>         apache.aries.jpa.container - 1.0.2 | The DataSource
>>         osgi:service/javax.sql.DataSource/(osgi.jndi.service.name
>>         <http://osgi.jndi.service.name>
>>         <http://osgi.jndi.service.name>=userlist) required by bundle
>>         bi.meteorite.persistence/1.0.0.SNAPSHOT could not be found.
>>
>>         And my bundle hangs in grace period.
>>
>>         If I then stop and start karaf all my bundles start.
>>
>>         So how do I get it to find the datasource before trying to start
>> my
>>         bundle with blueprint?
>>
>>         Thanks
>>
>>         Tom
>>
>>
>>     --
>>     Jean-Baptiste Onofré
>>     jbonofre@apache.org <ma...@apache.org>
>>     http://blog.nanthrax.net
>>     Talend - http://www.talend.com
>>
>>
>>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>

Re: Datasource not found

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Can you check if pax-jdbc and pax-jdbc-config feature are installed 
(boot features in your case I guess) ?

Regards
JB

On 12/20/2015 06:00 PM, Tom Barber wrote:
> Okay so I tried something.
>
> If I unzip my distro and start it up and run jdbc:ds-list the data
> source is listed. If I then install my persistence bundle it finds it.
>
> If I unzip my distro and start up my persistence bundle, it doesn't
> detect the datasource.
>
> Am I missing some bootstrap?
>
> Tom
>
>
> On Sun, Dec 20, 2015 at 3:52 PM, Jean-Baptiste Onofré <jb@nanthrax.net
> <ma...@nanthrax.net>> wrote:
>
>     Hi Tomn
>
>     what did you define in the cfg file ?
>     Anything special in the log ?
>
>     I guess you use Karaf 4.0.2. Did you install the pax-jdbc feature:
>
>     feature:install pax-jdbc
>
>     ?
>
>     I fixed that in next Karaf version: now the jdbc feature installs
>     pax-jdbc (it wasn't the case before).
>
>     Regards
>     JB
>
>     On 12/20/2015 11:21 AM, Tom Barber wrote:
>
>         Hello folks
>
>         i have a datasource define in etc/org.ops4j.datasource-users.cfg
>
>         When I install my feature I have a persistence bundle that
>         starts but I get:
>
>         apache.aries.jpa.container - 1.0.2 | The DataSource
>         osgi:service/javax.sql.DataSource/(osgi.jndi.service.name
>         <http://osgi.jndi.service.name>
>         <http://osgi.jndi.service.name>=userlist) required by bundle
>         bi.meteorite.persistence/1.0.0.SNAPSHOT could not be found.
>
>         And my bundle hangs in grace period.
>
>         If I then stop and start karaf all my bundles start.
>
>         So how do I get it to find the datasource before trying to start my
>         bundle with blueprint?
>
>         Thanks
>
>         Tom
>
>
>     --
>     Jean-Baptiste Onofré
>     jbonofre@apache.org <ma...@apache.org>
>     http://blog.nanthrax.net
>     Talend - http://www.talend.com
>
>

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: Datasource not found

Posted by Tom Barber <to...@meteorite.bi>.
Okay so I tried something.

If I unzip my distro and start it up and run jdbc:ds-list the data source
is listed. If I then install my persistence bundle it finds it.

If I unzip my distro and start up my persistence bundle, it doesn't detect
the datasource.

Am I missing some bootstrap?

Tom


On Sun, Dec 20, 2015 at 3:52 PM, Jean-Baptiste Onofré <jb...@nanthrax.net>
wrote:

> Hi Tomn
>
> what did you define in the cfg file ?
> Anything special in the log ?
>
> I guess you use Karaf 4.0.2. Did you install the pax-jdbc feature:
>
> feature:install pax-jdbc
>
> ?
>
> I fixed that in next Karaf version: now the jdbc feature installs pax-jdbc
> (it wasn't the case before).
>
> Regards
> JB
>
> On 12/20/2015 11:21 AM, Tom Barber wrote:
>
>> Hello folks
>>
>> i have a datasource define in etc/org.ops4j.datasource-users.cfg
>>
>> When I install my feature I have a persistence bundle that starts but I
>> get:
>>
>> apache.aries.jpa.container - 1.0.2 | The DataSource
>> osgi:service/javax.sql.DataSource/(osgi.jndi.service.name
>> <http://osgi.jndi.service.name>=userlist) required by bundle
>> bi.meteorite.persistence/1.0.0.SNAPSHOT could not be found.
>>
>> And my bundle hangs in grace period.
>>
>> If I then stop and start karaf all my bundles start.
>>
>> So how do I get it to find the datasource before trying to start my
>> bundle with blueprint?
>>
>> Thanks
>>
>> Tom
>>
>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>

Re: Datasource not found

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Tomn

what did you define in the cfg file ?
Anything special in the log ?

I guess you use Karaf 4.0.2. Did you install the pax-jdbc feature:

feature:install pax-jdbc

?

I fixed that in next Karaf version: now the jdbc feature installs 
pax-jdbc (it wasn't the case before).

Regards
JB

On 12/20/2015 11:21 AM, Tom Barber wrote:
> Hello folks
>
> i have a datasource define in etc/org.ops4j.datasource-users.cfg
>
> When I install my feature I have a persistence bundle that starts but I get:
>
> apache.aries.jpa.container - 1.0.2 | The DataSource
> osgi:service/javax.sql.DataSource/(osgi.jndi.service.name
> <http://osgi.jndi.service.name>=userlist) required by bundle
> bi.meteorite.persistence/1.0.0.SNAPSHOT could not be found.
>
> And my bundle hangs in grace period.
>
> If I then stop and start karaf all my bundles start.
>
> So how do I get it to find the datasource before trying to start my
> bundle with blueprint?
>
> Thanks
>
> Tom

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: Datasource not found

Posted by Tom Barber <to...@meteorite.bi>.
4.0.2 and whatever the latest pax jdbc version is.
On 20 Dec 2015 12:20 pm, "Christian Schneider" <ch...@die-schneider.net>
wrote:

> What versions of karaf and pax-jdbc do you use?
>
> 2015-12-20 11:21 GMT+01:00 Tom Barber <to...@meteorite.bi>:
>
>> Hello folks
>>
>> i have a datasource define in etc/org.ops4j.datasource-users.cfg
>>
>> When I install my feature I have a persistence bundle that starts but I
>> get:
>>
>> apache.aries.jpa.container - 1.0.2 | The DataSource
>> osgi:service/javax.sql.DataSource/(osgi.jndi.service.name=userlist)
>> required by bundle bi.meteorite.persistence/1.0.0.SNAPSHOT could not be
>> found.
>>
>> And my bundle hangs in grace period.
>>
>> If I then stop and start karaf all my bundles start.
>>
>> So how do I get it to find the datasource before trying to start my
>> bundle with blueprint?
>>
>> Thanks
>>
>> Tom
>>
>
>
>
> --
> --
> Christian Schneider
> http://www.liquid-reality.de
> <https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e46&URL=http%3a%2f%2fwww.liquid-reality.de>
>
> Open Source Architect
> http://www.talend.com
> <https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e46&URL=http%3a%2f%2fwww.talend.com>
>

Re: Datasource not found

Posted by Christian Schneider <ch...@die-schneider.net>.
What versions of karaf and pax-jdbc do you use?

2015-12-20 11:21 GMT+01:00 Tom Barber <to...@meteorite.bi>:

> Hello folks
>
> i have a datasource define in etc/org.ops4j.datasource-users.cfg
>
> When I install my feature I have a persistence bundle that starts but I
> get:
>
> apache.aries.jpa.container - 1.0.2 | The DataSource
> osgi:service/javax.sql.DataSource/(osgi.jndi.service.name=userlist)
> required by bundle bi.meteorite.persistence/1.0.0.SNAPSHOT could not be
> found.
>
> And my bundle hangs in grace period.
>
> If I then stop and start karaf all my bundles start.
>
> So how do I get it to find the datasource before trying to start my bundle
> with blueprint?
>
> Thanks
>
> Tom
>



-- 
-- 
Christian Schneider
http://www.liquid-reality.de
<https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e46&URL=http%3a%2f%2fwww.liquid-reality.de>

Open Source Architect
http://www.talend.com
<https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e46&URL=http%3a%2f%2fwww.talend.com>