Bonjour à tous voilà j'ai deux problème pourriez vous m'aider,j'ai une fonction dans mon ejb qui doit récupérer des paramètres de mon applet mais voilà quand je m'est un string sa ne marche pas et quand je m'est que des int sa fonctionne,mon deuxième problème serait de savoir comment calculer un tableau d'amortissement linéaire.
Voici la fonction qui envoit mes argument elle fonctionne je les testé mais pas pour mon String:
Code JAVA : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14 public void envoie_donnee(int Somme,String Date,int annee,int duree,int taux) { // TODO Auto-generated method stub // Appel du stateless bean AmortissementRemote Amortissement; try { Amortissement = lookupRemoteStatelessAmortissement(); Amortissement.CalculAmortissement(Somme, Date, annee,duree, taux); } catch (NamingException e) { // TODO Auto-generated catch block e.printStackTrace(); } } }
voici mon ejb
Code JAVA : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7 @Override public void CalculAmortissement(int Somme,String Date,int annee,int duree,int taux) { int mensualité = Somme / duree; int interet; int capital_amortie; }
Voici l'erreur:
Code JAVA : 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 Exception in thread "AWT-EventQueue-1" javax.ejb.EJBException: No such method CalculAmortissement(int,java.lang.String,int,int,int) on EJB[appname=,modulename=AmortissementEJB,distinctname=,beanname=Amortissement,viewclassname=hw.AmortissementRemote] at org.jboss.ejb.client.remoting.GeneralInvocationFailureResponseHandler.processMessage(GeneralInvocationFailureResponseHandler.java:70) at org.jboss.ejb.client.remoting.ChannelAssociation$ResponseReceiver.handleMessage(ChannelAssociation.java:395) at org.jboss.remoting3.remote.RemoteConnectionChannel$5.run(RemoteConnectionChannel.java:437) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) at ...asynchronous invocation...(Unknown Source) at org.jboss.ejb.client.remoting.GeneralInvocationFailureResponseHandler$InvocationFailureResultProducer.getResult(GeneralInvocationFailureResponseHandler.java:95) at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:270) at org.jboss.ejb.client.TransactionInterceptor.handleInvocationResult(TransactionInterceptor.java:47) at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:272) at org.jboss.ejb.client.ReceiverInterceptor.handleInvocationResult(ReceiverInterceptor.java:132) at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:260) at org.jboss.ejb.client.EJBClientInvocationContext.awaitResponse(EJBClientInvocationContext.java:399) at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:140) at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:121) at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:104) at $Proxy0.CalculAmortissement(Unknown Source) at client.Amortissement.envoie_donnee(Amortissement.java:169) at client.Amortissement$1.actionPerformed(Amortissement.java:105) 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$000(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)
quand je m'est que des int sa fonctionne seriez vous pourquoi?merci de prendre de votre temps cordialement.
Partager