This content has been marked as final.
Show 1 reply
-
1. Re: EJB3 @Inject
spaus Oct 26, 2005 9:32 PM (in response to haller)"haller" wrote:
Hi,
I resembled the IDETrail sample with 1.5RC1
and Jboss 4.0.3.
The @Inject tag cannot be resolved?
import de.interactive.ejb.demo.Authors;
public @Stateless
class AuthorsBean implements Authors {
@Inject
private EntityManager manager;
public void addArticle(Author author, String title, String body) {
manager.persist(author);
author.addArticle(title, body);
}
Any suggestions?
Reinhard
I have encountered the same problem with the @Inject tag. I'm using:
Eclipse 3.1.1
JBoss 4.0.3SP1 (with the EJB3 support that installs from the GUI)
JBoss IDE 1.5.0 RC1
Obviously, when I run the JBoss server, deploy the authors example and browse to http://localhost:8080/authors/authors, the server spits out a NullPointerException because the EntityManager member of Authors is null. My question is, how do I work around this with my current configuration?
Thanks,
Sean