5 Replies Latest reply on Mar 27, 2006 11:54 PM by mazz

    ANTLRException no class def found

    mazz Master

      I'm using the latest embedded EJB3 release (jboss-EJB-3.0_Embeddable_ALPHA_5).

      I have a small EJB3 app that can currently persist, merge and remove things fine via the EM.

      But, when I attempt a very simple query, I get this:

      java.lang.NoClassDefFoundError: antlr/ANTLRException

      This seems like a silly little problem, and searching on this I've found (mainly in the hibernate forums) that I need to put antlr-2.7.5h3.jar in my classpath.

      Problem is - I can't find that jar. It is not included in the embedded EJB3 release (jboss-EJB-3.0_Embeddable_ALPHA_5.zip). I do see a later version (antlr-2.7.6rc1.jar) of this in the JBossAS 4.0.4RC1 distro but its not in the embedded EJB release.


      java.lang.NoClassDefFoundError: antlr/ANTLRException
      at org.hibernate.hql.ast.ASTQueryTranslatorFactory.createQueryTranslator(ASTQueryTranslatorFactory.java:35)
      at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:72)
      at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:54)
      at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:71)
      at org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:134)
      at org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:113)
      at org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1602)
      at org.hibernate.ejb.AbstractEntityManagerImpl.createQuery(AbstractEntityManagerImpl.java:54)
      at org.jboss.ejb3.entity.InjectedEntityManager.createQuery(InjectedEntityManager.java:111)
      ...



        • 1. Re: ANTLRException no class def found
          Bill Burke Master

          well that sucks. Please log a JIRA task and I'll fix it in next release. You can find this jar in the JBoss AS dist.

          • 3. Re: ANTLRException no class def found
            Srinivasan l Newbie

            Hi , I am trying to use Hibernate 3 with jboss4.0 sp1 . I wrote all the required components but while running i get this exception
            java.lang.NoClassDefFoundError: antlr/ANTLRException
            at org.hibernate.hql.ast.ASTQueryTranslatorFactory.createQueryTranslator(ASTQueryTranslatorFactory.java:27)
            at org.hibernate.impl.SessionFactoryImpl.createQueryTranslators(SessionFactoryImpl.java:357)
            at org.hibernate.impl.SessionFactoryImpl.getQuery(SessionFactoryImpl.java:423)
            at org.hibernate.impl.SessionImpl.getQueries(SessionImpl.java:884)
            at org.hibernate.impl.SessionImpl.list(SessionImpl.java:834)
            at org.hibernate.impl.QueryImpl.list(QueryImpl.java:74)
            at com.ge.health.ecpi.hibernate.NamesdataService.getNamesdataList(NamesdataService.java:177)
            at org.apache.jsp.AddNamesData_jsp._jspService(AddNamesData_jsp.java:119)
            at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
            at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
            at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
            at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
            at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:75)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
            at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
            at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:66)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
            at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:150)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
            at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:54)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
            at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
            at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
            at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
            at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
            at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
            at java.lang.Thread.run(Thread.java:534)


            Where can i find this file .. and where i have to put it. I am new to jboss..

            • 4. Re: ANTLRException no class def found
              mazz Master

              Please search these forums and JIRA. You will find your answer in both places.

              • 5. Re: ANTLRException no class def found
                mazz Master

                Please search these forums and JIRA. You will find your answer in both places.