Hello! I have a problem that's been driving me mad for a while now. I've found lots of similar problems online, but I couldn't get any to work for me, and none of them seemed to fit my problem exactly either. Here's the background:
As a school assignment, I'm supposed to set up an EJB-application with JSF or Struts as the web-framework. At the moment I'm using the Netbeans IDE and the Glassfish Application Server. I'm not quite sure which of the points are relevant here, but I'll try to go into as much detail as possible. I have created an Enterprise Project in netbeans, with an ejb-module and a war-module. The war-module uses the Struts-framework. I have had IMMENSE problems deploying at all, but I have overcome most of them, so I won't account for them unless prompted to do so. :) What remains now, however, is an error I cannot seem to shake!
The struts-code is working. From the Action classes I can call upon the EJB stateless session beans. No problems there. IF, however, I so much as write
@PersistenceContext private EntityManager em;
the code shuts down, and I'm slapped with an NameNotFoundException. Now, I have had many problems with the JNDI-binding, but everything works as long as PersistenceContext is not called upon. If I replace the code with my older, simple database classes, everything works.
Can anyone offer some insight into what my problem could be?
[Message sent by forum member 'klubbad' (klubbad)]
http://forums.java.net/jive/thread.jspa?messageID=251033