IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Java EE Discussion :

EJB problème prototypage fonction et tableau d'amortissement.


Sujet :

Java EE

  1. #1
    Membre chevronné

    Homme Profil pro
    développeur
    Inscrit en
    Octobre 2013
    Messages
    1 576
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Oise (Picardie)

    Informations professionnelles :
    Activité : développeur

    Informations forums :
    Inscription : Octobre 2013
    Messages : 1 576
    Points : 1 989
    Points
    1 989
    Par défaut EJB problème prototypage fonction et tableau d'amortissement.
    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.

  2. #2
    Membre chevronné

    Homme Profil pro
    développeur
    Inscrit en
    Octobre 2013
    Messages
    1 576
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Oise (Picardie)

    Informations professionnelles :
    Activité : développeur

    Informations forums :
    Inscription : Octobre 2013
    Messages : 1 576
    Points : 1 989
    Points
    1 989
    Par défaut
    Pour l'erreur de string je pense c'était lié à un problème sur le serveur ou une erreur dans l'écriture après avoir bidouiller sa fonctionne ,si quelqu'un à une idée pour envoyer les résultats de l'ejb à l'applet je suis preneur merci d'avance cordialement.

  3. #3
    Membre actif
    Homme Profil pro
    Développeur .NET
    Inscrit en
    Mai 2014
    Messages
    153
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Nord (Nord Pas de Calais)

    Informations professionnelles :
    Activité : Développeur .NET

    Informations forums :
    Inscription : Mai 2014
    Messages : 153
    Points : 227
    Points
    227
    Par défaut
    L'erreur te dit qu'il ne trouve pas la méthode...
    Poste ton path ou ton arborescence.Vérifie que tu as bien implémenté ton interface remote (toutes les méthodes!).
    Bonne continuation.

  4. #4
    Membre chevronné

    Homme Profil pro
    développeur
    Inscrit en
    Octobre 2013
    Messages
    1 576
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Oise (Picardie)

    Informations professionnelles :
    Activité : développeur

    Informations forums :
    Inscription : Octobre 2013
    Messages : 1 576
    Points : 1 989
    Points
    1 989
    Par défaut
    Merci de votre réponse sa fonctionnne

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. EJB tableau d'amortissement
    Par kevin254kl dans le forum Java EE
    Réponses: 3
    Dernier message: 04/11/2014, 13h22
  2. Problème avec fonction renvoyant un Tableau dynamique
    Par kracter56 dans le forum Débuter
    Réponses: 3
    Dernier message: 12/06/2012, 14h38
  3. Réponses: 3
    Dernier message: 01/09/2011, 14h26
  4. Problème de renvoi de tableau par fonction
    Par bluetotoro dans le forum Débuter
    Réponses: 12
    Dernier message: 19/04/2008, 12h03
  5. Problème dans une Grid : tableau d'amortissement.
    Par ecobarito dans le forum Composants VCL
    Réponses: 0
    Dernier message: 21/10/2007, 17h04

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo