Bonjour à tous!!!

J'ai fait une applet (dans un projet java normal) en JEE et un EJB (un projet ejb) qui gère une base de donnée. Cette base contient deux tables: une table Client et une table Compte. Dans l'EJB j'ai deux ejb entity qui sont Client et Compte qui m'ont permis de créer mes deux tables, il y a également deux ejb façade qui gèrent la base de donnée. Pour l'instant je fait les test avec un seul des ejb façade. Lorsque je lance mon applet j'ai un problème il me sort cette erreur:
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
Exception in thread "AWT-EventQueue-1" java.lang.IllegalStateException: No EJB receiver available for handling [appName:,modulename:Banque,distinctname:] combination for invocation context org.jboss.ejb.client.EJBClientInvocationContext@12c26850
	at org.jboss.ejb.client.EJBClientContext.requireEJBReceiver(EJBClientContext.java:584)
	at org.jboss.ejb.client.ReceiverInterceptor.handleInvocation(ReceiverInterceptor.java:119)
	at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:181)
	at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:136)
	at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:121)
	at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:104)
	at com.sun.proxy.$Proxy0.connection(Unknown Source)
	at Client.AppletClient$1.actionPerformed(AppletClient.java:74)
	at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
	at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
	at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
	at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
	at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
	at java.awt.Component.processMouseEvent(Unknown Source)
	at javax.swing.JComponent.processMouseEvent(Unknown Source)
	at java.awt.Component.processEvent(Unknown Source)
	at java.awt.Container.processEvent(Unknown Source)
	at java.awt.Component.dispatchEventImpl(Unknown Source)
	at java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.awt.Component.dispatchEvent(Unknown Source)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
	at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
	at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
	at java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.awt.Component.dispatchEvent(Unknown Source)
	at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.awt.EventQueue.access$200(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
	at java.awt.EventQueue$4.run(Unknown Source)
	at java.awt.EventQueue$4.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.run(Unknown Source)

Pour l'instant mon applet sert juste à vérifier si l'utilisateur arrive à se connecter c'est à dire qu'il tape son numéro de compte et son code et l'applet demande à l'ejb de voir dans la BDD si le numéro de compte existe et si le code saisie est bon.



voici le code de mon ejb façade:
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
package hw;
 
import javax.ejb.LocalBean;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.persistence.Query;
 
import java.lang.Object;
 
import hw.Client;
 
 
/**
 * Session Bean implementation class GestionClient
 */
@Stateless
@LocalBean
public class GestionClient implements GestionClientRemote {
 
    /**
     * Default constructor. 
     */
    public GestionClient() {
        // TODO Auto-generated constructor stub
    }
 
    @PersistenceContext
	EntityManager em;
 
 
 
    public int  connection(int numcompte,int code) {
    	Query num;
    	Query q1;
 
    	int valider=0;
 
    	num=em.createQuery("SELECT numcompte FROM Client WHERE numcompte='"+numcompte+"'"); 
    	System.out.println(num);
 
 
    		q1=em.createQuery("SELECT code FROM Client  WHERE numcompte='"+numcompte+"'");
    		int mdp = (Integer) q1.getSingleResult();
 
    		if (code==mdp){
 
    			valider=1;
    			return valider;
    		}
 
    	return valider;
    }
 
}
Voici le code mon applet:

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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
package Client;
 
import hw.GestionClient;
import hw.GestionClientRemote;
import hw.Client;
 
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import java.util.Properties;
 
import javax.swing.JApplet;
import java.awt.GridBagLayout;
import javax.swing.JTextField;
import java.awt.GridBagConstraints;
import javax.swing.JButton;
import java.awt.Insets;
import javax.swing.JLabel;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
 
 
 
 
public class AppletClient extends JApplet {
	private final JTextField numerocompte = new JTextField();
	private JTextField codeclient;
	private JLabel Label;
 
	GestionClientRemote gestionclient;
 
	// Connexion au serveur et lookup du bean
		 private static GestionClientRemote lookupRemoteStatelessGestionClient() throws NamingException {
			 GestionClientRemote remote=null;
		        try {
		            Properties jndiProps = new Properties();
		            jndiProps.setProperty(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming");
		            InitialContext ctx = new InitialContext(jndiProps); 
		            remote = (GestionClientRemote) ctx.lookup("ejb:/Banque/GestionClient!hw.GestionClientRemote");
		        	} catch (Exception e) {
		            e.printStackTrace();
		        		}    	
		        return remote;
		    }
 
	/**
         * Create the applet.
         */
	public AppletClient() {
 
		try {
			gestionclient = lookupRemoteStatelessGestionClient();
 
			} catch (NamingException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
 
		GridBagLayout gridBagLayout = new GridBagLayout();
		gridBagLayout.columnWidths = new int[]{0, 0, 0, 0, 0, 0};
		gridBagLayout.rowHeights = new int[]{0, 0, 0, 0, 0};
		gridBagLayout.columnWeights = new double[]{0.0, 0.0, 0.0, 0.0, 1.0, Double.MIN_VALUE};
		gridBagLayout.rowWeights = new double[]{0.0, 0.0, 0.0, 0.0, Double.MIN_VALUE};
		getContentPane().setLayout(gridBagLayout);
 
		JButton connexion = new JButton("Connexion");
		connexion.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
 
				int numcompte = Integer.parseInt(numerocompte.getText());
 
				int code=Integer.parseInt(codeclient.getText());
 
				int resultat=(gestionclient.connection(numcompte, code));
 
 
 
				if (resultat==1){
 
					Label.setText("Connexion reussi!");
				} else {
					Label.setText("Connexion échoué!");
				}
 
			}
		});
		GridBagConstraints gbc_numerocompte = new GridBagConstraints();
		gbc_numerocompte.insets = new Insets(0, 0, 5, 0);
		gbc_numerocompte.gridx = 4;
		gbc_numerocompte.gridy = 0;
		getContentPane().add(numerocompte, gbc_numerocompte);
		numerocompte.setColumns(10);
 
		codeclient = new JTextField();
		GridBagConstraints gbc_codeclient = new GridBagConstraints();
		gbc_codeclient.insets = new Insets(0, 0, 5, 0);
		gbc_codeclient.fill = GridBagConstraints.HORIZONTAL;
		gbc_codeclient.gridx = 4;
		gbc_codeclient.gridy = 1;
		getContentPane().add(codeclient, gbc_codeclient);
		codeclient.setColumns(10);
		GridBagConstraints gbc_connexion = new GridBagConstraints();
		gbc_connexion.insets = new Insets(0, 0, 5, 0);
		gbc_connexion.gridx = 4;
		gbc_connexion.gridy = 2;
		getContentPane().add(connexion, gbc_connexion);
 
		JLabel Label = new JLabel("New label");
		GridBagConstraints gbc_Label = new GridBagConstraints();
		gbc_Label.gridx = 4;
		gbc_Label.gridy = 3;
		getContentPane().add(Label, gbc_Label);
 
	}
 
}
Voila si quelqu'un peut m'aider à corriger mon erreur car je n'arrive pas à l'identifier. Merci d'avance. Et j'espère avoir mis ma discutions au bon endroit .