Bonsoir,

avec un agent mobile qui fait appel à une fonction matlab appelée somme construite sous forme de méthode java par deploytool de Matlab, il y a toujours l'exception suivante :

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
 
###null>> java.lang.NullPointerException
###null>>       at com.mathworks.toolbox.javabuilder.internal.MWMCR.newRemoteIns
tance(MWMCR.java:546)
###null>>       at com.mathworks.toolbox.javabuilder.internal.MWMCR.newInstance(
MWMCR.java:590)
###null>>       at test.TestMCRFactory.newInstance(TestMCRFactory.java:49)
###null>>       at test.TestMCRFactory.newInstance(TestMCRFactory.java:60)
###null>>       at test.Somme.<init>(Somme.java:63)
###null>>       at agent.AgentA$ReceptionResultat.action(AgentA.java:136)
###null>>       at jade.core.behaviours.Behaviour.actionWrapper(Behaviour.java:3
44)
###null>>       at jade.core.Agent$ActiveLifeCycle.execute(Agent.java:1552)
###null>>       at jade.core.Agent.run(Agent.java:1491)
###null>>       at java.lang.Thread.run(Unknown Source)
sachant que l'erreur se pointe sur la ligne de l'instanciation de la classe Somme et le résultat toujours nul :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
 
 
Somme sum = new Somme();
 
SommeRemote sumremote = (SommeRemote) RemoteProxy
		.newProxyFor(sum, SommeRemote.class, true);
Object[] r = sumremote.somme(1, res, 6);
System.out.println("result : "+ String.valueOf(r));
SVP j'ai besoin de l'aide