You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by matthjes <ma...@gmail.com> on 2014/11/29 22:34:11 UTC

Karaf 3.0.2 and Hibernate

Hi,

I'm using Karaf 3.0.2 and I'm desperately trying to get a small example with
Hibernate working. However, Karaf always prints out that no providers are
available.

I looked into the provided services and found that Karaf 3.0.2 uses Aries
JPA 1.0.0 while Karaf 2.4.0 uses Aries JPA 1.0.1. My example works with
2.4.0 (there are some error messages about Hibernate proxy and wiring, but
the table is there). Why does Karaf 3.0.2 uses an older Aries JPA version.
Could this older version be the reason why my Hibernate example does not
work with 3.0.2?



--
View this message in context: http://karaf.922171.n3.nabble.com/Karaf-3-0-2-and-Hibernate-tp4036790.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Karaf 3.0.2 and Hibernate

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Yes. I created the Jira and I will include it for 3.0.3.

Regards
JB

On 12/01/2014 11:11 AM, matthjes wrote:
> Just out of curiosity: Though it's working now with the custom feature.xml,
> will this be available in 3.0.3?
>
>
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/Karaf-3-0-2-and-Hibernate-tp4036790p4036824.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: Karaf 3.0.2 and Hibernate

Posted by matthjes <ma...@gmail.com>.
Just out of curiosity: Though it's working now with the custom feature.xml,
will this be available in 3.0.3?





--
View this message in context: http://karaf.922171.n3.nabble.com/Karaf-3-0-2-and-Hibernate-tp4036790p4036824.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Karaf 3.0.2 and Hibernate

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Basically, it's what I proposed yeah.

I will create a Jira and do that.

Regards
JB

