This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
hi to all, I’m a junior JPA programmer and a Netbeans short experienced user (but senior developper) I have the following problem using JPA’s wizards: I have just installed Netbeans version 6.7.1  I have created a New project using 'Java J2EE' EJB module I choose the default option every time. Then I add entities from database choosing "jdbc/sample" for connection, sample database and all classes, package : com.test. Next I create a Persistant Unit (using default). Before registering entities and choosing default options Then, I create JPAController and choose all classes choosing default values I create a new Java Class: and again default values, except for the package name using the same as above and I just to follow recommandations. here is the code : --- public class NewClass { public static void main(String p_arg[]){ CustomerJpaController C=new CustomerJpaController(); System.out.println("Test"+ C.getCustomerCount()); } } --- Running this classe : I get the following error --- init: deps-jar: compile-single: run-main: Exception in thread "main" java.lang.NullPointerException at com.test.CustomerJpaController.getEntityManager(CustomerJpaController.java:34) at com.test.CustomerJpaController.getCustomerCount(CustomerJpaController.java:239) at com.test.NewClass.main(NewClass.java:15) Java Result: 1 BUILD SUCCESSFUL (total time: 1 second) --- and the JPAController function getEntityManager return allways null !!! I have used all wizards, and it does not work properly. (Same on PC Vista, Linux ...) I hope this help. Halicorne. 
Created attachment 87248 [details] all information to reproduce it
*** This issue has been marked as a duplicate of 170402 ***