[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Re: EntityManager throws a nullpointerexception JBOSS 4.2.2G

jaikiran do-not-reply at jboss.com
Mon May 26 10:05:43 EDT 2008


The code looks fine to me (the injection part). Are there are exceptions when you deploy this application? And what does the following System.out print:

public SystemUser AuthenticateUser(String uid, String pwd) {
  |                System.out.println("Entity manager injected is: " + em);
  | 		SystemUser _SystemUser = (SystemUser) em.createQuery("select a.systemUser from Account ").getSingleResult();
  | 		return _SystemUser;
  | 		
  | 	}

The method AuthenticateUser is available through the  QueryInt, isn't it? Can you post that interface? Also post the code where this bean is being looked up and used.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4153376#4153376

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4153376



More information about the jboss-user mailing list