You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Martin Lichtin <li...@yahoo.com> on 2013/06/06 09:22:43 UTC

Where to get org.osgi.service.jdbc from?

Hi guys


I am having an issue with the "org.osgi.service.jdbc" package dependency (H2 started requiring it).

According to http://mail-archives.apache.org/mod_mbox/karaf-user/201210.mbox/%3C5085540B.3090108@nanthrax.net%3E
it is bundle org.osgi.compendium/4.3.1 (for Karaf 2.3.1) that offers this package, but this can
clash with Blueprint when deployed, as you can read here: 
http://mail-archives.apache.org/mod_mbox/aries-user/201306.mbox/%3C01B2DE28-FAEE-4A29-B418-B72E6BE2DDD3%40adobe.com%3E

Felix advises to not deploy the compendium bundle.

Is there another bundle offering "org.osgi.service.jdbc" without also offering Blueprint APIs?
I searched around but can't find an alternative.

Thanks for any help.
Martin

RE: Where to get org.osgi.service.jdbc from?

Posted by whataboutbob <bo...@intel.com>.
Tom,

One other quick question, is it possible to load that dependency during
Karaf startup time? I am looking into using Blueprint to add a JNDI
datasource and adding H2 bundle to Karaf requires org.osgi.service.jdbc. I
am following the steps in this article, it's step 1. 
http://www.liquid-reality.de/display/liquid/2012/01/13/Apache+Karaf+Tutorial+Part+6+-+Database+Access

Thanks for all your help.
Bob



--
View this message in context: http://karaf.922171.n3.nabble.com/Where-to-get-org-osgi-service-jdbc-from-tp4028973p4030808.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Where to get org.osgi.service.jdbc from?

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

Karaf 3.0.0 already use and ship org.osgi.core and org.osgi.compendium.

So yes, you can use 5.0.0 for core, compendium and enterprise.

Regards
JB

On 12/27/2013 07:32 PM, whataboutbob wrote:
> Thanks for clarifying, can I mix and match package versions? For example, if
> I use this
> <dependency>
> 	<groupId>org.osgi</groupId>
> 	<artifactId>org.osgi.enterprise</artifactId>
> 	<version>5.0.0</version>
> </dependency>
>
> Should I also use 5.0.0 for core and compendium? Currently, I am using 4.2.0
> because that's what's specified for the core and compendium dependencies.
>
> Much appreciated,
> Bob
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/Where-to-get-org-osgi-service-jdbc-from-tp4028973p4030830.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>

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

Re: Where to get org.osgi.service.jdbc from?

Posted by whataboutbob <bo...@intel.com>.
Thanks for clarifying, can I mix and match package versions? For example, if
I use this
<dependency>
	<groupId>org.osgi</groupId>
	<artifactId>org.osgi.enterprise</artifactId>
	<version>5.0.0</version>
</dependency>

Should I also use 5.0.0 for core and compendium? Currently, I am using 4.2.0
because that's what's specified for the core and compendium dependencies.

Much appreciated,
Bob



--
View this message in context: http://karaf.922171.n3.nabble.com/Where-to-get-org-osgi-service-jdbc-from-tp4028973p4030830.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Where to get org.osgi.service.jdbc from?

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
You are right, as I said in my post:

In Karaf 2.2.x, which use OSGi r4.2, this package was provided in
org.osgi.enterprise.

In Karaf 2.3.x, which use OSGi r4.3, this package was provided in
org.osgi.compendium.

In next release using OSGi r5.0.0, it's back in org.osgi.enterprise.

So, for Karaf 3.0.0, you have to use org.osgi.enterprise 5.0.0.

Regards
JB

On 12/26/2013 11:07 PM, whataboutbob wrote:
> Hi JB,
>
> That's odd because it works after I added Enterprise package and also
> according to this post, it's back in org.osgi.enterprise for OSGi 5.0.0
> http://mail-archives.apache.org/mod_mbox/karaf-user/201210.mbox/%3C5085540B.3090108@nanthrax.net%3E
>
> I am a bit confused.
>
> Thanks,
> Bob
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/Where-to-get-org-osgi-service-jdbc-from-tp4028973p4030812.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>

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

