[jboss-user] [EJB 3.0] - NullPointerException with EntutyManager.createNamedQuery

guava do-not-reply at jboss.com
Mon Feb 12 01:42:19 EST 2007


Hi,

I'm getting a NullPointerException when calling the createNamedQury() under Jboss 4.0.5GA. Anyone one knows what the stack trace means?

22:25:41,609 ERROR [STDERR] Exception in thread "pool-5-thread-1"
22:25:41,609 ERROR [STDERR] java.lang.NullPointerException
22:25:41,609 ERROR [STDERR]     at org.jboss.ejb3.entity.ManagedEntityManagerFactory.getNonTxEntityManager(ManagedEntityManagerFactory.java:59)
22:25:41,609 ERROR [STDERR]     at org.jboss.ejb3.entity.ManagedEntityManagerFactory.getTransactionScopedEntityManager(ManagedEntityManagerFactory.java:164)
22:25:41,609 ERROR [STDERR]     at org.jboss.ejb3.entity.TransactionScopedEntityManager.createNamedQuery(TransactionScopedEntityManager.java:132)
22:25:41,609 ERROR [STDERR]     at coco.nms.router.RouterManager.getRouter(Route
rManager.java:215)

My POJO looks like the following:

@Entity
@Table(name = "ROUTER")
@org.hibernate.annotations.Table(appliesTo="ROUTER", indexes = { @Index(name="router_mac_index", columnNames = { "MAC" } ) } )
@NamedQuery(name = "nms.Router.by.mac", query = "from Router r where r.mac = :mac")
public class Router {
}

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

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



More information about the jboss-user mailing list