[EJB] java.rmi.ConnectIOException
Bonjour à tous, j'essaie de tester mon premier EJB Session et je suis tombé sur une exception qui ne me parle pas beaucoup quand je lance mon client.
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| javax.naming.CommunicationException [Root exception is java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is:
java.io.EOFException]
at weblogic.jrmp.Context.lookup(Context.java:189)
at weblogic.jrmp.Context.lookup(Context.java:195)
at javax.naming.InitialContext.lookup(Unknown Source)
at Clients.ClientConsole.main(ClientConsole.java:20)
Caused by: java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is:
java.io.EOFException
at sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown Source)
at sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown Source)
at sun.rmi.server.UnicastRef.newCall(Unknown Source)
at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
at weblogic.jrmp.Context.lookup(Context.java:185)
... 3 more
Caused by: java.io.EOFException
at java.io.DataInputStream.readByte(Unknown Source)
... 8 more |
Code:
1 2 3 4 5 6 7 8 9 10 11 12
| try {
Hashtable ht = new Hashtable();
ht.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
ht.put(Context.PROVIDER_URL, "t3://localhost:7001");
Context context = new InitialContext(ht);
EtudiantsFacadeRemote beanRemote = (EtudiantsFacadeRemote) context.lookup(EtudiantsFacadeRemote.class.getName());
beanRemote.afficherEtudiants();
} catch (NamingException e) {
e.printStackTrace();
} |
Code:
1 2 3 4
| @Remote
public interface EtudiantsFacadeRemote {
public void afficherEtudiants();
} |
Si vous avez une idée, merci d'avance :)