Re: Where to get org.osgi.service.jdbc from?

Posted by whataboutbob <bo...@intel.com>.
Hi JB,

That's odd because it works after I added Enterprise package and also
according to this post, it's back in org.osgi.enterprise for OSGi 5.0.0 
http://mail-archives.apache.org/mod_mbox/karaf-user/201210.mbox/%3C5085540B.3090108@nanthrax.net%3E

I am a bit confused.

Thanks,
Bob



--
View this message in context: http://karaf.922171.n3.nabble.com/Where-to-get-org-osgi-service-jdbc-from-tp4028973p4030812.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Where to get org.osgi.service.jdbc from?

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi,
Karaf 3.0.0 is OSGi 5.0.0.

As I said before, it was in org.osgi.enterprise in 4.3.0/4.2.0 and back 
in org.osgi.compendium in 5.0.0.

Regards
JB

On 12/26/2013 08:53 PM, whataboutbob wrote:
> Hi Tom,
>
> Thanks for your reply, in fact I got it working before seeing your email and
> I am on 3.0.0-RC1 and I added this dependency
>
>   <dependency>
>              <groupId>org.osgi</groupId>
>              <artifactId>org.osgi.enterprise</artifactId>
>              <version>4.2.0</version>
>          </dependency>
>
> Any idea if that is the right version for 3.0.0?
>
> Best,
> Bob
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/Where-to-get-org-osgi-service-jdbc-from-tp4028973p4030807.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>

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

RE: Where to get org.osgi.service.jdbc from?

Posted by whataboutbob <bo...@intel.com>.
Hi Tom,

Thanks for your reply, in fact I got it working before seeing your email and
I am on 3.0.0-RC1 and I added this dependency

 <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>org.osgi.enterprise</artifactId>
            <version>4.2.0</version>
        </dependency>

Any idea if that is the right version for 3.0.0?

Best,
Bob



--
View this message in context: http://karaf.922171.n3.nabble.com/Where-to-get-org-osgi-service-jdbc-from-tp4028973p4030807.html
Sent from the Karaf - User mailing list archive at Nabble.com.

RE: Where to get org.osgi.service.jdbc from?

Posted by Tom Leung <to...@netage.com.hk>.
Depends on what Karaf version you are using.

If use Karaf v2.2x, install the following bundle:

<dependency>
	<groupId>org.osgi</groupId>
	<artifactId>org.osgi.compendium</artifactId>
	<version>4.2.0</version>
</dependency>
            

if use Karaf v2.3.x, install the following bundle:

<dependency>
	<groupId>org.osgi</groupId>
	<artifactId>org.osgi.compendium</artifactId>
	<version>4.3.1</version>
</dependency>
                        
or 

<dependency>
	<groupId>org.osgi</groupId>
	<artifactId>org.osgi.compendium</artifactId>
	<version>4.3.0</version>
</dependency>
            
Best Rgds,

Tom


-----Original Message-----
From: whataboutbob [mailto:bob.ngu@intel.com] 
Sent: Wednesday, December 25, 2013 6:37 AM
To: user@karaf.apache.org
Subject: Re: Where to get org.osgi.service.jdbc from?

Hi Martin,

I have the same issue with using H2, did you ever get this resolved?

Thanks,
Bob



--
View this message in context:
http://karaf.922171.n3.nabble.com/Where-to-get-org-osgi-service-jdbc-from-tp
4028973p4030791.html
Sent from the Karaf - User mailing list archive at Nabble.com.


Re: Where to get org.osgi.service.jdbc from?

Posted by whataboutbob <bo...@intel.com>.
Hi Martin,

I have the same issue with using H2, did you ever get this resolved?

Thanks,
Bob



--
View this message in context: http://karaf.922171.n3.nabble.com/Where-to-get-org-osgi-service-jdbc-from-tp4028973p4030791.html
Sent from the Karaf - User mailing list archive at Nabble.com.