springboot异常:java.lang.NoClassDefFoundError antlr RecognitionException解决
springboot异常:java.lang.NoClassDefFoundError: antlr/RecognitionException解决
1 | java.lang.NoClassDefFoundError: antlr/ANTLRException at org.hibernate.hql.ast.ASTQueryTranslatorFactory.createQueryTranslator(ASTQueryTranslatorFactory.java:58) at org.hibernate.engine.query.HQLQueryPlan.(HQLQueryPlan.java:98) at org.hibernate.engine.query.HQLQueryPlan.(HQLQueryPlan.java:80) at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:98) at org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:156) at org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:135) at org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1760) at DataAccess.WKS.Repositories.WksRepositoryBase.LoadAllData(WksRepositoryBase.java:193) at Run.main(Run.java:13)Caused by: java.lang.ClassNotFoundException: antlr.ANTLRException at java.net.URLClassLoader$1.run(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) ... 9 more |
项目编译时,由于网络原因下载jar包antlr可能下载不完成或文件损坏造成的,根源还是找不到antlr的jar包,此时可以删掉.m2/repository/antlr下的所有文件,然后重新maven update下载后就OK了!