Bonjour
j'ai un problème de migration d'un agent jade, voila mon code qui lance l'agent_migration a partir d'une page jsp :

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
<%@ page import="jade.core.*" %>
<%@ page import="javax.naming.InitialContext" %>
<%@ page import="jade.wrapper.AgentContainer" %>
<%@ page import="jade.core.Profile" %>
<%@ page import="jade.core.ProfileImpl" %>
<%@ page import="jade.wrapper.AgentController" %>
<%@ page import="jade.wrapper.*" %>
<%@ page import="jade.core.Profile.*"%>
<%@ page import="migre.agent_migration" %>
<%@ page import="migre.prof" %>
<%@ page import="jade.core.Runtime" %>
 
<%@ page import="jade.core.mobility.AgentMobilityService" %>
<%@ page import="jade.core.migration.InterPlatformMobilityService" %>
 
<% 
System.out.println("test0");
 
 
 
try{
 
 
	ProfileImpl p = new ProfileImpl(false);
	p.setParameter(Profile.MAIN_PORT,"1099");
    p.setParameter(Profile.MAIN_HOST, "localhost");
    p.setParameter(Profile.PLATFORM_ID,"192.168.0.1");
    p.setParameter(Profile.LOCAL_HOST,Profile.getDefaultNetworkName());
    p.setParameter(Profile.SERVICES,"jade.core.mobility.AgentMobilityService;jade.core.event.NotificationService;jade.core.migration.InterPlatformMobilityService");
    p.setParameter(Profile.MAIN, "false");
    p.setParameter(Profile.MTPS,"jade.mtp.http.MessageTransportProtocol(http://"+Profile.getDefaultNetworkName()+":7778/acc);");
    p.setParameter(Profile.CONTAINER_NAME,"container_secondaire");
    Runtime rt = Runtime.instance();
 
    ContainerController containerController = null;
    try
    {
        containerController = rt.createAgentContainer(p);
 
    }
    catch (Exception ex)
    {
        System.out.println(ex.getMessage());
    }
 
	AgentController dummy = containerController.createNewAgent("inProcess","migre.agent_migration", null);
	dummy.start();    
 
 
	System.out.println("agent_migration est lancé");
} catch (Exception any) {
	any.printStackTrace();}				
 
 
 
 
 
	%>
 
<HTML>
<BODY>
It works !!!!
 
 
</BODY>
</HTML>


et voila la message d'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
GRAVE: Source-Sink: handleInformMigrated: error while migrating: jade.core.IMTPException: Unable to transfer instance [nested jade.core.IMTPException: java.lang.NoClassDefFoundError occurred in remote container [org/apache/commons/codec/binary/Base64]]
jade.core.IMTPException: Error while migrating [nested jade.core.IMTPException: Unable to transfer instance [nested jade.core.IMTPException: java.lang.NoClassDefFoundError occurred in remote container [org/apache/commons/codec/binary/Base64]]]
	at jade.core.migration.InterPlatformMobilityService$CommandOutgoingFilter.handleInformMoved(Unknown Source)
	at jade.core.migration.InterPlatformMobilityService$CommandOutgoingFilter.accept(Unknown Source)
	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.Filter.filter(Filter.java:90)
	at jade.core.CommandProcessor.processOutgoing(CommandProcessor.java:216)
	at jade.core.BaseService.submit(BaseService.java:275)
	at jade.core.mobility.AgentMobilityService$TransitLifeCycle.informMoved(AgentMobilityService.java:1466)
	at jade.core.mobility.AgentMobilityService$TransitLifeCycle.execute(AgentMobilityService.java:1421)
	at jade.core.Agent.run(Agent.java:1439)
	at java.lang.Thread.run(Unknown Source)
et merci d'avance pour votre aide