We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProcessing DevelopmentLibraries,  Tool Development › ERROR: duplicate local variable type table
Page Index Toggle Pages: 1
ERROR: duplicate local variable type table (Read 4880 times)
ERROR: duplicate local variable type table
Feb 16th, 2007, 4:28pm
 
Hello,

I am trying to build a library for Processing and I am running into a weird error that I do not understand.  I searched the net for some clarification but can't really find anything, other than it might be related to jikes.

My code compiles and runs without any problems when I build my project in NetBeans (I set up the IDE to be able to build PApplets).  When I try it in Processing, I get an error like the following:
Code:

C:/DOCUME~1/ez/LOCALS~1/Temp/build2838.tmp/Temporary_925_8944.java:28:22:28:32: Semantic Error: The class file "Simulator.class" in "C:\Documents and Settings\ez\Processing\libraries\nexttext\library\NextText.jar\net\nexttext" has an invalid format (duplicate local variable type table).


The PApplet code is identical, and the library JAR file is also the same one as I was using in NetBeans (I just copied it to the Processing libraries folder).  

Any ideas?

Thanks,

-Elie
Re: ERROR: duplicate local variable type table
Reply #1 - Feb 16th, 2007, 10:54pm
 
UPDATE:
I just noticed that this doesn't always happen.  Sometimes I get this error and I'll just re-start Processing and my code will compile.  Sometimes I will just erase some blank lines or comments and it will compile.  And sometimes it will just stop compiling and give me the error again.

Weird...
Re: ERROR: duplicate local variable type table
Reply #2 - Feb 26th, 2007, 11:04pm
 
anyone?
Re: ERROR: duplicate local variable type table
Reply #3 - Apr 18th, 2007, 4:35pm
 
bump...
Re: ERROR: duplicate local variable type table
Reply #4 - Apr 18th, 2007, 5:14pm
 
i guess the error is trying to say that that class exists twice in the classpath? c:\documents and in the libraries folder. you might want to check that (print your classpath).

Code:

//Get the System Classloader
ClassLoader sysClassLoader = ClassLoader.getSystemClassLoader();

//Get the URLs
URL[] urls = ((URLClassLoader)sysClassLoader).getURLs();

for(int i=0; i< urls.length; i++)
{
System.out.println(urls[i].getFile());
}


F
Re: ERROR: duplicate local variable type table
Reply #5 - Apr 18th, 2007, 5:29pm
 
I don't think that's it.
I just checked the classpath and my JARs are only in there once. The only value that is repeated is the base dir "/Applications/Processing%200124/".
And I even unarchived my JARs to make sure that no .class files were being duplicated.

The weird thing is that this doesn't happen all the time. I'll just add a blank line to a sketch or re-open Processing and it will work.

Except for this morning; today, it's just not happening :/
Re: ERROR: duplicate local variable type table
Reply #6 - Apr 18th, 2007, 6:06pm
 
ok. that was just a guess ..

what java versions are you running? the library should be compiled against 1.4.x not 1.5. maybe that's it?

F
Re: ERROR: duplicate local variable type table
Reply #7 - Apr 23rd, 2007, 3:27pm
 
This may be the problem as I am compiling for 1.5. I had already read about this in the libraries howto, but I figured it probably wasn't a big deal since my JARs still worked in Processing.

The code I am compiling uses generics A LOT, so I need to keep the source level at 1.5. When I try setting the target to anything lower I get this message: "javac: source release 1.5 requires target release 1.5".

Am I screwed?
Re: ERROR: duplicate local variable type table
Reply #8 - May 2nd, 2007, 7:57pm
 
I downloaded retroweaver (http://retroweaver.sourceforge.net/) in order to down-compile my classes but I am still getting the same error in the Processing IDE. So, does that mean the problem is not related to the class file versions?

And it still works fine in Eclipse and NetBeans...
Re: ERROR: duplicate local variable type table
Reply #9 - Apr 25th, 2008, 10:30pm
 
I have the exact problem as well. It's frustrating because it is not consistent.  It looks like this may be a problem with jikes.
Does anyone have any suggestion where to look?
Re: ERROR: duplicate local variable type table
Reply #10 - Apr 26th, 2008, 11:21pm
 
From what I understood, I don't think it's a Jikes problem but a Java 1.5/1.4 problem. And I haven't found a down-compiler that works properly to this date. My solution was to rewrite the classes for 1.4...
Re: ERROR: duplicate local variable type table
Reply #11 - May 3rd, 2008, 3:56pm
 
Thank you.  That solved the problem!  When I have the time, I'll try to look into what's going on.
Page Index Toggle Pages: 1