Well, "obviously", net.tinyos.message.avrmote.TOSMsg
is either not compiled into a class file or not in
your CLASSPATH. Did you compile the whole tools/java
directory tree?
MS
Anuradha Eragani wrote:
The NullPointerException was occurring due some plugin path not being
set and some plugins.list file not being available. But this exception
got fixed when I compiled all the files in
opt\tinyos-1.x\tools\java\net\tinyos\sim folder which generated
simdriver.jar file (this file wasn’t there before). This jar file
contained plugins.list file and hence the exception got cleared.
However, I'm facing a different problem now. When I'm trying to run the
application in the simulator, I'm encountering the following error message:
*SIM: Random seed is 62500*
*java -Dpython.cachedir=/tmp/jython.cache -DDBG=temp,usr1,am,led
-DSIMDBG= -jar ./simdriver.jar -gui*
*Starting SimDriver...*
*Simulation random seed 1598517665*
*Initializing simulator objects...*
*Could not find a platform specific version of TOSMsg*
*java.lang.ClassNotFoundException: net.tinyos.message.avrmote.TOSMsg*
*java.lang.ClassNotFoundException: net.tinyos.message.avrmote.TOSMsg*
* at java.net.URLClassLoader$1.run(URLClassLoader.java:198)*
* at java.security.AccessController.doPrivileged(Native Method)*
* at java.net.URLClassLoader.findClass(URLClassLoader.java:186)*
* at java.lang.ClassLoader.loadClass(ClassLoader.java:299)*
* at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265)*
* at java.lang.ClassLoader.loadClass(ClassLoader.java:255)*
* at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)*
* at java.lang.Class.forName0(Native Method)*
* at java.lang.Class.forName(Class.java:140)*
* at
net.tinyos.message.MessageFactory.instantiateTOSMsg(MessageFactory.java:122)*
* at
net.tinyos.message.MessageFactory.createTOSMsg(MessageFactory.java:44)*
* at net.tinyos.sim.SimCommands.<init>(SimCommands.java:64)*
* at net.tinyos.sim.SimDriver.<init>(SimDriver.java:244)*
* at net.tinyos.sim.SimDriver.main(SimDriver.java:539)*
*Loading simulator plugins...*
*Creating TinyViz GUI...*
*SF enabled, 0 clients, 0 packets read, 0 packets written Could not find
a platform specific version of TOSMsg*
*java.lang.ClassNotFoundException: net.tinyos.message.avrmote.TOSMsg*
*SF enabled, 0 clients, 0 packets read, 0 packets written*
* at java.net.URLClassLoader$1.run(URLClassLoader.java:198)*
* at java.security.AccessController.doPrivileged(Native Method)*
* at java.net.URLClassLoader.findClass(URLClassLoader.java:186)*
* at java.lang.ClassLoader.loadClass(ClassLoader.java:299)*
* at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265)*
* at java.lang.ClassLoader.loadClass(ClassLoader.java:255)*
* at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)*
* at java.lang.Class.forName0(Native Method)*
* at java.lang.Class.forName(Class.java:140)*
* at
net.tinyos.message.MessageFactory.instantiateTOSMsg(MessageFactory.java:122)*
* at
net.tinyos.message.MessageFactory.createTOSMsg(MessageFactory.java:36)*
* at
net.tinyos.packet.BrokenPacketizer.<init>(BrokenPacketizer.java:58)*
* at net.tinyos.sim.packet.TossimSource.<init>(TossimSource.java:44)*
* at
net.tinyos.sim.packet.TossimSerialSource.<init>(TossimSerialSource.java:32)*
* at
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)*
* at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)*
* at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)*
* at java.lang.reflect.Constructor.newInstance(Constructor.java:274)*
* at
net.tinyos.packet.BuildSource.makeTossimSource(BuildSource.java:509)*
* at
net.tinyos.packet.BuildSource.makeTossimSerial(BuildSource.java:478)*
* at
net.tinyos.packet.BuildSource.makeArgsTossimSerial(BuildSource.java:469)*
* at
net.tinyos.packet.BuildSource.makePacketSource(BuildSource.java:151)*
* at net.tinyos.packet.BuildSource.makePhoenix(BuildSource.java:87)*
* at net.tinyos.sf.SFListen.run(SFListen.java:83)*
*Could not find a platform specific version of TOSMsg*
*java.lang.ClassNotFoundException: net.tinyos.message.avrmote.TOSMsg*
*java.lang.ClassNotFoundException: net.tinyos.message.avrmote.TOSMsg*
* at java.net.URLClassLoader$1.run(URLClassLoader.java:198)*
* at java.security.AccessController.doPrivileged(Native Method)*
* at java.net.URLClassLoader.findClass(URLClassLoader.java:186)*
* at java.lang.ClassLoader.loadClass(ClassLoader.java:299)*
* at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265)*
* at java.lang.ClassLoader.loadClass(ClassLoader.java:255)*
* at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)*
* at java.lang.Class.forName0(Native Method)*
* at java.lang.Class.forName(Class.java:140)*
* at
net.tinyos.message.MessageFactory.instantiateTOSMsg(MessageFactory.java:118)*
* at
net.tinyos.message.MessageFactory.createTOSMsg(MessageFactory.java:44)*
* at net.tinyos.packet.AbstractSource.open(AbstractSource.java:81)*
* at net.tinyos.packet.PhoenixSource.run(PhoenixSource.java:167)*
*java.lang.NullPointerException*
* at net.tinyos.packet.AbstractSource.open(AbstractSource.java:82)*
* at net.tinyos.packet.PhoenixSource.run(PhoenixSource.java:167)*
*SimComm: TossimInitEvent received (2 motes)... initializing system.*
*SimComm: Pausing system for TossimInitEvent*
* *
* *
*Welcome to Tython. Type 'quit' to exit.*
*ESC on a line by itself will pause/resume the simulator.*
* *
*>>> Exiting on SIGINT at 0:0:4.62779925.*
Any idea why this is happening?? Was I supposed to explicitly compile
the files in sim folder to generate the simdriver.jar file?
Thanks
Anu
_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help