Subject: [manet] Illegal Constant Pool Index

From: "shilpa sharma" <[email-masked]>
Date: Wed, 11 Apr 2007 23:05:35 +0530

Hello everyone..
I am using JIST/SWANS to simulate a wireless network..
I am running a program CBR.java (constant bit rate) that is present in the
src/driver directory of JIST/SWANS.. I am able to compile this program but
when i try to run it using this command..

java
-cp.;..\libs\jargs.jar;..\libs\jist.jar..;\libs\bcel.jar;..\libs\bsh.jar;..\libs\checkstyle-al
l.jar;..\libs\jython.jar;..\libs\log4j.jar;..\libs\swans.jar
jist.runtime.Main jist.swans.Main driver.CBR -n 10 -c 5

where n is nodes and c is number of clients.. i get the following error..

Simulation exception!
java.lang.VerifyError: (class: driver/CBR$Client, method: <init> signature:
(Lji
st/swans/trans/TransInterface$TransUdpInterface;ILjist/swans/net/NetAddress;Ljis
t/swans/net/NetAddress;)V) Illegal constant pool index
        at driver.CBR.buildField(CBR.java:609)
        at driver.CBR.main(CBR.java:645)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at jist.runtime.Bootstrap$JavaMain.startSimulation(Bootstrap.java
:163)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at jist.runtime.Controller.processEvent(Controller.java:650)
        at jist.runtime.Controller.eventLoop(Controller.java:428)
        at jist.runtime.Controller.run(Controller.java:457)
        at java.lang.Thread.run(Unknown Source)

once i get this error Illegal Constant Pool Index I am never able to run
this program again.. It sort of gets corrupted.. i had directly run the
class file once but after i tried to compile it and run it gives me this
error.. Even on compiling and running other files like aodvsim i am getting
the same error.. If these files are compiled and then run successfully, then
only i can try something of my own

My java version is Java(TM) 2 Runtime Environment, Standard Edition (build
1.5.0_04-b05)

Plz anyone help me fix this error.. I'l be really thankfull..
_______________________________________________
manet mailing list
[email-masked]
https://www1.ietf.org/mailman/listinfo/manet

---

From: "gabik" <[email-masked]>
Date: Wed, 11 Apr 2007 21:10:32 +0300

Hello
 
You can Google "Illegal constant pool index" and find for example:
 
http://www.jpox.org/servlet/forum/viewthread?thread=2506
 
I am not 100% sure, but it seems to be related to some inconsistencies
between the version of BCEL used in JiST and the version of Java that you
use.
Probably updating bcel.jar or the java version will solve the problem.
JIST/SWANS works perfectly fine for me with java 1.4.
 
I also suggest that you ask Rimon Barr <http://rimonbarr.com/> 	 <
<mailto:[email-masked]> [email-masked]>
http://jist.ece.cornell.edu/people.html 
directly, and I am sure he will be able to give you the full answer.
 
Best regards,
 
Gabi Kliot

  _____  

From: shilpa sharma [mailto:[email-masked]] 
Sent: Wednesday, April 11, 2007 8:36 PM
To: [email-masked]
Subject: [manet] Illegal Constant Pool Index

Hello everyone..

java
-cp.;..\libs\jargs.jar;..\libs\jist.jar..;\libs\bcel.jar;..\libs\bsh.jar;..\
libs\checkstyle-al
l.jar;..\libs\jython.jar;..\libs\log4j.jar;..\libs\swans.jar
jist.runtime.Main jist.swans.Main driver.CBR -n 10 -c 5

Simulation exception!
st/swans/trans/TransInterface$TransUdpInterface;ILjist/swans/net/NetAddress;
Ljis
        at sun.reflect.NativeMethodAccessorImpl.invoke (Unknown Source)
        at jist.runtime.Controller.run (Controller.java:457)