Hello,
@PersistenceContext(unitName="somename") EntityManager em
relies on Dependency injection, which is a feature implemented by the Glassfish container you are deploying to, and only works on objects managed by the container - ie sessionbeans etc. So if it is null, it is because dependency injection is not happening.
I am not that familiar with GWT but I do not believe the dependency injection will work since it translates the java classes to javaScript files which are run in the browser, not in the server. There are some posts around detailing the problems with using JPA with GWT that suggest it might take another tool to get working.
Regards,
Chris
[Message sent by forum member 'chris_delahunt' (christopher.delahunt_at_oracle.com)]
http://forums.java.net/jive/thread.jspa?messageID=362280