tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pablo Caballero <>
Subject @PersistenceUnit injection not working
Date Tue, 04 Nov 2008 20:27:57 GMT
Hi everyone.

I have an @PersistenceUnit(unitName="blah") injection but the value of the related variable
in the method where I'm using it is null.

Using Persistence.createEntityManagerFactory("blah") instead of injection in the method's
body works fine!

I'm using Tomcat 6.0.16. The server log not show any abnormal (I see it from Netbeans that
is my IDE)

Can you explain me if this behaviour is normal or if it's an error (in some place)?

I'm a newbie in Java (and related technologies)

I apologize for my bad english.

Thank you very much


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message