- 浏览: 582125 次
- 性别:
- 来自: 北京
文章分类
最新评论
-
maleking:
太感谢了。新手搭建hadoop集群环境,dat ...
启动hadoop后没有datanodes的问题 -
system_mush:
NoClassDefFoundError: com/google/common/collect/Maps -
di1984HIT:
呵呵,我学习一下。
Katta源码分析 -
di1984HIT:
呵呵, 不管怎么说,挺好的。
zookeeper3.3学习笔记2:配置参数介绍 -
zoezhang:
谢谢了,可以解决
maven2报cannot be cast to javax.servlet.Filter错误解决
java.lang.NoSuchMethodError: antlr.collections.AST.getLine()I问题解决及总结。
- 博客分类:
- Hibernate
出错信息如下:
HTTP Status 500 -
--------------------------------------------------------------------------------
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
java.lang.reflect.InvocationTargetException
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.FilterDispatcher.doFilter(FilterDispatcher.java:395)
root cause
java.lang.NoSuchMethodError: antlr.collections.AST.getLine()I
org.hibernate.hql.ast.HqlSqlWalker.generatePositionalParameter(HqlSqlWalker.java:896)
org.hibernate.hql.antlr.HqlSqlBaseWalker.parameter(HqlSqlBaseWalker.java:4819)
org.hibernate.hql.antlr.HqlSqlBaseWalker.expr(HqlSqlBaseWalker.java:1373)
org.hibernate.hql.antlr.HqlSqlBaseWalker.exprOrSubquery(HqlSqlBaseWalker.java:4243)
org.hibernate.hql.antlr.HqlSqlBaseWalker.comparisonExpr(HqlSqlBaseWalker.java:3725)
org.hibernate.hql.antlr.HqlSqlBaseWalker.logicalExpr(HqlSqlBaseWalker.java:1864)
org.hibernate.hql.antlr.HqlSqlBaseWalker.logicalExpr(HqlSqlBaseWalker.java:1789)
org.hibernate.hql.antlr.HqlSqlBaseWalker.whereClause(HqlSqlBaseWalker.java:818)
org.hibernate.hql.antlr.HqlSqlBaseWalker.query(HqlSqlBaseWalker.java:604)
org.hibernate.hql.antlr.HqlSqlBaseWalker.selectStatement(HqlSqlBaseWalker.java:288)
org.hibernate.hql.antlr.HqlSqlBaseWalker.statement(HqlSqlBaseWalker.java:231)
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.<init>(HQLQueryPlan.java:101)
org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:80)
org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:94)
org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:156)
org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:135)
org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1651)
org.springframework.orm.hibernate3.HibernateTemplate$30.doInHibernate(HibernateTemplate.java:923)
org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:419)
org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:374)
org.springframework.orm.hibernate3.HibernateTemplate.find(HibernateTemplate.java:921)
com.wgk.dao.impl.UserDaoImpl.get(UserDaoImpl.java:54)
com.wgk.service.impl.UserServiceImpl.get(UserServiceImpl.java:86)
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)
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
$Proxy0.get(Unknown Source)
com.wgk.action.LoginAction.execute(LoginAction.java:39)
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.FilterDispatcher.doFilter(FilterDispatcher.java:395)
note The full stack trace of the root cause is available in the Apache Tomcat/6.0.20 logs.
--------------------------------------------------------------------------------
Apache Tomcat/6.0.20
问题症状:可以在main方法里通过获得业务逻辑bean来查询数据库,但通过网页传参到action里再调用业务逻辑查询数据库,
即会出现这种异常提示。
原因:项目里有这两个jar包产生了冲突所致:antlr-2.7.6.jar和anltr-2.7.2.jar。将anltr-2.7.2.jar包删除即可。
之所以在main方法里能够顺利执行是因为:antlr.jar包是Struts2所依赖的。不通过网页传参,就不需要它,所以能够顺利执行。
借此机会给各位像我一样的新手提些建议:遇到问题不要害怕,baidu,google,csdn都是解决问题的好地方。
本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/im110/archive/2009/09/29/4617310.aspx
发表评论
-
遍历createSQLQuery获取的list对象
2011-02-17 06:17 2551在Hibernate中,利用hql来获取对象list,并且进行 ... -
Remember that ordinal parameters are 1-based!
2011-02-12 22:33 1985for (int i = 0; i < value ... -
hibernate的hibernate.hbm2ddl.auto属性
2011-02-12 14:44 1166<property name="hiber ... -
hibernate 中 对于java.util.Date类型的映射
2010-10-12 17:30 1166java类型 Hibernate ... -
EHCACHE简介
2010-04-27 13:25 1252二级缓存 EHCache是一个快速的、轻量级的、易于使 ... -
hibernate 3.5 运用annotation 缺少 jpa的错误
2010-04-03 18:41 1386Exception in thread "main& ... -
Hibernate AnnotationConfiguration 错误处理
2010-04-03 18:20 2247项目使用hibernate 并使用annotation进行对象 ... -
对象持久化的几种模式
2010-04-01 11:32 1766一、对象-关系映射(ORM) ORM-Object/ ...
相关推荐
在Java编程中,`java.lang.NoSuchMethodError`异常是一个运行时异常,通常发生在程序试图执行一个不存在的方法时。这个异常的出现通常意味着编译时和运行时的类版本不匹配,或者是在编译期间存在而运行时不存在的...
解决 java.lang.NoSuchMethodError 的错误 Java.lang.NoSuchMethodError 错误是一种常见...本文总结了解决 Java.lang.NoSuchMethodError 错误的原因和方法,希望能够帮助读者解决类似的问题,并提高 Java 开发的效率。
1) Error injecting constructor, java.lang.NoSuchMethodError: org.apache.maven.model.validation.DefaultModelValidator: method 'void ()' not found at org.jetbrains.idea.maven.server.embedder....
NULL 博文链接:https://albert0707.iteye.com/blog/562969
在Java编程中,`NoSuchMethodError` 是一个常见的运行时异常,它表示在类加载时找到了该类,但在该类中却找不到特定方法的定义。这个问题通常发生在不同版本的库之间存在不兼容的情况,即在编译时使用的库版本包含了...
jackson-annotations-2.10.2.jar jackson-core-2.10.2.jar jackson-databind-2.10.2.jar NoClassDefFoundError解决
总的来说,解决`java.lang.NoSuchMethodError: antlr.collections.AST.getLine()I`的关键在于识别并修复类路径上的版本不匹配或依赖冲突。同时,对项目的依赖管理和构建过程进行细致的审查也是必要的。
在Java编程中,`java.lang.NoSuchMethodError`异常是一个运行时异常,通常发生在尝试执行一个在编译时可用但在运行时不可用的方法时。这个异常表明某个已经加载的类定义了一个方法,但该方法的实际行为无法被找到。...
登陆报错的问题 登录 java.lang.NoSuchMethodError: antlr.collections.AST.getLine()I 问题 导入数据库乱码解决方案: 人才管理系统项目详细文档说明 ========================================= 系统安装...
用于解决struts2升级至2.3.37时 出现java.lang.NoSuchMethodError: com.opensymphony.xwork2.ActionContext.put(Ljava/lang/异常时,更换的xwork-core-2.3.37.jar
在MyEclipse中通过Struts ...此外,jar包全部正确导入之后可能还会出现java.lang.NoSuchMethodError: antlr.collections.AST.getLine()I 的异常,所以还需要删除antlr-2.7.2这个包,删包的方法网上有很多,很容易找到。
在Java中,有时我们可能会遇到`java.lang.NoSuchMethodError`,这通常发生在运行时尝试执行一个在编译时存在但在运行时不存在的方法。对于这个问题,CGlib提供了解决方案。CGlib使用ASM库(一个Java字节码操纵和分析...
在Android开发过程中,有时会遇到一个令人困惑的错误——`java.lang.NoClassDefFoundError`。这个错误通常意味着在运行时找不到某个类的定义,即使编译时该类是可用的。在本例中,问题出在一个特定的情景:在Android...
1.如果运行程序出现错误:“Exception in thread "main...3.错误:“Exception in thread "main" java.lang.NoSuchMethodError: org.slf4j.MDC.getCopyOfContextMap()Ljava/util/Map”,这是因为jar包版本冲突造成的。
java.lang.NoSuchMethodError: redis.clients.jedis.ScanResult.getStringCursor()Ljava/lang/String; at org.crazycake.shiro.WorkAloneRedisManager.keys(WorkAloneRedisManager.java:149) at org.crazycake....
java.lang.NoSuchMethodError: com.intellij.ide.plugins.PluginManagerCore.loadDescriptors()[Lcom/intellij/ide/plugins/IdeaPluginDescriptorImpl; at com.a.a.b.b.ar.a(ar.java:121) at com.a.a.b.b.ar.a(ar....
Android XmlResourceParser出错解决办法...java.lang.NoSuchMethodError: No interface method i()I in class Landroid/content/res/XmlResourceParser; or its super classes (declaration of 'android.content.res.Xm
了解这些异常种类可以帮助开发者更好地处理和解决问题。 1. 算术异常类:ArithmeticExecption ArithmeticExecption 是一种算术运算异常,例如整数除零、浮点数运算溢出等。这种异常可能会在数学运算或数据类型转换...
Java Web标签大全是一个涵盖广泛的资源,它集合了各种Web开发技术中的标签库,包括JSP、JSTL、Struts1、Struts2、JSF、FreeMarker、Spring和Velocity等。这些技术在构建动态、交互式的Web应用程序时起着至关重要的...