[ 
https://issues.apache.org/jira/browse/KARAF-6019?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16697225#comment-16697225
 ] 

Nicolas Duminil commented on KARAF-6019:
----------------------------------------

Hi Jean-Baptiste,

Now that I'm able to build the karaf-jpa-example project (only the hibernate 
blueprint part, everything related to eclipselink, open-jpa and ds has been 
commented out), I tried to follow the steps in te README.md to install te 
feature and test the example. But trying to install the feature 
karaf-jpa-example-provider-blueprint-hibernate raises exceptions, as shown 
below:
{code:java}
// code placeholder
karaf@root()> feature:install karaf-jpa-example-provider-blueprint-hibernate
org.osgi.service.resolver.ResolutionException: Unable to resolve root: missing 
requirement [root] osgi.identity; 
osgi.identity=karaf-jpa-example-provider-blueprint-hibernate; 
type=karaf.feature; version="[4.2.2.SNAPSHOT,4.2.2.SNAPSHOT]"; 
filter:="(&(osgi.identity=karaf-jpa-example-provider-blueprint-hibernate)(type=karaf.feature)(version>=4.2.2.SNAPSHOT)(version<=4.2.2.SNAPSHOT))"
 [caused by: Unable to resolve 
karaf-jpa-example-provider-blueprint-hibernate/4.2.2.SNAPSHOT: missing 
requirement [karaf-jpa-example-provider-blueprint-hibernate/4.2.2.SNAPSHOT] 
osgi.identity; 
osgi.identity=org.apache.karaf.examples.karaf-jpa-example-provider-blueprint-hibernate;
 type=osgi.bundle; version="[4.2.2.SNAPSHOT,4.2.2.SNAPSHOT]"; 
resolution:=mandatory [caused by: Unable to resolve 
org.apache.karaf.examples.karaf-jpa-example-provider-blueprint-hibernate/4.2.2.SNAPSHOT:
 missing requirement 
[org.apache.karaf.examples.karaf-jpa-example-provider-blueprint-hibernate/4.2.2.SNAPSHOT]
 osgi.service; objectClass=javax.persistence.spi.PersistenceProvider; 
javax.persistence.provider=org.hibernate.jpa.HibernatePersistenceProvider; 
effective:=active]]
    at 
org.apache.felix.resolver.ResolutionError.toException(ResolutionError.java:42)
    at org.apache.felix.resolver.ResolverImpl.doResolve(ResolverImpl.java:391)
    at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:377)
    at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:331)
    at 
org.apache.karaf.features.internal.region.SubsystemResolver.resolve(SubsystemResolver.java:248)
    at 
org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:388)
    at 
org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1025)
    at 
org.apache.karaf.features.internal.service.FeaturesServiceImpl.lambda$doProvisionInThread$13(FeaturesServiceImpl.java:964)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
Error executing command: Unable to resolve root: missing requirement [root] 
osgi.identity; osgi.identity=karaf-jpa-example-provider-blueprint-hibernate; 
type=karaf.feature; version="[4.2.2.SNAPSHOT,4.2.2.SNAPSHOT]"; 
filter:="(&(osgi.identity=karaf-jpa-example-provider-blueprint-hibernate)(type=karaf.feature)(version>=4.2.2.SNAPSHOT)(version<=4.2.2.SNAPSHOT))"
 [caused by: Unable to resolve 
karaf-jpa-example-provider-blueprint-hibernate/4.2.2.SNAPSHOT: missing 
requirement [karaf-jpa-example-provider-blueprint-hibernate/4.2.2.SNAPSHOT] 
osgi.identity; 
osgi.identity=org.apache.karaf.examples.karaf-jpa-example-provider-blueprint-hibernate;
 type=osgi.bundle; version="[4.2.2.SNAPSHOT,4.2.2.SNAPSHOT]"; 
resolution:=mandatory [caused by: Unable to resolve 
org.apache.karaf.examples.karaf-jpa-example-provider-blueprint-hibernate/4.2.2.SNAPSHOT:
 missing requirement 
[org.apache.karaf.examples.karaf-jpa-example-provider-blueprint-hibernate/4.2.2.SNAPSHOT]
 osgi.service; objectClass=javax.persistence.spi.PersistenceProvider; 
javax.persistence.provider=org.hibernate.jpa.HibernatePersistenceProvider; 
effective:=active]]

{code}
I tried to figure out how to troubleshoot that but no luck. Could you please 
help me ?

Many thanks in advance.

Kind regards,

Nicolas

> org.apache.aries.jpa:org.apache.aries.jpa.blueprint:2.3.0 - Can't make run
> --------------------------------------------------------------------------
>
>                 Key: KARAF-6019
>                 URL: https://issues.apache.org/jira/browse/KARAF-6019
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf
>    Affects Versions: 4.2.1
>            Reporter: Nicolas Duminil
>            Assignee: Jean-Baptiste Onofré
>            Priority: Major
>
> Hello,
> 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



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to