Reputation: 31
I am new to Karaf and have been tasked to implement JPA using Hibernate in a Karaf container. I thought a good place to start would be sample demo code for container managed persistence at JBoss. I have built the jar file in this demo/example (managed-jpa-1.0.0.jar), downloaded Karaf 4.1.0, and attempted to follow the few steps to run the sample that interacts with an H2 datastore.
According to the README provided with the sample I need to execute the following in the Karaf console: (Version was set to "5.0.0.Final")
The features.xml file with the demo shows a dependency on the H2 database bundle and a blueprint file. It requires features "transaction", "jpa", and "jndi".
Looks like the first three commands execute without issue, but the last,"feature:install hibernate-osgi-managed-jpa" displays an error in the console
Error executing command: Unable to resolve root: missing requirement[root]...
bundle:diag managed-jpa shows the following: Missing dependencies: (&(objectClass=org.apache.aries.blueprint.NamespaceHandler)(osgi.service.blueprint.namespace=\http://aries.apache.org/xmlns/jpa/v1.0.0)) (&(objectClass=org.apache.aries.blueprint.NamespaceHandler)(osgi.service.blueprint.namespace=\http://aries.apache.org/xmlns/transactions/v1.0.0))
JPA and Transaction must not be installed?
I tried to resolve
still an issue with dependencies: Missing dependencies: (&(objectClass=org.apache.aries.blueprint.NamespaceHandler)(osgi.service.blueprint.namespace=\http://aries.apache.org/xmlns/jpa/v1.0.0))
Not sure what I am missing at this point.
Upvotes: 1
Views: 363
Reputation: 21
Try changing your namespace in blueprint.xml from "http://aries.apache.org/xmlns/jpa/v1.0.0" to "http://aries.apache.org/xmlns/jpa/v2.0.0"
Upvotes: 0