Salut
j'ai utilisé l'outil de génération ' ENtity classes from database' et jpa Controller classes from Entity Classes de Netbeans 7.2 et j'ai écrit le main suivant:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
public class NewMain {
 
    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        UserJpaController jpa= new UserJpaController(null, null);
        jpa.findUserEntities();
    }
}
et il m'a affiché les exception suivantes :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
Exception in thread "main" java.lang.NullPointerException
	at controller.UserJpaController.getEntityManager(UserJpaController.java:36)
	at controller.UserJpaController.findUserEntities(UserJpaController.java:157)
	at controller.UserJpaController.findUserEntities(UserJpaController.java:149)
	at NewMain.main(NewMain.java:21)