Bonjour,
je suis sur le point de développer un sender JMS, j'ai installé openJMS et je l'ai démarré sans probleme. de coté client quand il essaye d'initialiser le conexte <Context context = new InitialContext(properties);> j'obtient le message Cannot instantiate class: org.exolab.jms.jndi.InitialContextFactory.

Merci pour votre aide.

code de sender :
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
public static void main(final String[] args) {
   try{ 
    Hashtable properties = new Hashtable();
    properties.put(Context.INITIAL_CONTEXT_FACTORY, 
       "org.exolab.jms.jndi.InitialContextFactory");
    properties.put(Context.PROVIDER_URL, "tcp://localhost:3035/");
    Context context = new InitialContext(properties);
    ConnectionFactory factory = 
        (ConnectionFactory) context.lookup("ConnectionFactory");
   // Connection connection = factory.createConnection();
 
   }
   catch (Exception e) {
      System.out.println(e.getMessage());
    }