sdnwiselab / sdn-wise-contiki

The Open Source OS for the Internet of Things meets the Software Defined Networking
https://sdnwiselab.github.io/
BSD 3-Clause "New" or "Revised" License
25 stars 24 forks source link

Issue with Sdn-wise Contiki and mobility plugin #15

Closed georgefatsis closed 5 years ago

georgefatsis commented 5 years ago

Hi All,

I try to use mobility plugin for contiki alongside with sdn-wise-contiki and onos, I use the mobility plugin without an issue at with this example but when I try to use it with Onos I get the following error when I try to start cooja:

`compile:
[mkdir] Created dir: /home/user/sdn-wise-contiki/contiki/tools/cooja/apps/powertracker/build
[javac] Compiling 1 source file to /home/user/sdn-wise-contiki/contiki/tools/cooja/apps/powertracker/build

jar:
[jar] Building jar: /home/user/sdn-wise-contiki/contiki/tools/cooja/apps/powertracker/lib/powertracker.jar

run:
[java] WARN [main] (Cooja.java:3172) - JAVA_HOME environment variable not set, Cooja motes may not compile
[java] INFO [AWT-EventQueue-0] (Cooja.java:2856) - External tools default settings: /external_tools_linux.config
[java] INFO [AWT-EventQueue-0] (Cooja.java:2886) - External tools user settings: /root/.cooja.user.properties
[java] Exception in thread "AWT-EventQueue-0" java.lang.VerifyError: Bad type on operand stack
[java] Exception Details:
[java] Location:
[java] Mobility.(Lorg/contikios/cooja/Simulation;Lorg/contikios/cooja/Cooja;)V @65: invokespecial
[java] Reason:
[java] Type 'org/contikios/cooja/dialogs/MessageList' (current frame, stack[3]) is not assignable to 'java/awt/Component'
[java] Current Frame:
[java] bci: @65
[java] flags: { }
[java] locals: { 'Mobility', 'org/contikios/cooja/Simulation', 'org/contikios/cooja/Cooja' }
[java] stack: { 'Mobility', uninitialized 57, uninitialized 57, 'org/contikios/cooja/dialogs/MessageList' }
[java] Bytecode:
[java] 0x0000000: 2a12 062c 03b7 0007 2a04 b500 082a 01b5
[java] 0x0000010: 0009 2abb 000a 59b7 000b b500 0c2a bb00
[java] 0x0000020: 0d59 2a09 b700 0eb5 0002 2a2b b500 032a
[java] 0x0000030: b400 0c01 04b6 000f 2abb 0010 592a b400
[java] 0x0000040: 0cb7 0011 b600 1257 2ab4 000c bb00 1359
[java] 0x0000050: b700 1412 15b6 0016 2bb6 0017 b600 18b6
[java] 0x0000060: 0019 b600 1ab2 001b bb00 1359 b700 1412
[java] 0x0000070: 15b6 0016 2bb6 0017 b600 18b6 0019 b600
[java] 0x0000080: 1c2a 1101 f411 00c8 b600 1db1
[java]
[java] at java.lang.Class.getDeclaredConstructors0(Native Method)
[java] at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)
[java] at java.lang.Class.getConstructor0(Class.java:3075)
[java] at java.lang.Class.getConstructor(Class.java:1825)
[java] at org.contikios.cooja.Cooja.registerPlugin(Cooja.java:1930)
[java] at org.contikios.cooja.Cooja.reparseProjectConfig(Cooja.java:1576)
[java] at org.contikios.cooja.Cooja.(Cooja.java:434)
[java] at org.contikios.cooja.Cooja$30.run(Cooja.java:3322)
[java] at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
[java] at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
[java] at java.awt.EventQueue.access$500(EventQueue.java:97)
[java] at java.awt.EventQueue$3.run(EventQueue.java:709)
[java] at java.awt.EventQueue$3.run(EventQueue.java:703)
[java] at java.security.AccessController.doPrivileged(Native Method)
[java] at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
[java] at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
[java] at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
[java] at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
[java] at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
[java] at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
[java] at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
[java] at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

BUILD SUCCESSFUL
Total time: 7 seconds

Cooja does not start, is there any chance you could help me with issue?

Kind Regards, George Fatsis

prathje commented 5 years ago

This might help :) https://github.com/contiki-os/contiki/issues/2341#issuecomment-423000913

georgefatsis commented 5 years ago

I have fixed this issue. The mobility plug-in was using wrong java classes for the messages. The corrected mobility plug-in can be found at this repository: https://github.com/georgefatsis/mobilityplugin