To get an EntityManager you need several things:

1. persistence bundle with the
<Meta-Persistence>META-INF/persistence.xml</Meta-Persistence>
header defined in the maven bundle plugin and of course the persistence,xml
and entities.
2. A PersistenceProvider service that matches the <provider>class</provider>
in the persistence.xml
3. A DataSource that matches the <jta-data-source>

If you have a valid persistence bundle then Aries jpa should find it and
report in the logs what it found and what it waits for. If you get no logs
then your peristence bundle is wrong.

Christian

2016-01-07 13:22 GMT+01:00 cniehues <[email protected]>:

> After repeating my installation steps with a fresh karaf and without the
> tasklist sample there is no EntityManager for my persistece unit. So I
> think
> I am still missing a bundle that comes with the tasklist sample. When I
> install tasklist sample features I will get the EntityManager. These are
> the
> bundles that were added by the example features:
>
> 423 | Active      |  80 | 1.1.0               | ClassMate
> 428 | Active      |  80 | 1.0.0.SNAPSHOT      | angular-ui
> 429 | Active      |  80 | 1.0.0.SNAPSHOT      | model
> 430 | GracePeriod |  80 | 1.0.0.SNAPSHOT      | persistence
> 431 | GracePeriod |  80 | 1.0.0.SNAPSHOT      | service
> 451 | Active      |  80 | 1.8.2.2             | Apache ServiceMix ::
> Bundles
> :: ant
> 488 | Active      |  80 | 1.3.172             | H2 Database Engine
> 489 | Active      |  80 | 4.0.4.Final         |
> hibernate-commons-annotations
> 490 | Active      |  80 | 4.3.6.Final         | hibernate-core
> 491 | Active      |  80 | 4.3.6.Final         | hibernate-entitymanager
> 492 | Active      |  80 | 4.3.6.Final         | hibernate-osgi
> 493 | Active      |  80 | 1.0.2.Final         | JACC 1.4 API
>
> Any idea what bundle is missing for me?
>
> Christian
>
>
>
> --
> View this message in context:
> http://karaf.922171.n3.nabble.com/Injection-Problem-with-JPA-and-Camel-in-Karaf-4-0-3-tp4044627p4044692.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>



-- 
-- 
Christian Schneider
http://www.liquid-reality.de
<https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e46&URL=http%3a%2f%2fwww.liquid-reality.de>

Open Source Architect
http://www.talend.com
<https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e46&URL=http%3a%2f%2fwww.talend.com>

Reply via email to