FAQ

More technical questions

How do JADE agents send a message?

From the point of view of the programmer, it is just a single method call (send()).
However, the internals of JADE select the most appropriate transport protocol for each different situation:

  •  If the receiver agent lives on the same agent container, the Java object representing the ACL message is passed to the receiver by using an event object, without any message translation.
  • If the receiver agent lives on the same JADE platform but within a different container, the ACL message is sent by using Java Remote Method Invocation. Java RMI allows transparent object marshaling and unmarshaling, avoiding tedious message conversions. Apart from performance, the agent receives a Java object, just like intra-container messaging.
  • If the receiver lives on a different agent platform, the IIOP protocol and OMG IDL interface are used, according to the FIPA standard. This involves translating ACL message object into a character string and then performing a remote invocation using IIOP as middleware protocol. On receiver side, an IIOP unmarshaling will occur, yielding a Java String object, which will be parsed into an ACLMessage object. Eventually, the Java object will be dispatched to the receiver agent (via Java events or RMI calls).

Problems when unzipping JADE files.

Some users have already complained because they tried to download the JADE software several times to their NT system and every time it appeared to download the ZIP files just fine. However, when they used the WINZIP program to extract the files, all they got were file and directory names, where the files were empty (0 bytes).
We use the jar program to create the distribution files and apparently it has some incompatibilities with some versions of winzip. Usually the problem disappears if you use also jar to unzip your files The command is very simple: jar xvf "name of the zip file"

Problems with the SL Parser.

The JADE implementation of the SL-0 Parser strictly complies with the FIPA specifications of the SL grammar.
Here are the two most common problems that users encounter when using this parser:

  1. The parser does not accept expressions like this
    (FatherOf Peter Mary)
    because the first production rule of the grammar requires a t-uple of ContentExpression
    Content = "(" ContentExpression+ ")".
    ContentExpression = IdentifyingExpression | ActionExpression | Proposition.
  2. the parser does not accept expressions like this
    ((Car :type FIAT :color red))
    because ParameterNames (like :type and :color) cannot be used inside Propositions but only inside FunctionalTerm.
    Proposition = Wff.
    Wff = AtomicFormula | [...]
    AtomicFormula = PropositionSymbol | "(" BinaryTermOp Term Term ")" | "(" PredicateSymbol Term+ ")" | "true" | "false".
    FunctionalTerm = [...] | "(" FunctionSymbol Parameter* ")".
    Parameter = ParameterName ParameterValue .
    ParameterName = ":" String .

I can’t run the examples or I get a ClassNotFound Exception.

In order to reduce the size of the distribution files, the examples are distributed in source code and not yet compiled. The ant build file is also distributed in the jade root directory that allows to compile all the examples (‘ant examples’). If you get a ClassNotFound exception, the most common problem is that you have not properly set the CLASSPATH. It must include all the .jar library files that are in the jade/lib directory (i.e. jade.jar; jadeTools.jar; iiop.jar; Base64.jar) plus the directory where the examples have been compiled (i.e. jade/classes).

How to get context sensitive help about JADE with Eclipse.

Unzip the directory jade/src from jade-src-3.0b1.zip or from the latest snapshot.
The directory should look like:

  jade/src --| jade         
             | FIPA          
             | starlight

Create a .jar file from the content of this directory, named JADE_SRC.jar (the command line is "jar cf JADE_SRC.jar jade FIPA starlight").
If unfamiliar with jar command, create a JADE_SRC.zip file, always from the directory contents.
The file should contain a directory structure like this:

  JADE_SRC --| jade        
             | FIPA        
             | starlight

Any extra entry is unimportant.
Now we’re done with the source packaging, let’s tell Eclipse how to use it…
In Eclipse, open the project which uses the JADE libraries.
In Project –> Properties…, choose Java build path –> libraries (all the libraries used by the project should appear).
For every JADE library (Base64.jar, jade.jar, iiop.jar, jadeTools.jar) repeat these steps:
1. Click on “+” on the left to display “javadoc location” and “source attachment”.
2. Double click “source attachment” (a dialog opens, to modify the source attachment path).
3. Enter the JADE_SRC path (either .zip or .jar); choosing “External file…” you can browse your HD to find it .
Once done for all JADE libraries, Eclipse will show the tooltips taking them directly from the source code; moreover, you will be able to browse the JADE source as the project code (obviously in read-only mode). It will be available also for debugging, but depending on the JADE compilation some debug functions like “Inspect” may not work (this happens if there are no debug info in the .class files).
thanks to Ignazio Palmisano, 26th August 2003

Running JADE over .NET – where to start from?

Actually it is possible to implement aplications with Jade 3.0b1 and .NET. Infact, the pJava version of JADE-LEAP uses the 1.1.x version of Java that is compatible with Visual J# and thus allows LEAP to be used as a portability mechanism to bridge between the .NET world and the JADE agent world.
Since 18th April 2005 (just after JADE 3.3), a new target was added by Federico Pieri (ERXA) to the JADE-LEAP build file that enables creating JADELEAP for a .NET environment. The LEAP User Guide explains also how to do that.

What does the warning “MessageManager queue size > 10000000” mean?

The JADE runtime has an internal queue (called OutBox) of messages to be delivered. When an agent sends a message (method send()) the message is inserted in the OutBox. A pool of threads is responsible for extracting messages from the OutBox and actually delivering them to receivers. That size of the OutBox of course depends on the number of messages waiting to be delivered and on the size of each message. When this size exceeds a given threshold (default is 10 MB) a warning is printed. This is not particularly dangerous, but of course it is a clear indication that either agents are generating really A LOT of traffic or they are sending really BIG messages.
It is possible to increase the above threshold by means of the jade_core_messaging_MessageManager_maxqueuesize option whose value must be specified in bytes (e.g. 10000000 means 10 MB).