[antlr-interest] Exception with gunit and custom tree adaptors

Kaleb Pederson kaleb.pederson at gmail.com
Tue Oct 27 15:46:18 PDT 2009

I'm getting a strange exception when working attempting to use custom AST nodes with gunit.  Per the instructions, I added the following to my gunit file:

options { TreeAdaptor = ElementTypeTreeAdaptor; }

However, I now get an odd exception:

java.lang.ClassNotFoundException: llvm.CC
        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
        at org.antlr.gunit.gUnitExecutor.classForName(gUnitExecutor.java:98)
        at org.antlr.gunit.gUnitExecutor.runParser(gUnitExecutor.java:326)
        at org.antlr.gunit.gUnitExecutor.runCorrectParser(gUnitExecutor.java:159)
        at org.antlr.gunit.gUnitExecutor.executeTests(gUnitExecutor.java:175)
        at org.antlr.gunit.gUnitExecutor.execTest(gUnitExecutor.java:123)
        at org.antlr.mojo.antlr3.GUnitExecuteMojo.performExecution(GUnitExecuteMojo.java:305)
        at org.antlr.mojo.antlr3.GUnitExecuteMojo.execute(GUnitExecuteMojo.java:136)

My first thought is that I messed up the class name, but that's not the case because I verified the name and it fails in exactly the same way with a fully qualified class name.  Additionally, I tried ANTLR's CommonTreeAdaptor and I still receive the same error.  I'm using Sun's Java-6.

Kaleb Pederson

Twitter - http://twitter.com/kalebpederson
Blog - http://kalebpederson.com

More information about the antlr-interest mailing list