java.lang.NoSuchMethodError: antlr.collections.AST.getLine()I

原创 2015年11月19日 20:57:06
今天开发一个ssh项目时用myeclipse自动导入ssh的jar包报出以下错误:java.lang.NoSuchMethodError: antlr.collections.AST.getLine()Iorg.hibernate.hql.ast.HqlSqlWalker.generateNamedParameter(HqlSqlWalker.java:931)org.hibernate.hql.antlr.HqlSqlBaseWalker.parameter(HqlSqlBaseWalker.java:4909)org.hibernate.hql.antlr.HqlSqlBaseWalker.expr(HqlSqlBaseWalker.java:1404)org.hibernate.hql.antlr.HqlSqlBaseWalker.exprOrSubquery(HqlSqlBaseWalker.java:4383)org.hibernate.hql.antlr.HqlSqlBaseWalker.comparisonExpr(HqlSqlBaseWalker.java:3859)org.hibernate.hql.antlr.HqlSqlBaseWalker.logicalExpr(HqlSqlBaseWalker.java:1907)org.hibernate.hql.antlr.HqlSqlBaseWalker.whereClause(HqlSqlBaseWalker.java:822)org.hibernate.hql.antlr.HqlSqlBaseWalker.query(HqlSqlBaseWalker.java:608)org.hibernate.hql.antlr.HqlSqlBaseWalker.selectStatement(HqlSqlBaseWalker.java:292)org.hibernate.hql.antlr.HqlSqlBaseWalker.statement(HqlSqlBaseWalker.java:235)org.hibernate.hql.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:254)org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:185)org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:136)org.hibernate.engine.query.HQLQueryPlan.(HQLQueryPlan.java:101)org.hibernate.engine.query.HQLQueryPlan.(HQLQueryPlan.java:80)org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:98)org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:156)org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:135)org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1760)com.hnau.dao.UserDAOIMP.isReg(UserDAOIMP.java:56)com.hnau.action.UserAction.register(UserAction.java:41)sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)java.lang.reflect.Method.invoke(Method.java:597)com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:440)com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:279)com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:242)com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:163)com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:249)org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:122)com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:148)com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:93)com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:235)com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:89)com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:128)com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)org.apache.struts2.interceptor.ProfilingActivationInterceptor.intercept(ProfilingActivationInterceptor.java:104)com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:267)com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:126)com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:138)com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:148)com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:128)com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:176)com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:468)org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:76)一头雾水问度娘后得知: java.lang.NoSuchMethodError: antlr.collections.AST.getLine()I 的错误。这是因为在struts2自带的antlr-2.7.2.jar包的版本较低。需要换成antlr-2.7.6.jar。其实在项目中已经存在了antlr-2.7.6.jar这个包,现在唯一需要做的就是删除antlr-2.7.2.jar包。选择windows---preferences---在文本框中搜索struts 2(中间有空格)---选择struts 2---选择antlr-2.7.2.jar---Remove---OK。
版权声明:本文为博主原创文章,未经博主允许不得转载。

关于java.lang.NoSuchMethodError: antlr.collections.AST.getLine()I异常的解决办法

今天在写一个比较简单的学生信息管理系统,采用了Struts2+Hibernate的配置,

(转载)SSH错误2:java.lang.NoSuchMethodError: antlr.collections.AST.getLine()I

java.lang.NoSuchMethodError: antlr.collections.AST.getLine()I 转载▼ (2011-07-28 20:11:53)转载▼ 标签: 杂谈  ...

Exception in thread "main" java.lang.NoSuchMethodError: antlr.collections.AST.getLine()I

Hibernate的Exception in thread "main" java.lang.NoSuchMethodError: antlr.collections.AST.getLine()I错误...

java.lang.NoSuchMethodError: antlr.collections.AST.getLine()I 解决方法

在刚才的学习用myeclipse整合spring和struts2框架时,在启动项目提交数据后遇页面报java.lang.NoSuchMethodError: antlr.collections.AST...

ssh:对于java.lang.NoSuchMethodError: antlr.collections.AST.getLine()I错误解决

说是antlr版本低或是antlr包冲突,很多人推荐是将低版本的antilr删除掉。不过我不知道该如何删掉好,后来又查了一下,总结了几种方法。...

antlr.collections.AST.getLine()I异常

今天比较悲剧,数据库中一张表设计的不太合理,所以修改了一下,但是所有编完的代码又重新改动了一遍,废掉在下一上午的时间。 本来我设计的是一张导出报表对应一个类,但是组员经过讨论之后觉得这样简单是简单,...

cause java.lang.NoSuchMethodError: antlr.collection

严重: Servlet.service() for servlet [UserServlet] in context with path [/FoodToLive] threw exception [...

Exception in thread "main" java.lang.NoSuchMethodError: scala.Predef$.intWrapper(I)Lscala/runtime/Ri

今天做kafka性能测试报了一个如下错误:

java.lang.NoSuchMethodError问题处理

一般在项目依赖比较复杂或者java运行的环境有问题时同一类型的jar包有不同版本存在,本质上说是JVM找不到某个类的特定方法,也就是说JVM加载了错误版本的类。   出现该问题的情形一般有一下几种...
  • yztezhl
  • yztezhl
  • 2015年09月18日 14:24
  • 424

java.lang.NoSuchMethodError问题处理(同一类型的jar包有不同版本存在)

来自:http://blog.csdn.net/alivetime/article/details/6288446 一般在项目依赖比较复杂或者java运行的环境有问题时同一类型的jar包有不...
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:java.lang.NoSuchMethodError: antlr.collections.AST.getLine()I
举报原因:
原因补充:

(最多只允许输入30个字)