FAQ
Cover
\
Build
\
Source
\
Bugs
\
Reference
\
Libraries
\
Tools
The bugs database has moved
here
.
Bug 1225 : antlr errors when attempting to run code
Last modified: 2009-04-02 19:58
P
roject:
processing
trash
Version:
unspecified
Co
m
ponent:
android
book
core
libraries
pde
reference
tools
web
Status:
RESOLVED
Resolution:
INVALID -
Pr
i
ority:
P2
Severity:
normal
Platform
All
O
S:
All
Windows
Mac OS
Linux
Other
Reporter:
Rodrigo Gutierrez
Assigned To:
fry
Attachment
Type
Created
Size
Actions
Description
: Opened: 2009-04-02 13:30
I am attempting to use the most recent version of processing (1.0.3) on my Apple MacBook
Pro (10.5.6).
Running "java -version" produces the following output...
java version "1.5.0_16"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16-b06-284)
Java HotSpot(TM) Client VM (build 1.5.0_16-133, mixed mode, sharing)
Any code will produce this error (i.e. line(15,25,70,90); ).
I do not have a conflicting antlr.jar anywhere on my machine. I'm able to run code through
Eclipse, but I would prefer to continue learning Processing in the PDE.
I've seen this error posted to the discussion boards, but there was no resolution. Has anyone
encountered this and solved the problem?
Below is the error produced by Processing when the "Run" button is pressed...
Exception in thread "AWT-EventQueue-0" java.lang.IllegalAccessError: tried to access method
antlr.CommonHiddenStreamToken.setHiddenBefore(Lantlr/CommonHiddenStreamToken;)V
from class antlr.TokenStreamCopyingHiddenTokenFilter
at
antlr.TokenStreamCopyingHiddenTokenFilter.nextToken(TokenStreamCopyingHiddenTokenFilt
er.java:162)
at antlr.TokenBuffer.fill(TokenBuffer.java:69)
at antlr.TokenBuffer.LA(TokenBuffer.java:80)
at antlr.LLkParser.LA(LLkParser.java:52)
at processing.app.preproc.PdeRecognizer.pdeProgram(PdeRecognizer.java:65)
at processing.app.preproc.PdePreprocessor.write(PdePreprocessor.java:322)
at processing.app.Sketch.preprocess(Sketch.java:1282)
at processing.app.Sketch.build(Sketch.java:1473)
at processing.app.Sketch.compile(Sketch.java:1172)
at processing.app.Editor.handleRun(Editor.java:1564)
at processing.app.EditorToolbar.mousePressed(EditorToolbar.java:318)
at java.awt.Component.processMouseEvent(Component.java:5599)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3135)
at java.awt.Component.processEvent(Component.java:5367)
at java.awt.Container.processEvent(Container.java:2010)
at java.awt.Component.dispatchEventImpl(Component.java:4068)
at java.awt.Container.dispatchEventImpl(Container.java:2068)
at java.awt.Component.dispatchEvent(Component.java:3903)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4256)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3933)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3866)
at java.awt.Container.dispatchEventImpl(Container.java:2054)
at java.awt.Window.dispatchEventImpl(Window.java:1801)
at java.awt.Component.dispatchEvent(Component.java:3903)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:269)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Additional Comment
#1 From fry 2009-04-02 13:37
that's a conflicting version of antlr somewhere on your system. probably in
/Library/Java/Extensions or something like that.
Additional Comment
#2 From Rodrigo Gutierrez 2009-04-02 14:58
There are other copies of antlr on my machine, but they are not in my java classpath:
locate antlr | grep .jar
/Applications/Processing.app/Contents/Resources/Java/antlr.jar
/Applications/eclipse/plugins/org.apache.ant_1.7.0.v200711021030/lib/ant-antlr.jar
/Users/rod/Robotics/DFRAStuff/Tools/jars.old/antlr-2.7.5.jar
/Users/rod/Robotics/DFRAStuff/Tools/jars.old/antlr.jar
/Users/rod/Robotics/workspace/jFuzzyLogic/lib/antlr-2.7.5.jar
/opt/local/share/java/apache-ant/lib/ant-antlr.jar
I updated my locate database before sending this just to be sure I wasn't missing anything.
Additional Comment
#3 From Rodrigo Gutierrez 2009-04-02 15:44
I resolved the issue. After thinking a little bit more about the problem I decided to search the
contents of jar files in my /System/Library/Java/Extensions directory for references to antlr. It
turns out that the JFuzzyLogic jar that I was using includes a copy of antlr. After removing that
jar the processing PDE works fine.
-Rod