Hi *,
I am currently struggling as I can't get all the details together. I do have a working database (Derby, coming with jdk1.8.0_141) and a running
TomCat (apache-tomcat-8.5.23) on top. For the JPA I use EclipseLink (eclipselink-2.7.0.v20170811-d680af5). The general access to the database works fine, this is how I get the EntityManager:
This is my persistence.xml:
Now I tried to have the EntityManager being injected like this:
Of course I have modified the persistence.xml in various ways, but I couldn't get it to work. The EntityManager "em2" is always null!
Can anyone tell me, what I am missing here? Thanks a lot guys!
Stephan