[nbusers] Re: EntityManager problems

  • From: Alexander Schell < >
  • To:
  • Subject: [nbusers] Re: EntityManager problems
  • Date: Sat, 31 Mar 2012 23:34:34 +0200

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello Kira

You're stuck in the following part?

EntityManager entityManager =
Persistence.createEntityManagerFactory("CustomerLibraryPU").createEntityManager();
Query query = entityManager.createQuery("SELECT c FROM Customer c");
List<Customer> resultList = query.getResultList();
//for (Customer c : resultList) {
//    jTextArea1.append(c.getName() + " (" + c.getCity() + ")" + "\n");
//}

Are you sure that all the instances you're using at the point the
NullPointerException is thrown are valid?

Perhaps it would be a good idea to to strew some System.outs printing
the suspicious references to system.out over your you code to be sure
that really every reference you're using is a valid instance...

Hope this helps...

Best regards

Alexander Schell
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk93eGoACgkQfkcoZSkNJQan2ACaAzBH3dBaxXxUhxpCZFyv88xT
7jkAoKCOoSYNnDda3G01fyhLscwhen9M
=hOgK
-----END PGP SIGNATURE-----


[nbusers] EntityManager problems

Kira-sempai 03/31/2012

[nbusers] Re: EntityManager problems

Geertjan Wielenga 03/31/2012

[nbusers] Re: EntityManager problems

Javier Ortiz 03/31/2012

[nbusers] Re: EntityManager problems

Alexander Schell 03/31/2012

Project Features

About this Project

www was started in November 2009, is owned by jpirek, and has 21 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20131025.e7cbc9d). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close