Bonjour à tous,
j'ai un problème dans un batchlet ou j'utilise un ejb pour charger une liste dans depuis une db.
Voici l'erreur:
Le code de mon batchlet:Caught exception executing step: com.ibm.jbatch.container.exception.BatchContainerRuntimeException: java.lang.NullPointerException
J'ai essayé mon application en debug et je vois bien que mon nodeEJB reste à null, avez vous une idée comment utiliser un ejb dans ce batchlet?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25 @Named public class getPingStatusBatchlet extends AbstractBatchlet { private static GetPingStatus gps = new GetPingStatus(); private List<Node> nodes = null; @EJB private NodeFacade nodeEJB; @Override public String process() throws NamingException { nodes = nodeEJB.findAll(); for (Node item : nodes) { gps.getPingStatus(item.getIpv4()); } return "COMPLETED"; } @Override public void stop() throws Exception { throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. } }
Merci pour votre aide,
Ersch
Partager