You should make sure that your code is annotated with the
@PersistenceContext annotation where you want your EntityManager to be
injected.
The xml elements for EntityManager injection are not supported anymore.
The only reason I can imagine for a NPE in Aries JPA 2.2.0 is that you
do not have the annotation.
Take a look at the examples in aries jpa or at my tutorial
https://github.com/cschneider/Karaf-Tutorial/tree/master/tasklist-blueprint-cdi
.
Christian
On 14.10.2015 12:00, Mohammad Shamsi wrote:
Hi All,
I just updated the karaf container from 4.0.1 to 4.0.2 and apparently
EntityManager is not being injected to the DAO classes anymore.
The JPA feature (enterprise repo) has been updated from 2.1.0 to 2.2.0
in the new karaf release.The feature
includes "*aries.jpa.blueprint/2.2.0"* and, as a workaround, if I
downgrade *only this bundle* to the old version (2.1.0) the problem
will be solved.
Should I change anything in my code to make it work with
"aries.jpa.blueprint/2.2.0" or this is a bug?
Regards,
Mohammad Shamsi
--
Christian Schneider
http://www.liquid-reality.de
Open Source Architect
http://www.talend.com