Wednesday, November 2, 2011

java.lang.NoSuchMethodError: antlr/LexerSharedInputState.getTokenStartColumn()

If you get this error

java.lang.NoSuchMethodError: antlr/LexerSharedInputState.getTokenStartColumn()

when running Groovy from the CLI, be aware that you might have in the CLASSPATH some old antlr jars.

For instance, my CLASSPATH was:

echo %CLASSPATH%

C:\bea1035\patch_wls1035\profiles\default\sys_manifest_classpath\weblogic_patch.jar;C:\bea1035\patch_oepe1050\profiles\default\sys_manifest_classpath\weblogic_patch.jar;C:\bea1035\patch_ocp360\profiles\default\sys_manifest_classpath\weblogic_patch.jar;C:\bea1035\patch_jdev1111\profiles\default\sys_manifest_classpath\weblogic_patch.jar;C:\bea1035\JROCKI~1.2-4\lib\tools.jar;C:\bea1035\WLSERV~1.3\server\lib\weblogic_sp.jar;C:\bea1035\WLSERV~1.3\server\lib\weblogic.jar;C:\bea1035\modules\features\weblogic.server.modules_10.3.5.0.jar;C:\bea1035\WLSERV~1.3\server\lib\webservices.jar;C:\bea1035\modules\ORGAPA~1.1/lib/ant-all.jar;C:\bea1035\modules\NETSFA~1.0_1/lib/ant-contrib.jar;

If you do

set CLASSPATH=""

this should fix the problem, since groovy.bat will pick up the right CLASSPATH it needs to run.

No comments: