user6882156
user6882156

Reputation:

org.apache.aries.jpa:org.apache.aries.jpa.blueprint:2.3.0 - Can't make run

I'm following the tutorial here (https://github.com/apache/aries-jpa/tree/master/examples) to run the aries-jpa examples, but unsuccessfully. The README.md file says to performa the following operations:

feature:repo-add mvn:org.ops4j.pax.jdbc/pax-jdbc-features/0.8.0/xml/features
feature:install scr transaction pax-jdbc-config pax-jdbc-h2 pax-jdbc-pool-dbcp2 http-whiteboard jpa hibernate/4.3.6.Final

The last command displays the following error message~:~

Error executing command: No matching features for hibernate/[4.3.6.Final,4.3.6.Final]

So I'm doing just:

feature:install scr transaction pax-jdbc-config pax-jdbc-h2 pax-jdbc-pool-dbcp2 http-whiteboard jpa hibernate

and this works. Looking at the installed features I have:

karaf@root()> feature:list | grep hibernate
hibernate-orm                            │ 5.1.13.Final-redhat-1           │          │ Started     │ hibernate-osgi                                │ Combines all Hibernate core dependencies and requ
hibernate-envers                         │ 5.1.13.Final-redhat-1           │          │ Uninstalled │ hibernate-osgi                                │ Feature for easily adding Envers support to hiber
hibernate-infinispan                     │ 5.1.13.Final-redhat-1           │          │ Uninstalled │ hibernate-osgi                                │ Feature for easily adding Infinispan-based cachin
hibernate-ehcache                        │ 5.1.13.Final-redhat-1           │          │ Uninstalled │ hibernate-osgi                                │
hibernate-validator                      │ 5.3.5.Final-redhat-2            │          │ Uninstalled │ hibernate-validator-osgi-features             │
hibernate-validator-paranamer            │ 5.3.5.Final-redhat-2            │          │ Uninstalled │ hibernate-validator-osgi-features             │
hibernate                                │ 5.1.13.Final-redhat-1           │ x        │ Started     │ enterprise-4.2.0.fuse-710024-redhat-00002     │ Hibernate JPA engine support
karaf@root()>

After that, the document instructs to do that:

install -s mvn:org.apache.aries.jpa/org.apache.aries.jpa.blueprint/2.3.0
install -s mvn:org.apache.aries.jpa.example/org.apache.aries.jpa.example.tasklist.model/2.3.0
install -s mvn:org.apache.aries.jpa.example/org.apache.aries.jpa.example.tasklist.blueprint/2.3.0

This works as expected but, when I go to http://localhost:8181/tasklist I get the following in the log:

15:16:06.199 ERROR [Blueprint Extender: 3] Unable to start blueprint container for bundle org.apache.aries.jpa.example.tasklist.blueprint/2.3.0 due to unresolved dependencies [(&(osgi.unit.name=tasklist)(objectClass=javax.persistence.EntityManager))]

Since this is the official sample supposed to prove that the whole stuff is working I would expect it to work as it is, without doing any particular thing. But for some reasons it doesn't. I have seen this issues reported several times but no solution. Please help.

Oh, and the version I'm using is 4.2.0.fuse-710024-redhat-00002

Kind regards,

Nicolas

Upvotes: 3

Views: 181

Answers (1)

Christian Schneider
Christian Schneider

Reputation: 19626

I updated the example to the versions used in karaf 4.2.1. The closure based example works now. The blueprint based example gives an exception.

I opened an issue at the apache aries jira to track this. See https://issues.apache.org/jira/browse/ARIES-1869

We solved the issue. The reason was a bug in the blueprint core bundle. See https://issues.apache.org/jira/browse/ARIES-1793 . Apache karaf 4.2.2 will include this fix.

Upvotes: 1

Related Questions