You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by FERJANI <fe...@gmail.com> on 2013/04/18 15:48:18 UTC

OSGi JPA

Hello everyone,
I'm a beginner to the OSGi world, and I need a simple example of an 
application using JPA (with any provider) that allows me to develop my 
own implementation.

I tried to follow what is described here: 
http://jaxenter.com/tutorial-using-jpa-in-an-osgi-environment-36661.html
but whenever I try to start my bundle, I have this error:

org.osgi.framework.BundleException: Unresolved constraint in bundle 
mouza-db [2]: Unable to resolve 2.0: missing requirement [2.0] 
osgi.wiring.package; 
(&(osgi.wiring.package=javax.persistence)(jpa=2.0)(version>=1.1.0))

Regards,
Khadija

Re: OSGi JPA

Posted by Christian Schneider <ch...@die-schneider.net>.
Hi Khadija,

I was able to reproduce your problem on Karaf 3. I just committed a fix 
to make the example work on both karaf 2 and 3.
Can you check it out and retest?

Christian

On 22.04.2013 00:03, khadija FERJANI wrote:
> Christian,
> I'm using Karaf 3.0.0.RC1
>
> Khadija
>
> On 4/21/13 7:24 AM, Christian Schneider wrote:
>> This sounds like my example my have a compatbility problem on the 
>> karaf version you used.
>> If you tell me the version I will also test and fix the problem.
>>
>> Christian

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

Open Source Architect
http://www.talend.com


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: OSGi JPA

Posted by khadija FERJANI <fe...@gmail.com>.
Christian,
I'm using Karaf 3.0.0.RC1

Khadija

On 4/21/13 7:24 AM, Christian Schneider wrote:
> This sounds like my example my have a compatbility problem on the 
> karaf version you used.
> If you tell me the version I will also test and fix the problem.
>
> Christian
>
> Am 20.04.2013 17:32, schrieb FERJANI:
>> Christian,
>> Thanks for the quick and precious answer :)
>> Indeed, I had a similar problem using Karaf.
>>
>> Error executing command: Error executing command on bundles:
>>     Unable to execute command on bundle 301: Unresolved constraint in 
>> bundle db-examplejpa [301]: Unable to resolve 301.0: missing 
>> requirement [301.0] osgi.wiring.package; 
>> (&(osgi.wiring.package=org.apache.karaf.shell.console)(version>=2.2.0)(!(version>=3.0.0)))
>>
>> Regards,
>> Khadija
>>
>> On 04/18/2013 08:22 PM, Christian Schneider wrote:
>>> You can try this one:
>>> http://www.liquid-reality.de/display/liquid/2012/01/13/Apache+Karaf+Tutorial+Part+6+-+Database+Access 
>>>
>>>
>>> I think in your case below you either have to load a bundle for the 
>>> jpa spec: mvn:org.apache.geronimo.specs/geronimo-jpa_2.0_spec/1.1
>>> In general it is a good idea to use apache karaf for things like 
>>> jpa. There you can simply install the jpa feature.
>>>
>>> Christian
>>>
>>> Am 18.04.2013 15:48, schrieb FERJANI:
>>>> Hello everyone,
>>>> I'm a beginner to the OSGi world, and I need a simple example of an 
>>>> application using JPA (with any provider) that allows me to develop 
>>>> my own implementation.
>>>>
>>>> I tried to follow what is described here: 
>>>> http://jaxenter.com/tutorial-using-jpa-in-an-osgi-environment-36661.html 
>>>>
>>>> but whenever I try to start my bundle, I have this error:
>>>>
>>>> org.osgi.framework.BundleException: Unresolved constraint in bundle 
>>>> mouza-db [2]: Unable to resolve 2.0: missing requirement [2.0] 
>>>> osgi.wiring.package; 
>>>> (&(osgi.wiring.package=javax.persistence)(jpa=2.0)(version>=1.1.0))
>>>>
>>>> Regards,
>>>> Khadija
>>>>
>>>
>>>
>>
>>
>
>


Re: OSGi JPA

Posted by Christian Schneider <ch...@die-schneider.net>.
This sounds like my example my have a compatbility problem on the karaf 
version you used.
If you tell me the version I will also test and fix the problem.

Christian

Am 20.04.2013 17:32, schrieb FERJANI:
> Christian,
> Thanks for the quick and precious answer :)
> Indeed, I had a similar problem using Karaf.
>
> Error executing command: Error executing command on bundles:
>     Unable to execute command on bundle 301: Unresolved constraint in 
> bundle db-examplejpa [301]: Unable to resolve 301.0: missing 
> requirement [301.0] osgi.wiring.package; 
> (&(osgi.wiring.package=org.apache.karaf.shell.console)(version>=2.2.0)(!(version>=3.0.0)))
>
> Regards,
> Khadija
>
> On 04/18/2013 08:22 PM, Christian Schneider wrote:
>> You can try this one:
>> http://www.liquid-reality.de/display/liquid/2012/01/13/Apache+Karaf+Tutorial+Part+6+-+Database+Access 
>>
>>
>> I think in your case below you either have to load a bundle for the 
>> jpa spec: mvn:org.apache.geronimo.specs/geronimo-jpa_2.0_spec/1.1
>> In general it is a good idea to use apache karaf for things like jpa. 
>> There you can simply install the jpa feature.
>>
>> Christian
>>
>> Am 18.04.2013 15:48, schrieb FERJANI:
>>> Hello everyone,
>>> I'm a beginner to the OSGi world, and I need a simple example of an 
>>> application using JPA (with any provider) that allows me to develop 
>>> my own implementation.
>>>
>>> I tried to follow what is described here: 
>>> http://jaxenter.com/tutorial-using-jpa-in-an-osgi-environment-36661.html 
>>>
>>> but whenever I try to start my bundle, I have this error:
>>>
>>> org.osgi.framework.BundleException: Unresolved constraint in bundle 
>>> mouza-db [2]: Unable to resolve 2.0: missing requirement [2.0] 
>>> osgi.wiring.package; 
>>> (&(osgi.wiring.package=javax.persistence)(jpa=2.0)(version>=1.1.0))
>>>
>>> Regards,
>>> Khadija
>>>
>>
>>
>
>


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

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


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: OSGi JPA

Posted by FERJANI <fe...@gmail.com>.
Christian,
Thanks for the quick and precious answer :)
Indeed, I had a similar problem using Karaf.

Error executing command: Error executing command on bundles:
     Unable to execute command on bundle 301: Unresolved constraint in 
bundle db-examplejpa [301]: Unable to resolve 301.0: missing requirement 
[301.0] osgi.wiring.package; 
(&(osgi.wiring.package=org.apache.karaf.shell.console)(version>=2.2.0)(!(version>=3.0.0)))

Regards,
Khadija

On 04/18/2013 08:22 PM, Christian Schneider wrote:
> You can try this one:
> http://www.liquid-reality.de/display/liquid/2012/01/13/Apache+Karaf+Tutorial+Part+6+-+Database+Access 
>
>
> I think in your case below you either have to load a bundle for the 
> jpa spec: mvn:org.apache.geronimo.specs/geronimo-jpa_2.0_spec/1.1
> In general it is a good idea to use apache karaf for things like jpa. 
> There you can simply install the jpa feature.
>
> Christian
>
> Am 18.04.2013 15:48, schrieb FERJANI:
>> Hello everyone,
>> I'm a beginner to the OSGi world, and I need a simple example of an 
>> application using JPA (with any provider) that allows me to develop 
>> my own implementation.
>>
>> I tried to follow what is described here: 
>> http://jaxenter.com/tutorial-using-jpa-in-an-osgi-environment-36661.html
>> but whenever I try to start my bundle, I have this error:
>>
>> org.osgi.framework.BundleException: Unresolved constraint in bundle 
>> mouza-db [2]: Unable to resolve 2.0: missing requirement [2.0] 
>> osgi.wiring.package; 
>> (&(osgi.wiring.package=javax.persistence)(jpa=2.0)(version>=1.1.0))
>>
>> Regards,
>> Khadija
>>
>
>


Re: OSGi JPA

Posted by Christian Schneider <ch...@die-schneider.net>.
You can try this one:
http://www.liquid-reality.de/display/liquid/2012/01/13/Apache+Karaf+Tutorial+Part+6+-+Database+Access

I think in your case below you either have to load a bundle for the jpa 
spec: mvn:org.apache.geronimo.specs/geronimo-jpa_2.0_spec/1.1
In general it is a good idea to use apache karaf for things like jpa. 
There you can simply install the jpa feature.

Christian

Am 18.04.2013 15:48, schrieb FERJANI:
> Hello everyone,
> I'm a beginner to the OSGi world, and I need a simple example of an 
> application using JPA (with any provider) that allows me to develop my 
> own implementation.
>
> I tried to follow what is described here: 
> http://jaxenter.com/tutorial-using-jpa-in-an-osgi-environment-36661.html
> but whenever I try to start my bundle, I have this error:
>
> org.osgi.framework.BundleException: Unresolved constraint in bundle 
> mouza-db [2]: Unable to resolve 2.0: missing requirement [2.0] 
> osgi.wiring.package; 
> (&(osgi.wiring.package=javax.persistence)(jpa=2.0)(version>=1.1.0))
>
> Regards,
> Khadija
>


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

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


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org