Thank you JB for the quick response.  
OK, so I installed the jpa feature:

                feature:install jpa

karaf@root()> list
START LEVEL 100 , List Threshold: 50
 ID │ State     │ Lvl │ Version            │ Name
────┼───────────┼─────┼────────────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 28 │ Active    │  80 │ 4.1.3              │ Apache Karaf :: OSGi Services :: 
Event
 52 │ Active    │  80 │ 1.3.0              │ ClassMate
 53 │ Active    │  80 │ 3.20.0.GA          │ Javassist
 54 │ Active    │  80 │ 1.2                │ javax.interceptor API
 55 │ Active    │  80 │ 1.6.6              │ Byte Buddy (without dependencies)
 56 │ Active    │  80 │ 2.7.7.5            │ Apache ServiceMix :: Bundles :: 
antlr
 57 │ Active    │  80 │ 1.6.1.5            │ Apache ServiceMix :: Bundles :: 
dom4j
 58 │ Active    │  80 │ 5.0.1.Final        │ hibernate-commons-annotations
 59 │ Active    │  80 │ 5.2.8.Final        │ hibernate-core
 60 │ Active    │  80 │ 1.0.0.Final        │ hibernate-jpa-2.1-api
 61 │ Active    │  80 │ 5.2.8.Final        │ hibernate-osgi
 62 │ Active    │  80 │ 2.0.3.Final        │ Java Annotation Indexer
 63 │ Active    │  80 │ 3.3.0.Final        │ JBoss Logging 3
 65 │ Active    │  80 │ 1.9.2.1            │ Apache ServiceMix :: Bundles :: 
jasypt
 66 │ Active    │  80 │ 1.1.0              │ OPS4J Pax JDBC Config
 67 │ Active    │  80 │ 1.1.0              │ OPS4J Pax JDBC Pooling Support Base
 68 │ Active    │  80 │ 1.0.0.201505202023 │ org.osgi:org.osgi.service.jdbc
 69 │ Active    │  80 │ 1.3.172            │ H2 Database Engine
117 │ Active    │  80 │ 1.2.0              │ CDI APIs
118 │ Active    │  80 │ 1.2                │ javax.transaction API
119 │ Active    │  80 │ 1.1.1              │ Apache Aries Transaction Blueprint
120 │ Active    │  80 │ 2.1.0              │ Apache Aries Transaction Blueprint
121 │ Active    │  80 │ 1.3.3              │ Apache Aries Transaction Manager
122 │ Active    │  80 │ 1.0.2              │ Apache Felix Coordinator Service
123 │ Active    │  80 │ 1.0.0.2            │ Apache ServiceMix :: Bundles :: 
javax.inject
124 │ Installed │  80 │ 2.7.0.SNAPSHOT     │ Apache Aries JPA example tasklist 
model
125 │ Active    │  80 │ 2.6.1              │ Apache Aries JPA Container API
126 │ Active    │  80 │ 2.6.1              │ Apache Aries JPA blueprint
127 │ Active    │  80 │ 2.6.1              │ Apache Aries JPA container
128 │ Active    │  80 │ 2.6.1              │ Apache Aries JPA support
129 │ Active    │  80 │ 1.1.1              │ geronimo-jms_1.1_spec
130 │ Active    │  80 │ 1.7.0.6            │ Apache ServiceMix :: Bundles :: 
antThe same problem persists

And

karaf@root()> bundle:diag 124
Apache Aries JPA example tasklist model (124)
---------------------------------------------
Status: Installed
Unsatisfied Requirements:
[org.apache.aries.jpa.example.tasklist.model [124](R 124.0)] osgi.service; 
(osgi.jndi.service.name=tasklist)
[org.apache.aries.jpa.example.tasklist.model [124](R 124.0)] osgi.contract; 
(&(osgi.contract=JavaJPA)(version=2.1.0))
Declarative Services


Or is it something else I need to install?

Best regards,

Alex soto
[email protected]



> On Nov 20, 2017, at 2:31 PM, Jean-Baptiste Onofré <[email protected]> wrote:
> 
> I don't see the jpa engine in your bundle list ? Openjpa, hibernate, 
> eclipselink ?
> The jpa version depends of the engine.
> 
> Regards
> JB
> On Nov 20, 2017, at 20:09, Alex Soto <[email protected] 
> <mailto:[email protected]>> wrote:
> Hello,
> 
> This is my first attempt to use JPA with Karaf, so I am trying to follow 
> example from  https://github.com/apache/aries-jpa 
> <https://github.com/apache/aries-jpa> using Karaf 4.1.3, so far 
> unsuccessfully. 
> On a clean Karaf I have installed the following:
> 
>  feature:install hibernate-orm
>   feature:install pax-jdbc-config
>  feature:install pax-jdbc-h2
>  feature:install http-whiteboard
>  feature:install scr
>  feature:install transaction
> 
> Then I copied the data source config file org.ops4j.datasource-tasklist.cfg 
> to the Karaf’s etc directory.
> 
> Now, when I install the first Example bundle:
> 
> install -s 
> mvn:org.apache.aries.jpa.example/org.apache.aries.jpa.example.tasklist.model/2.7.0-SNAPSHOT
> Error executing command: Error installing bundles:
>  Unable to start bundle 
> mvn:org.apache.aries.jpa.example/org.apache.aries.jpa.example.tasklist.model/2.7.0-SNAPSHOT:
>  org.osgi.framework.BundleException: Unable to resolve 
> org.apache.aries.jpa.example.tasklist.model [124](R 124.0): missing 
> requirement [org.apache.aries.jpa.example.tasklist.model [124](R 124.0)] 
> osgi.contract; (&(osgi.contract=JavaJPA)(version=2.1.0)) Unresolved 
> requirements: [[org.apache.aries.jpa.example.tasklist.model [124](R 124.0)] 
> osgi.contract; (&(osgi.contract=JavaJPA)(version=2.1.0))]
> 
> list
> START LEVEL 100 , List Threshold: 50
>  ID │ State  │ Lvl │ Version            │ Name
> ────┼────────┼─────┼────────────────────┼───────────────────────────────────────────
>  28 │ Active │  80 │ 4.1.3              │ Apache Karaf :: OSGi Services :: 
> Event
>  52 │ Active │  80 │ 1.3.0              │ ClassMate
>  53 │ Active │  80 │ 3.20.0.GA          │ Javassist
>  54 │ Active │  80 │ 1.2                │ javax.interceptor API
>  55 │ Active │  80 │ 1.6.6              │ Byte Buddy (without dependencies)
>  56 │ Active │  80 │ 2.7.7.5            │ Apache ServiceMix :: Bundles :: 
> antlr
>  57 │ Active │  80 │ 1.6.1.5            │ Apache ServiceMix :: Bundles :: 
> dom4j
>  58 │ Active │  80 │ 5.0.1.Final        │ hibernate-commons-annotations
>  59 │ Active │  80 │ 5.2.8.Final        │ hibernate-core
>  60 │ Active │  80 │ 1.0.0.Final        │ hibernate-jpa-2.1-api
>  61 │ Active │  80 │ 5.2.8.Final        │ hibernate-osgi
>  62 │ Active │  80 │ 2.0.3.Final        │ Java Annotation Indexer
>  63 │ Active │  80 │ 3.3.0.Final        │ JBoss Logging 3
>  65 │ Active │  80 │ 1.9.2.1            │ Apache ServiceMix :: Bundles :: 
> jasypt
>  66 │ Active │  80 │ 1.1.0              │ OPS4J Pax JDBC Config
>  67 │ Active │  80 │ 1.1.0              │ OPS4J Pax JDBC Pooling Support Base
>  68 │ Active │  80 │ 1.0.0.201505202023 │ org.osgi:org.osgi.service.jdbc
>  69 │ Active │  80 │ 1.3.172            │ H2 Database Engine
> 117 │ Active │  80 │ 1.2.0              │ CDI APIs
> 118 │ Active │  80 │ 1.2                │ javax.transaction API
> 119 │ Active │  80 │ 1.1.1              │ Apache Aries Transaction Blueprint
> 120 │ Active │  80 │ 2.1.0              │ Apache Aries Transaction Blueprint
> 121 │ Active │  80 │ 1.3.3              │ Apache Aries Transaction Manager
> 122 │ Active │  80 │ 1.0.2              │ Apache Felix Coordinator Service
> 123 │ Active │  80 │ 1.0.0.2            │ Apache ServiceMix :: Bundles :: 
> javax.injec
> 
> bundle:diag 124
> Unsatisfied Requirements:
> [org.apache.aries.jpa.example.tasklist.model [124](R 124.0)] osgi.service; 
> (osgi.jndi.service.name=tasklist)
> [org.apache.aries.jpa.example.tasklist.model [124](R 124.0)] osgi.contract; 
> (&(osgi.contract=JavaJPA)(version=2.1.0))
> 
> 
> Any idea how to troubleshoot this problem? 
> 
> Best regards,
> Alex soto
> 
> 
> 

Reply via email to