Probleme de lookup EJB

Fermé
Marco - 26 févr. 2011 à 23:37
Bonjour,

J'ai un soucis du côté de mon lookup depuis aujourd'hui, ce dernier fonctionnant parfaitement en début d'après-midi. Un vrai mystère.
Je code sous Netbeans avec serveur Glassfish V3.
Mon main :
 
import java.util.Scanner;
import java.io.FileInputStream;
import java.util.Properties;
import Welcome.WelcomeRemote;
import java.io.IOException;
import javax.naming.*;

 public static void main(String[] args) {

   Properties props = new Properties();
try {
    props.load(new FileInputStream("jndi.properties"));
    InitialContext ctx = new InitialContext(props);
    WelcomeRemote hello = (WelcomeRemote) ctx.lookup("Welcome.WelcomeBeanRemote");
    System.out.println(hello.getWelcomeMessage());
} catch (NamingException e) {
    System.err.println(e);
}
  catch (IOException f ) {

    System.err.println(f);
 }
Mon bean :
package Welcome;

import javax.ejb.Stateless;


@Stateless
public class WelcomeBean implements WelcomeRemote {
    public String getWelcomeMessage(){
        return "    WELCOME    ";
    } }

Le Remote :
package Welcome;

import javax.ejb.Remote;


@Remote
public interface WelcomeRemote {
    public String getWelcomeMessage();
}


J'ai le message d'erreur suivant :
javax.naming.NamingException: Lookup failed for 'Welcome.WelcomeBeanRemote' in SerialContext ,orb'sInitialHost=localhost,orb'sInitialPort=3700 [Root exception is javax.naming.NameNotFoundException: Welcome.WelcomeBeanRemote not found]


Le jndi.properties est correctement configuré d'après le site de glassfish et dans le bon classpath, j'ai bien ajouté les .jar correspondant dans le class path (gf-client, appserv-rt,javaee).

Si quelqu'un peut m'eclairer je suis bloqué :)
Si besoin d'informations supplémentaires me demander.

Merci d'avance.