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

Programmation par agent Java Discussion :

[Jade] Création du premier agent avec Jade


Sujet :

Programmation par agent Java

  1. #1
    Membre à l'essai
    Femme Profil pro
    Inscrit en
    Octobre 2012
    Messages
    12
    Détails du profil
    Informations personnelles :
    Sexe : Femme

    Informations forums :
    Inscription : Octobre 2012
    Messages : 12
    Points : 11
    Points
    11
    Par défaut [Jade] Création du premier agent avec Jade
    Bonjour,
    pouvez vous m'aider SVP?
    J'ai essayé de créer mon premier agent comme dans le tutorial
    http://djug.developpez.com/java/jade/creation-agent

    mon code est le suivant

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    package FirstAgent;
    import jade.core.Agent;
     
    public class HelloWorldAgent extends Agent{
     
    	protected void setup() {
    		  	System.out.println("Hello World! jjjjjjjjjjjjjjjjjjjMy name is "+getLocalName());
    		   	// Make this agent terminate
    		  	doDelete();
    		  } 
     
    }
    et j'ai obtenu le résultat suivant qui n'est pas celui attendue:
    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
    nov. 02, 2012 11:47:29 AM jade.Boot parseCmdLineArgs
    WARNING: WARNING: ignoring command line argument smith:FirstAgent.HelloWorldAgent occurring after agents specification
    nov. 02, 2012 11:47:29 AM jade.Boot parseCmdLineArgs
    WARNING: Note that agent specifications must be separated by a semicolon character ";" without spaces
    nov. 02, 2012 11:47:29 AM jade.core.Runtime beginContainer
    INFO: ----------------------------------
        This is JADE 4.2.0 - revision 6574 of 2012/06/20 15:38:00
        downloaded in Open Source, under LGPL restrictions,
        at http://jade.tilab.com/
    ----------------------------------------
    Retrieving CommandDispatcher for platform null
    nov. 02, 2012 11:47:29 AM jade.imtp.leap.CommandDispatcher addICP
    WARNING: Error adding ICP jade.imtp.leap.JICP.JICPPeer@10d0eae[Cannot bind server socket to localhost port 1099].
    nov. 02, 2012 11:47:29 AM jade.core.AgentContainerImpl joinPlatform
    SEVERE: Communication failure while joining agent platform: No ICP active
    jade.core.IMTPException: No ICP active
    	at jade.imtp.leap.LEAPIMTPManager.initialize(LEAPIMTPManager.java:138)
    	at jade.core.AgentContainerImpl.init(AgentContainerImpl.java:319)
    	at jade.core.AgentContainerImpl.joinPlatform(AgentContainerImpl.java:489)
    	at jade.core.Runtime.createMainContainer(Runtime.java:166)
    	at jade.Boot.main(Boot.java:89)
    nov. 02, 2012 11:47:29 AM jade.core.Runtime$1 run
    INFO: JADE is closing down now.

  2. #2
    Membre à l'essai
    Femme Profil pro
    Inscrit en
    Octobre 2012
    Messages
    12
    Détails du profil
    Informations personnelles :
    Sexe : Femme

    Informations forums :
    Inscription : Octobre 2012
    Messages : 12
    Points : 11
    Points
    11
    Par défaut
    j'ai fermé Jade et j'ai recompiler voilà le résultat
    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
    nov. 02, 2012 12:19:53 PM jade.Boot parseCmdLineArgs
    WARNING: WARNING: ignoring command line argument smith:FirstAgent.HelloWorldAgent occurring after agents specification
    nov. 02, 2012 12:19:53 PM jade.Boot parseCmdLineArgs
    WARNING: Note that agent specifications must be separated by a semicolon character ";" without spaces
    nov. 02, 2012 12:19:53 PM jade.core.Runtime beginContainer
    INFO: ----------------------------------
        This is JADE 4.2.0 - revision 6574 of 2012/06/20 15:38:00
        downloaded in Open Source, under LGPL restrictions,
        at http://jade.tilab.com/
    ----------------------------------------
    Retrieving CommandDispatcher for platform null
    nov. 02, 2012 12:19:54 PM jade.imtp.leap.LEAPIMTPManager initialize
    INFO: Listening for intra-platform commands on address:
    - jicp://192.168.1.9:1099
     
    nov. 02, 2012 12:19:54 PM jade.core.BaseService init
    INFO: Service jade.core.management.AgentManagement initialized
    nov. 02, 2012 12:19:54 PM jade.core.BaseService init
    INFO: Service jade.core.messaging.Messaging initialized
    nov. 02, 2012 12:19:54 PM jade.core.BaseService init
    INFO: Service jade.core.resource.ResourceManagement initialized
    nov. 02, 2012 12:19:54 PM jade.core.BaseService init
    INFO: Service jade.core.mobility.AgentMobility initialized
    nov. 02, 2012 12:19:54 PM jade.core.BaseService init
    INFO: Service jade.core.event.Notification initialized
    nov. 02, 2012 12:19:54 PM jade.mtp.http.HTTPServer <init>
    INFO: HTTP-MTP Using XML parser com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser
    nov. 02, 2012 12:19:54 PM jade.core.messaging.MessagingService boot
    INFO: MTP addresses:
    http://LENOVO-PC:7778/acc
    nov. 02, 2012 12:19:54 PM jade.core.AgentContainerImpl startBootstrapAgents
    WARNING: Cannot create an agent with no name. Class was jade.Boot
    nov. 02, 2012 12:19:54 PM jade.core.AgentContainerImpl joinPlatform
    INFO: --------------------------------------
    Agent container Main-Container@192.168.1.9 is ready.
    --------------------------------------------
    une fenetre Jade s'ouvre mais je ne vois pas comme dans le tutorial
    Hello world! my name is smith ?
    Je m'excuse pour la question mais je suis débutante dans jade et eclipse
    Merci pour votre aide

  3. #3
    Membre à l'essai
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Mai 2012
    Messages
    8
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 36

    Informations professionnelles :
    Activité : Développeur informatique

    Informations forums :
    Inscription : Mai 2012
    Messages : 8
    Points : 13
    Points
    13
    Par défaut
    vérifier les variable d'environnement :



    si non : vérifier les arguments :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    -gui jade.boot jmyosra:firstAgent.HelloWorldAgent
    tu es sous quel version de Jade ?

  4. #4
    Membre à l'essai
    Femme Profil pro
    Inscrit en
    Octobre 2012
    Messages
    12
    Détails du profil
    Informations personnelles :
    Sexe : Femme

    Informations forums :
    Inscription : Octobre 2012
    Messages : 12
    Points : 11
    Points
    11
    Par défaut
    merci j'ai trouvé la solution, le problème était avec la version jade que j'utilise!

  5. #5
    Futur Membre du Club
    Femme Profil pro
    53544943
    Inscrit en
    Décembre 2012
    Messages
    11
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : Algérie

    Informations professionnelles :
    Activité : 53544943
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Décembre 2012
    Messages : 11
    Points : 8
    Points
    8
    Par défaut jad is closing down now
    salut , j'ai un petit problème avec JAD.j'ai fait un code simple qui affiche "hello my name is smith" mais je n'arrive pas a lancer la Plateforme car j'ai cette erreur ,et je sais que l'erreur concerne le numéro de port .qu'est ce que je dois faire pour changer le numéro de port de la plateforme JAD
    Voici l'erreur:janv. 01, 2014 2:07:01 PM jade.core.Runtime beginContainer
    Infos: ----------------------------------
    This is JADE 4.2.0 - revision 6574 of 2012/06/20 15:38:00
    downloaded in Open Source, under LGPL restrictions,
    at http://jade.tilab.com/
    ----------------------------------------
    Retrieving CommandDispatcher for platform null
    janv. 01, 2014 2:07:02 PM jade.imtp.leap.LEAPIMTPManager initialize
    Infos: Listening for intra-platform commands on address:
    - jicp://192.168.1.5:1099

    janv. 01, 2014 2:07:04 PM jade.core.BaseService init
    Infos: Service jade.core.management.AgentManagement initialized
    janv. 01, 2014 2:07:04 PM jade.core.BaseService init
    Infos: Service jade.core.messaging.Messaging initialized
    janv. 01, 2014 2:07:04 PM jade.core.BaseService init
    Infos: Service jade.core.resource.ResourceManagement initialized
    janv. 01, 2014 2:07:04 PM jade.core.BaseService init
    Infos: Service jade.core.mobility.AgentMobility initialized
    janv. 01, 2014 2:07:04 PM jade.core.BaseService init
    Infos: Service jade.core.event.Notification initialized
    janv. 01, 2014 2:07:04 PM jade.core.AgentContainerImpl joinPlatform
    Grave: Some problem occurred while joining agent platform.
    jade.core.ServiceException: Error while booting mandatory service jade.core.messaging.Messaging [nested java.lang.NoClassDefFoundError: jade/util/BasicProperties]
    at jade.core.AgentContainerImpl.bootAllServices(AgentContainerImpl.java:472)
    at jade.core.AgentContainerImpl.startNode(AgentContainerImpl.java:408)
    at jade.core.AgentContainerImpl.joinPlatform(AgentContainerImpl.java:492)
    at jade.core.Runtime.createMainContainer(Runtime.java:166)
    at jade.Boot.main(Boot.java:89)
    Nested Exception:
    java.lang.NoClassDefFoundError: jade/util/BasicProperties
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Unknown Source)
    at jade.core.messaging.MessagingService$CommandTargetSink.installMTP(MessagingService.java:1116)
    at jade.core.messaging.MessagingService$CommandTargetSink.handleInstallMTP(MessagingService.java:1028)
    at jade.core.messaging.MessagingService$CommandTargetSink.consume(MessagingService.java:969)
    at jade.core.CommandProcessor$SinksFilter.accept(CommandProcessor.java:253)
    at jade.core.Filter.filter(Filter.java:89)
    at jade.core.Filter.filter(Filter.java:90)
    at jade.core.Filter.filter(Filter.java:90)
    at jade.core.CommandProcessor.processIncoming(CommandProcessor.java:229)
    at jade.core.BaseNode.serveVerticalCommand(BaseNode.java:163)
    at jade.core.BaseNode.serveHorizontalCommand(BaseNode.java:111)
    at jade.imtp.leap.NodeLEAP.accept(NodeLEAP.java:60)
    at jade.core.messaging.MessagingProxy.installMTP(MessagingProxy.java:151)
    at jade.core.messaging.MessagingService.boot(MessagingService.java:322)
    at jade.core.AgentContainerImpl.bootAllServices(AgentContainerImpl.java:468)
    at jade.core.AgentContainerImpl.startNode(AgentContainerImpl.java:408)
    at jade.core.AgentContainerImpl.joinPlatform(AgentContainerImpl.java:492)
    at jade.core.Runtime.createMainContainer(Runtime.java:166)
    at jade.Boot.main(Boot.java:89)
    Caused by: java.lang.ClassNotFoundException: jade.util.BasicProperties
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    ... 20 more
    janv. 01, 2014 2:07:05 PM jade.core.messaging.MessageManager shutdown
    Infos: MessageManager shutting down ...
    janv. 01, 2014 2:07:05 PM jade.core.Runtime$1 run
    Infos: JADE is closing down now.


    Merci d'avence .

  6. #6
    Membre à l'essai
    Inscrit en
    Novembre 2010
    Messages
    20
    Détails du profil
    Informations forums :
    Inscription : Novembre 2010
    Messages : 20
    Points : 19
    Points
    19
    Par défaut
    Citation Envoyé par jmyosra Voir le message
    merci j'ai trouvé la solution, le problème était avec la version jade que j'utilise!
    C'est quoi la solution SVP ? j'ai le mem probleme et merciii

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

Discussions similaires

  1. Création d'un agent Jade avec Eclipse
    Par Djug dans le forum Programmation par agent
    Réponses: 174
    Dernier message: 06/10/2015, 02h38
  2. Mon premier agent avec JADE
    Par miss_ana dans le forum Débuter avec Java
    Réponses: 2
    Dernier message: 11/08/2015, 17h05
  3. Création d'un agent produit avec Jade
    Par jmyosra dans le forum Programmation par agent
    Réponses: 1
    Dernier message: 13/11/2012, 15h18
  4. [Jade] Problème d'exécution du premier agent
    Par manare dans le forum Programmation par agent
    Réponses: 2
    Dernier message: 24/02/2011, 10h21

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