On 11/30/2014 11:58 PM, Christian Schneider wrote:
> Not sure how the condition would work here.
>
> How about simply having a jpa20 and a jpa21 feature including the aries
> jpa bundles and the jpa respective api. Hibernate 4.3 could then refer
> to the jpa21 feature and hibernate 4.2 to the jpa20 one.
>
> Christian
>
> Am 30.11.2014 22:36, schrieb Jean-Baptiste Onofré:
>> IMHO, it's a mistake in the hibernate 4.3 feature that should install
>> the jpa feature (by transitivity) that provide jpa 2.1 support. On the
>> other hand, jpa feature should install the corresponding jpa api version.
>>
>> So, what I propose:
>> - add a jpa-api feature for both 2.0 and 2.1
>> - remove jpa-api bundle from the jpa feature
>> - add jpa-api and jpa features dependency on the engine level (with a
>> <condition/> or let the user uses pick the target jpa version that he
>> wants
>>
>> WDYT ?
>>
>> Regards
>> JB
>

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

Re: Karaf 3.0.2 and Hibernate

Posted by Christian Schneider <ch...@die-schneider.net>.
Not sure how the condition would work here.

How about simply having a jpa20 and a jpa21 feature including the aries 
jpa bundles and the jpa respective api. Hibernate 4.3 could then refer 
to the jpa21 feature and hibernate 4.2 to the jpa20 one.

Christian

Am 30.11.2014 22:36, schrieb Jean-Baptiste Onofré:
> IMHO, it's a mistake in the hibernate 4.3 feature that should install 
> the jpa feature (by transitivity) that provide jpa 2.1 support. On the 
> other hand, jpa feature should install the corresponding jpa api version.
>
> So, what I propose:
> - add a jpa-api feature for both 2.0 and 2.1
> - remove jpa-api bundle from the jpa feature
> - add jpa-api and jpa features dependency on the engine level (with a 
> <condition/> or let the user uses pick the target jpa version that he 
> wants
>
> WDYT ?
>
> Regards
> JB

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

Open Source Architect
Talend Application Integration Division http://www.talend.com


Re: Karaf 3.0.2 and Hibernate

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
IMHO, it's a mistake in the hibernate 4.3 feature that should install 
the jpa feature (by transitivity) that provide jpa 2.1 support. On the 
other hand, jpa feature should install the corresponding jpa api version.

So, what I propose:
- add a jpa-api feature for both 2.0 and 2.1
- remove jpa-api bundle from the jpa feature
- add jpa-api and jpa features dependency on the engine level (with a 
<condition/> or let the user uses pick the target jpa version that he wants

WDYT ?

Regards
JB

On 11/30/2014 12:30 PM, Christian Schneider wrote:
> 3.0.3-SNAPHSOT should work for jpa 2.0 but I think it does not work for
> jpa 2.1.
>
> The jpa feature loads the jpa 2.0 api. Hibernate 4.3 feature loads the
> jpa 2.1 api.
> So in the end both apis are installed. I already wanted to contact you
> about it.
> We should find a solution for this before the release.
>
> Christian
>
>
> Am 30.11.2014 10:02, schrieb Jean-Baptiste Onofré:
>> Maybe you can take Karaf 3.0.3-SNAPSHOT waiting for the release ?
>>
>> Regards
>> JB
>>
>> On 11/30/2014 09:13 AM, matthjes wrote:
>>> Hi Christian,
>>>
>>> Thanks for the help! I took your feature.xml, removed the tutorial
>>> stuff and
>>> installed it. It seems to work now, but there are some errors show in
>>> the
>>> log output:
>>>
>>> 2014-11-30 09:09:45,359 | ERROR | FelixStartLevel  | aries | 77 -
>>> org.apache.aries.jpa.blueprint.aries - 1.0.4 | No
>>> org.apache.aries.jpa.container.sync.Synchronization service registered.
>>>
>>> 2014-11-30 09:09:46,730 | WARN  | FelixStartLevel  |
>>> PojoEntityTuplizer | 87
>>> - org.jboss.logging.jboss-logging - 3.1.4.GA | HHH000305: Could not
>>> create
>>> proxy factory for:com.boxheadrobot.karaftest.KarafTestEntity
>>> ...
>>> Caused by: java.lang.NoClassDefFoundError:
>>> org/hibernate/proxy/HibernateProxy
>>>
>>> Hibernate creates the table, but those messages are still annoying
>>> (and hint
>>> that there must be something wrong).
>>>
>>>
>>> cschneider wrote
>>>> You can try with a custom feature for now . See
>>>> https://github.com/cschneider/Karaf-Tutorial/blob/master/tasklist-cdi/features/src/main/resources/features.xml
>>>>
>>>>
>>>> There I configure karaf to use hibernate 4.3 and the newest aries
>>>> releases. With these it works quite well.
>>>>
>>>> For the next karaf version we will make sure the standard features
>>>> already include that.
>>>>
>>>> Christian
>>>>
>>>> Am 30.11.2014 07:33, schrieb matthjes:
>>>>> So does this mean that 3.0.2 uses the wrong Aries versions? As I
>>>>> mentioned,
>>>>> my example works with 2.4.0. When will 3.0.3 be released?
>>>>>
>>>>> What do you mean with "the jpa is 3.0.1"? How can I update to 3.0.3?
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> View this message in context:
>>>>> http://karaf.922171.n3.nabble.com/Karaf-3-0-2-and-Hibernate-tp4036790p4036797.html
>>>>>
>>>>> Sent from the Karaf - User mailing list archive at Nabble.com.
>>>>
>>>>
>>>> --
>>>>
>>>> Christian Schneider
>>>> http://www.liquid-reality.de
>>>>
>>>> Open Source Architect
>>>> Talend Application Integration Division http://www.talend.com
>>>
>>>
>>>
>>>
>>>
>>> --
>>> View this message in context:
>>> http://karaf.922171.n3.nabble.com/Karaf-3-0-2-and-Hibernate-tp4036790p4036802.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: Karaf 3.0.2 and Hibernate

Posted by matthjes <ma...@gmail.com>.
Ok, I've added the Import-Package statement to my pom.xml and now it's
working! Finally!! Thank you :)

Just one more thing: what does this warning mean?

2014-11-30 13:48:21,164 | WARN  | FelixShutdown    | aries  | 81 -
org.apache.aries.jpa.blueprint.aries - 1.0.4 | Managed persistence context
support is no longer available for use with the Aries Blueprint container.




--
View this message in context: http://karaf.922171.n3.nabble.com/Karaf-3-0-2-and-Hibernate-tp4036790p4036806.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Karaf 3.0.2 and Hibernate

Posted by Christian Schneider <ch...@die-schneider.net>.
3.0.3-SNAPHSOT should work for jpa 2.0 but I think it does not work for 
jpa 2.1.

The jpa feature loads the jpa 2.0 api. Hibernate 4.3 feature loads the 
jpa 2.1 api.
So in the end both apis are installed. I already wanted to contact you 
about it.
We should find a solution for this before the release.

Christian


Am 30.11.2014 10:02, schrieb Jean-Baptiste Onofré:
> Maybe you can take Karaf 3.0.3-SNAPSHOT waiting for the release ?
>
> Regards
> JB
>
> On 11/30/2014 09:13 AM, matthjes wrote:
>> Hi Christian,
>>
>> Thanks for the help! I took your feature.xml, removed the tutorial 
>> stuff and
>> installed it. It seems to work now, but there are some errors show in 
>> the
>> log output:
>>
>> 2014-11-30 09:09:45,359 | ERROR | FelixStartLevel  | aries | 77 -
>> org.apache.aries.jpa.blueprint.aries - 1.0.4 | No
>> org.apache.aries.jpa.container.sync.Synchronization service registered.
>>
>> 2014-11-30 09:09:46,730 | WARN  | FelixStartLevel  | 
>> PojoEntityTuplizer | 87
>> - org.jboss.logging.jboss-logging - 3.1.4.GA | HHH000305: Could not 
>> create
>> proxy factory for:com.boxheadrobot.karaftest.KarafTestEntity
>> ...
>> Caused by: java.lang.NoClassDefFoundError:
>> org/hibernate/proxy/HibernateProxy
>>
>> Hibernate creates the table, but those messages are still annoying 
>> (and hint
>> that there must be something wrong).
>>
>>
>> cschneider wrote
>>> You can try with a custom feature for now . See
>>> https://github.com/cschneider/Karaf-Tutorial/blob/master/tasklist-cdi/features/src/main/resources/features.xml 
>>>
>>>
>>> There I configure karaf to use hibernate 4.3 and the newest aries
>>> releases. With these it works quite well.
>>>
>>> For the next karaf version we will make sure the standard features
>>> already include that.
>>>
>>> Christian
>>>
>>> Am 30.11.2014 07:33, schrieb matthjes:
>>>> So does this mean that 3.0.2 uses the wrong Aries versions? As I
>>>> mentioned,
>>>> my example works with 2.4.0. When will 3.0.3 be released?
>>>>
>>>> What do you mean with "the jpa is 3.0.1"? How can I update to 3.0.3?
>>>>
>>>>
>>>>
>>>> -- 
>>>> View this message in context:
>>>> http://karaf.922171.n3.nabble.com/Karaf-3-0-2-and-Hibernate-tp4036790p4036797.html 
>>>>
>>>> Sent from the Karaf - User mailing list archive at Nabble.com.
>>>
>>>
>>> -- 
>>>
>>> Christian Schneider
>>> http://www.liquid-reality.de
>>>
>>> Open Source Architect
>>> Talend Application Integration Division http://www.talend.com
>>
>>
>>
>>
>>
>> -- 
>> View this message in context: 
>> http://karaf.922171.n3.nabble.com/Karaf-3-0-2-and-Hibernate-tp4036790p4036802.html
>> Sent from the Karaf - User mailing list archive at Nabble.com.
>>
>


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

Open Source Architect
Talend Application Integration Division http://www.talend.com


Re: Karaf 3.0.2 and Hibernate

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Maybe you can take Karaf 3.0.3-SNAPSHOT waiting for the release ?

Regards
JB

On 11/30/2014 09:13 AM, matthjes wrote:
> Hi Christian,
>
> Thanks for the help! I took your feature.xml, removed the tutorial stuff and
> installed it. It seems to work now, but there are some errors show in the
> log output:
>
> 2014-11-30 09:09:45,359 | ERROR | FelixStartLevel  | aries | 77 -
> org.apache.aries.jpa.blueprint.aries - 1.0.4 | No
> org.apache.aries.jpa.container.sync.Synchronization service registered.
>
> 2014-11-30 09:09:46,730 | WARN  | FelixStartLevel  | PojoEntityTuplizer | 87
> - org.jboss.logging.jboss-logging - 3.1.4.GA | HHH000305: Could not create
> proxy factory for:com.boxheadrobot.karaftest.KarafTestEntity
> ...
> Caused by: java.lang.NoClassDefFoundError:
> org/hibernate/proxy/HibernateProxy
>
> Hibernate creates the table, but those messages are still annoying (and hint
> that there must be something wrong).
>
>
> cschneider wrote
>> You can try with a custom feature for now . See
>> https://github.com/cschneider/Karaf-Tutorial/blob/master/tasklist-cdi/features/src/main/resources/features.xml
>>
>> There I configure karaf to use hibernate 4.3 and the newest aries
>> releases. With these it works quite well.
>>
>> For the next karaf version we will make sure the standard features
>> already include that.
>>
>> Christian
>>
>> Am 30.11.2014 07:33, schrieb matthjes:
>>> So does this mean that 3.0.2 uses the wrong Aries versions? As I
>>> mentioned,
>>> my example works with 2.4.0. When will 3.0.3 be released?
>>>
>>> What do you mean with "the jpa is 3.0.1"? How can I update to 3.0.3?
>>>
>>>
>>>
>>> --
>>> View this message in context:
>>> http://karaf.922171.n3.nabble.com/Karaf-3-0-2-and-Hibernate-tp4036790p4036797.html
>>> Sent from the Karaf - User mailing list archive at Nabble.com.
>>
>>
>> --
>>
>> Christian Schneider
>> http://www.liquid-reality.de
>>
>> Open Source Architect
>> Talend Application Integration Division http://www.talend.com
>
>
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/Karaf-3-0-2-and-Hibernate-tp4036790p4036802.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: Karaf 3.0.2 and Hibernate

Posted by Christian Schneider <ch...@die-schneider.net>.
You need to do some manual Import-Package statements in your persitence 
unit bundle.
See the pom of my model bundle.

Christian

Am 30.11.2014 09:13, schrieb matthjes:
> Hi Christian,
>
> Thanks for the help! I took your feature.xml, removed the tutorial stuff and
> installed it. It seems to work now, but there are some errors show in the
> log output:
>
> 2014-11-30 09:09:45,359 | ERROR | FelixStartLevel  | aries | 77 -
> org.apache.aries.jpa.blueprint.aries - 1.0.4 | No
> org.apache.aries.jpa.container.sync.Synchronization service registered.
>
> 2014-11-30 09:09:46,730 | WARN  | FelixStartLevel  | PojoEntityTuplizer | 87
> - org.jboss.logging.jboss-logging - 3.1.4.GA | HHH000305: Could not create
> proxy factory for:com.boxheadrobot.karaftest.KarafTestEntity
> ...
> Caused by: java.lang.NoClassDefFoundError:
> org/hibernate/proxy/HibernateProxy
>
> Hibernate creates the table, but those messages are still annoying (and hint
> that there must be something wrong).
>
>
> cschneider wrote
>> You can try with a custom feature for now . See
>> https://github.com/cschneider/Karaf-Tutorial/blob/master/tasklist-cdi/features/src/main/resources/features.xml
>>
>> There I configure karaf to use hibernate 4.3 and the newest aries
>> releases. With these it works quite well.
>>
>> For the next karaf version we will make sure the standard features
>> already include that.
>>
>> Christian
>>
>> Am 30.11.2014 07:33, schrieb matthjes:
>>> So does this mean that 3.0.2 uses the wrong Aries versions? As I
>>> mentioned,
>>> my example works with 2.4.0. When will 3.0.3 be released?
>>>
>>> What do you mean with "the jpa is 3.0.1"? How can I update to 3.0.3?
>>>
>>>
>>>
>>> --
>>> View this message in context:
>>> http://karaf.922171.n3.nabble.com/Karaf-3-0-2-and-Hibernate-tp4036790p4036797.html
>>> Sent from the Karaf - User mailing list archive at Nabble.com.
>>
>> -- 
>>    
>> Christian Schneider
>> http://www.liquid-reality.de
>>
>> Open Source Architect
>> Talend Application Integration Division http://www.talend.com
>
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/Karaf-3-0-2-and-Hibernate-tp4036790p4036802.html
> Sent from the Karaf - User mailing list archive at Nabble.com.


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

Open Source Architect
Talend Application Integration Division http://www.talend.com


Re: Karaf 3.0.2 and Hibernate

Posted by matthjes <ma...@gmail.com>.
Hi Christian,

Thanks for the help! I took your feature.xml, removed the tutorial stuff and
installed it. It seems to work now, but there are some errors show in the
log output:

2014-11-30 09:09:45,359 | ERROR | FelixStartLevel  | aries | 77 -
org.apache.aries.jpa.blueprint.aries - 1.0.4 | No
org.apache.aries.jpa.container.sync.Synchronization service registered.

2014-11-30 09:09:46,730 | WARN  | FelixStartLevel  | PojoEntityTuplizer | 87
- org.jboss.logging.jboss-logging - 3.1.4.GA | HHH000305: Could not create
proxy factory for:com.boxheadrobot.karaftest.KarafTestEntity
...
Caused by: java.lang.NoClassDefFoundError:
org/hibernate/proxy/HibernateProxy

Hibernate creates the table, but those messages are still annoying (and hint
that there must be something wrong).


cschneider wrote
> You can try with a custom feature for now . See
> https://github.com/cschneider/Karaf-Tutorial/blob/master/tasklist-cdi/features/src/main/resources/features.xml
> 
> There I configure karaf to use hibernate 4.3 and the newest aries 
> releases. With these it works quite well.
> 
> For the next karaf version we will make sure the standard features 
> already include that.
> 
> Christian
> 
> Am 30.11.2014 07:33, schrieb matthjes:
>> So does this mean that 3.0.2 uses the wrong Aries versions? As I
>> mentioned,
>> my example works with 2.4.0. When will 3.0.3 be released?
>>
>> What do you mean with "the jpa is 3.0.1"? How can I update to 3.0.3?
>>
>>
>>
>> --
>> View this message in context:
>> http://karaf.922171.n3.nabble.com/Karaf-3-0-2-and-Hibernate-tp4036790p4036797.html
>> Sent from the Karaf - User mailing list archive at Nabble.com.
> 
> 
> -- 
>   
> Christian Schneider
> http://www.liquid-reality.de
> 
> Open Source Architect
> Talend Application Integration Division http://www.talend.com





--
View this message in context: http://karaf.922171.n3.nabble.com/Karaf-3-0-2-and-Hibernate-tp4036790p4036802.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Karaf 3.0.2 and Hibernate

Posted by Christian Schneider <ch...@die-schneider.net>.
You can try with a custom feature for now . See
https://github.com/cschneider/Karaf-Tutorial/blob/master/tasklist-cdi/features/src/main/resources/features.xml

There I configure karaf to use hibernate 4.3 and the newest aries 
releases. With these it works quite well.

For the next karaf version we will make sure the standard features 
already include that.

Christian

Am 30.11.2014 07:33, schrieb matthjes:
> So does this mean that 3.0.2 uses the wrong Aries versions? As I mentioned,
> my example works with 2.4.0. When will 3.0.3 be released?
>
> What do you mean with "the jpa is 3.0.1"? How can I update to 3.0.3?
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/Karaf-3-0-2-and-Hibernate-tp4036790p4036797.html
> Sent from the Karaf - User mailing list archive at Nabble.com.


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

Open Source Architect
Talend Application Integration Division http://www.talend.com


Re: Karaf 3.0.2 and Hibernate

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
I think you got me wrong:

Here's the jpa feature in Karaf 3.0.2:

     <feature name="jpa" version="1.0.1" description="OSGi Persistence 
Container 2.0" resolver="(obr)">
         <details>JPA 2.0 implementation provided by Apache Aries JPA 
1.0.1. NB: this feature doesn&quot;t provide the JPA engine, you have to 
install one by yourself (OpenJPA for instance)</details>
         <bundle start-level="30" 
dependency="true">mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1</bundle>
         <bundle start-level="30" 
dependency="true">mvn:org.apache.geronimo.specs/geronimo-jpa_2.0_spec/1.1</bundle>
         <bundle 
start-level="30">mvn:org.apache.aries.jpa/org.apache.aries.jpa.api/1.0.0</bundle>
         <bundle 
start-level="30">mvn:org.apache.aries.jpa/org.apache.aries.jpa.blueprint.aries/1.0.1</bundle>
         <bundle 
start-level="30">mvn:org.apache.aries.jpa/org.apache.aries.jpa.container/1.0.0</bundle>
         <bundle 
start-level="30">mvn:org.apache.aries.jpa/org.apache.aries.jpa.container.context/1.0.1</bundle>
     </feature>

Here's the jpa feature in Karaf 2.4.0:

     <feature name="jpa" description="OSGi Persistence Container" 
version="1.0.1" resolver="(obr)">
         <details>JPA 2.0 implementation provided by Apache Aries JPA 
1.0.1. NB: this feature doesn't provide the JPA engine, you have to 
install one by yourself (OpenJPA for instance)</details>
         <bundle dependency="true" 
start-level="30">mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1</bundle>
         <bundle dependency="true" 
start-level="30">mvn:org.apache.geronimo.specs/geronimo-jpa_2.0_spec/1.1</bundle>
         <bundle dependency="true" 
start-level="20">mvn:org.apache.aries/org.apache.aries.util/1.1.0</bundle>
         <bundle 
start-level="30">mvn:org.apache.aries.jpa/org.apache.aries.jpa.api/1.0.0</bundle>
         <bundle 
start-level="30">mvn:org.apache.aries.jpa/org.apache.aries.jpa.container/1.0.0</bundle>
         <bundle 
start-level="30">mvn:org.apache.aries.jpa/org.apache.aries.jpa.container.context/1.0.1</bundle>
         <conditional>
             <condition>aries-blueprint</condition>
             <bundle 
start-level="30">mvn:org.apache.aries.jpa/org.apache.aries.jpa.blueprint.aries/1.0.1</bundle>
         </conditional>
     </feature>

So it's exactly the same.

However, if you do feature:install jpa (without the version), the 
version of the feature installed is not 1.0.1 but 1.0.2:

     <feature name="jpa" description="OSGi Persistence Container" 
version="1.0.2" resolver="(obr)">
         <details>JPA 2.1 implementation provided by Apache Aries JPA 
1.0.2. NB: this feature doesn't provide the JPA engine, you have to 
install one by yourself (OpenJPA for instance)</details>
         <bundle dependency="true" 
start-level="30">mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1</bundle>
         <bundle dependency="true" 
start-level="30">mvn:org.hibernate.javax.persistence/hibernate-jpa-2.1-api/1.0.0.Final</bundle>
         <bundle dependency="true" 
start-level="20">mvn:org.apache.aries/org.apache.aries.util/1.1.0</bundle>
         <bundle 
start-level="30">mvn:org.apache.aries.jpa/org.apache.aries.jpa.api/1.0.1</bundle>
         <bundle 
start-level="30">mvn:org.apache.aries.jpa/org.apache.aries.jpa.container/1.0.1</bundle>
         <bundle 
start-level="30">mvn:org.apache.aries.jpa/org.apache.aries.jpa.container.context/1.0.2</bundle>
         <conditional>
             <condition>aries-blueprint</condition>
             <bundle 
start-level="30">mvn:org.apache.aries.jpa/org.apache.aries.jpa.blueprint.aries/1.0.2</bundle>
         </conditional>
     </feature>

This one contains the "new" JPA bundles, but not backward compatible 
with JPA 2.0 (only JPA 2.1 compliant).

Karaf 3.0.3 will be released roughly in 15 days.

As a workaround, you can create your own features XML containing the jpa 
1.0.2 feature.

Regards
JB

On 11/30/2014 07:33 AM, matthjes wrote:
> So does this mean that 3.0.2 uses the wrong Aries versions? As I mentioned,
> my example works with 2.4.0. When will 3.0.3 be released?
>
> What do you mean with "the jpa is 3.0.1"? How can I update to 3.0.3?
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/Karaf-3-0-2-and-Hibernate-tp4036790p4036797.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: Karaf 3.0.2 and Hibernate

Posted by matthjes <ma...@gmail.com>.
So does this mean that 3.0.2 uses the wrong Aries versions? As I mentioned,
my example works with 2.4.0. When will 3.0.3 be released?

What do you mean with "the jpa is 3.0.1"? How can I update to 3.0.3?



--
View this message in context: http://karaf.922171.n3.nabble.com/Karaf-3-0-2-and-Hibernate-tp4036790p4036797.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Karaf 3.0.2 and Hibernate

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
The jpa is 3.0.1: features:list|grep -i jpa

The 1.0.1 is the version of the context. I updated for 3.0.3 to use new 
container (as JPA Container 1.0.1 has been released after Karaf 3.0.2).

Regards
JB

On 11/29/2014 10:57 PM, matthjes wrote:
> Hi,
>
> I just started with Karaf, so I'm pretty new to this stuff.
>
> According to the  dependency matrix
> <http://karaf.apache.org/index/documentation/karaf-dependencies/karaf-deps-3.0.x.html>
> Karaf 3.0.2 should use:
>
> aries.jpa.api:	    1.0.1
> aries.jpa.container: 1.0.1
> aries.jpa.context	    1.0.2
>
> However, according to the feature you included in your post, 3.0.2 uses
>
> aries.jpa.api:	    1.0.0
> aries.jpa.container: 1.0.0
> aries.jpa.context	    1.0.1
>
> These version are also show, e.g., in the web console under services.
>
> Do I mix some things up here? Btw., the description of the feature says,
> that it supports JPA 2.0, however, I thought that Aries JPA 1.0.1 supports
> JPA 2.1...
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/Karaf-3-0-2-and-Hibernate-tp4036790p4036792.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: Karaf 3.0.2 and Hibernate

Posted by matthjes <ma...@gmail.com>.
Hi,

I just started with Karaf, so I'm pretty new to this stuff.

According to the  dependency matrix
<http://karaf.apache.org/index/documentation/karaf-dependencies/karaf-deps-3.0.x.html>  
Karaf 3.0.2 should use:

aries.jpa.api:	    1.0.1
aries.jpa.container: 1.0.1
aries.jpa.context	    1.0.2

However, according to the feature you included in your post, 3.0.2 uses

aries.jpa.api:	    1.0.0
aries.jpa.container: 1.0.0
aries.jpa.context	    1.0.1

These version are also show, e.g., in the web console under services. 

Do I mix some things up here? Btw., the description of the feature says,
that it supports JPA 2.0, however, I thought that Aries JPA 1.0.1 supports
JPA 2.1...



--
View this message in context: http://karaf.922171.n3.nabble.com/Karaf-3-0-2-and-Hibernate-tp4036790p4036792.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Karaf 3.0.2 and Hibernate

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

yes it's possible, depending of your startup order. Do you install the 
hibernate feature before jpa ?

However, Karaf 3.0.2 includes JPA 1.0.1 (as Karaf 2.4.0):

     <feature name="jpa" version="1.0.1" description="OSGi Persistence 
Container 2.0" resolver="(obr)">
         <details>JPA 2.0 implementation provided by Apache Aries JPA 
1.0.1. NB: this feature doesn&quot;t provide the JPA engine, you have to 
install one by yourself (OpenJPA for instance)</details>
         <bundle start-level="30" 
dependency="true">mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1</bundle>
         <bundle start-level="30" 
dependency="true">mvn:org.apache.geronimo.specs/geronimo-jpa_2.0_spec/1.1</bundle>
         <bundle 
start-level="30">mvn:org.apache.aries.jpa/org.apache.aries.jpa.api/1.0.0</bundle>
         <bundle 
start-level="30">mvn:org.apache.aries.jpa/org.apache.aries.jpa.blueprint.aries/1.0.1</bundle>
         <bundle 
start-level="30">mvn:org.apache.aries.jpa/org.apache.aries.jpa.container/1.0.0</bundle>
         <bundle 
start-level="30">mvn:org.apache.aries.jpa/org.apache.aries.jpa.container.context/1.0.1</bundle>
     </feature>

Are you sure about the jpa version ? Don't you use Karaf 3.0.1 ?

Regards
JB


On 11/29/2014 10:34 PM, matthjes wrote:
> Hi,
>
> I'm using Karaf 3.0.2 and I'm desperately trying to get a small example with
> Hibernate working. However, Karaf always prints out that no providers are
> available.
>
> I looked into the provided services and found that Karaf 3.0.2 uses Aries
> JPA 1.0.0 while Karaf 2.4.0 uses Aries JPA 1.0.1. My example works with
> 2.4.0 (there are some error messages about Hibernate proxy and wiring, but
> the table is there). Why does Karaf 3.0.2 uses an older Aries JPA version.
> Could this older version be the reason why my Hibernate example does not
> work with 3.0.2?
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/Karaf-3-0-2-and-Hibernate-tp4036790.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