Bonjour tout le monde,
Je suis entrain de faire mon premier exemple en EJB3.le déploiement a été fait avec succès, mais lors de l'exécution du client de test, j'ai obtenu l'exception suivante :
voila le code de mon client :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6 javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial at javax.naming.spi.NamingManager.getInitialContext(Unknown Source) at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source) at javax.naming.InitialContext.getURLOrDefaultInitCtx(Unknown Source) at javax.naming.InitialContext.lookup(Unknown Source)
je vous remercie d'avance.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11 Context context; try { context = new InitialContext(); BookSessionBeanRemote beanRemote = (BookSessionBeanRemote) context .lookup(BookSessionBean.RemoteJNDIName); beanRemote.test(); } catch (NamingException e) { e.printStackTrace(); }
Partager