Yes I too had that problem and have fixed it by editing the makefile
(I added the missing class files to the jar file to fix this problem).

Why hasn't such a trivial fix already been comitted by one of the
developpers to the CVS repository?

On 13/09/06, Sumit Gupta <[EMAIL PROTECTED]> wrote:
Hi,

 I am trying to learn to use tinyviz but having a small problem. It doesn't
show me any simulated output and giving me some exceptions. I am not
familiar with this tool and even gone through the tutorial available on
www.tinyos.net but I am not getting desirable output on tinyviz windows. I
have also checked the classes (eg. TOSMsg) which it says is not available
but they are at the right location.


 [EMAIL PROTECTED] /opt/tinyos-1.x/apps/CntToLedsAndRfm
 $ ../../tools/java/net/tinyos/sim/tinyviz -run
build/pc/main.exe 12
 java -Dpython.cachedir=/tmp/jython.cache -DDBG= -DSIMDBG=
-jar C:/PROGRA~1/UCB/c
ygwin/opt/tinyos-1.x/tools/java/net/tinyos/sim/simdriver.jar
-gui -run build/pc/
 main.exe 12
 Starting SimDriver...
 Simulation random seed 229700344
 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.ja
 va: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...


 Welcome to Tython. Type 'quit' to exit.
 ESC on a line by itself will pause/resume the simulator.

 >>> AUTORUN: Initializing simulation.
 AUTORUN: Running simulation: build/pc/main.exe -gui -r=lossy
-seed=229700344 -no
 dbgout 12
 AUTORUN: Connecting...
 SimComm: TossimInitEvent received (12 motes)... initializing system.
 SimComm: Pausing system for TossimInitEvent
 SF enabled, 0 clients, 0 packets read, 0 packets written Could not find a
platfo
 rm 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.ja
 va: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.ja
 va:32)
         at
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)

         at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
 orAccessorImpl.java:39)
         at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
 onstructorAccessorImpl.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:4
 69)
         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.ja
 va: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)
 AUTORUN: Simulation running.
 update settings Empirical1.0
 adding listeners, model is Empirical


 Please give a look and help me out. Following are the contents of
/home/Sumit/.bashrc file. I hope it helps you understand my problem:
 export TELOS_REV=B

 # function settitle() { echo -n "^[]2;[EMAIL PROTECTED];[EMAIL PROTECTED]"; }
 export MAKERULES=$TOSDIR/../tools/make/Makerules
 export CLASSPATH="$CLASSPATH;C:/Program
Files/UCB/cygwin/opt/tinyos-1.x/beta/Drip/tools/java/"
 export CLASSPATH="$CLASSPATH;C:/Program
Files/UCB/cygwin/opt/tinyos-1.x/beta/Drain/tools/java/"
 export CLASSPATH="$CLASSPATH;C:/Program
Files/UCB/cygwin/opt/tinyos-1.x/contrib/nucleus/tools/java/"
 export JDKROOT="/j2sdk1.4.1_02/" #check if version 1.4.2_5 is needed.

 export MSPGCCROOT="/opt/msp430/"
 export CLASSPATH="$TOSROOT/tools/java/javapath"

 # /usr/local/bin
 export PATH="/usr/local/bin:$PATH"
 # Java
 export PATH="$JDKROOT/bin:$PATH"
 # MSPGCC
 export PATH="$MSPGCCROOT/bin:$PATH"

 Thanks
 Sumit

_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to