qry = .... ((javax.persistence.EntityManager)null)
Why null?
-----Original Message-----
From: vieraci [mailto:
vince@...]
Sent: 05 May 2008 14:13
To:
nbj2ee@...
Subject: [nbj2ee] Runtime exception in initComponents() method
This isn't really a "J2EE" question, I'm using NetBeans 6.1 SE to access a
mysql database using the jdbc:mysql driver. This is the source code:
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents() {
em = java.beans.Beans.isDesignTime() ? null :
javax.persistence.Persistence.createEntityManagerFactory("RM-PU").createEnti
tyManager();
qry = java.beans.Beans.isDesignTime() ? null :
((javax.persistence.EntityManager)null).createQuery("SELECT e.Empl_id,
e.Employee, e.access_lvl FROM empl_view e WHERE e.pwd = :user_pwd");
// App stops at the createQuery method above with this error:
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
I've run into a brick wall here and don't know how to figure this out.
Can anyone please help ?
--
View this message in context:
http://www.nabble.com/Runtime-exception-in-initComponents%28%29-method-tp17061355p17061355.html
Sent from the Netbeans - J2EE mailing list archive at Nabble.com.