[異常解決]java.lang.NoClassDefFoundError: antlr/ANTLRException

來源:互聯網
上載者:User

部署時出現異常

java.lang.NoClassDefFoundError: antlr/ANTLRException
 org.hibernate.hql.ast.ASTQueryTranslatorFactory.createQueryTranslator(ASTQueryTranslatorFactory.java:35)
 org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:74)
 org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:56)
 org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:72)
 org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:133)
 org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:112)
 org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1623)
 com.dream.bbs.dao.impl.UserDaoImpl.get(UserDaoImpl.java:41)
 com.dream.bbs.services.UserService.verify(UserService.java:18)
 com.dream.bbs.actions.LoginAction.execute(LoginAction.java:33)
 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
 sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
 java.lang.reflect.Method.invoke(Unknown Source)
 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)

 

 

解決方案:

原來是Hibernate3.0與2.0有所不同
增加了antlr-2.7.6.jar這個包,將這個包加上就OK了!

 

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.