antlr依赖

Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: org/antlr/runtime/RecognitionException
Caused by: java.lang.NoClassDefFoundError: org/antlr/runtime/RecognitionException
	at java.lang.Class.getDeclaredConstructors0(Native Method)

java.lang.NoClassDefFoundError:org/antlr/runtime/RecognizerSharedStateCaused by: java.lang.NoClassDefFoundError:org/antlr/runtime/RecognizerSharedState
	at java.lang.Class.getDeclaredConstructors0(Native Method)


如果使用的是maven构建项目,加入下面依赖解决
<dependency>
   <groupId>org.antlr</groupId>
   <artifactId>antlr</artifactId>
   <version>3.1.1</version>
</dependency>

新版本不行,如3.1.3就不行

你可能感兴趣的:(java,maven,bean)