Announcement Announcement Module
Collapse
No announcement yet.
rare problem regarding with org.hibernate.hql.ast.QuerySyntaxException Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • rare problem regarding with org.hibernate.hql.ast.QuerySyntaxException

    org.hibernate.hql.ast.QuerySyntaxException: unexpected token: order near line 1, column 189 [ from nylip.tables.admin.ContestAwardCriteriaResultSumma ryTemp a WHERE a.contestId=1 and a.channelId=1 and a.levelId=1 and a.contestExtractionId=1 and (a.PC>=10) OR (a.AFYP>=1000000) OR order by PC desc, AFYP desc]
    at org.hibernate.hql.ast.ErrorCounter.throwQueryExcep tion(ErrorCounter.java:59)
    at org.hibernate.hql.ast.QueryTranslatorImpl.parse(Qu eryTranslatorImpl.java:244)
    at org.hibernate.hql.ast.QueryTranslatorImpl.doCompil e(QueryTranslatorImpl.java:155)
    at org.hibernate.hql.ast.QueryTranslatorImpl.compile( QueryTranslatorImpl.java:109)
    at org.hibernate.engine.query.HQLQueryPlan.(HQLQueryP lan.java:75)
    at org.hibernate.engine.query.HQLQueryPlan.(HQLQueryP lan.java:54)
    at org.hibernate.engine.query.QueryPlanCache.getHQLQu eryPlan(QueryPlanCache.java:71)
    at org.hibernate.impl.AbstractSessionImpl.getHQLQuery Plan(AbstractSessionImpl.java:134)
    at org.hibernate.impl.AbstractSessionImpl.createQuery (AbstractSessionImpl.java:113)
    at org.hibernate.impl.SessionImpl.createQuery(Session Impl.java:1602)
    at nylip.service.dao.hibernate3.ContestAwardCriteriaR esultSummaryTempDAOHibernate.getAllContestAwardSum marys(Unknown Source)
    at nylip.service.impl.ContestAwardCriteriaManagerImpl .findContestAwardSummarys(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.springframework.aop.support.AopUtils.invokeJoi npointUsingReflection(AopUtils.java:288)
    at org.springframework.aop.framework.ReflectiveMethod Invocation.invokeJoinpoint(ReflectiveMethodInvocat ion.java:181)
    at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :148)
    at org.springframework.transaction.interceptor.Transa ctionInterceptor.invoke(TransactionInterceptor.jav a:100)
    at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :170)
    at org.springframework.aop.framework.JdkDynamicAopPro xy.invoke(JdkDynamicAopProxy.java:176)
    at $Proxy71.findContestAwardSummarys(Unknown Source)
    at nylip.action.ShowContestDetailsAction.execute(Unkn own Source)
    at org.springframework.web.struts.DelegatingActionPro xy.execute(DelegatingActionProxy.java:106)
    at org.apache.struts.action.RequestProcessor.processA ctionPerform(RequestProcessor.java:431)
    at org.apache.struts.action.RequestProcessor.process( RequestProcessor.java:236)
    at org.apache.struts.action.ActionServlet.process(Act ionServlet.java:1196)
    at org.apache.struts.action.ActionServlet.doGet(Actio nServlet.java:414)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:697)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:810)
    at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:252)
    at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:173)
    at org.acegisecurity.util.FilterChainProxy$VirtualFil terChain.doFilter(FilterChainProxy.java:292)
    at org.acegisecurity.intercept.web.FilterSecurityInte rceptor.invoke(FilterSecurityInterceptor.java:108)
    at org.acegisecurity.intercept.web.SecurityEnforcemen tFilter.doFilter(SecurityEnforcementFilter.java:19 7)
    at org.acegisecurity.util.FilterChainProxy$VirtualFil terChain.doFilter(FilterChainProxy.java:303)
    at org.acegisecurity.ui.rememberme.RememberMeProcessi ngFilter.doFilter(RememberMeProcessingFilter.java: 154)
    at org.acegisecurity.util.FilterChainProxy$VirtualFil terChain.doFilter(FilterChainProxy.java:303)
    at org.acegisecurity.wrapper.SecurityContextHolderAwa reRequestFilter.doFilter(SecurityContextHolderAwar eRequestFilter.java:50)
    at org.acegisecurity.util.FilterChainProxy$VirtualFil terChain.doFilter(FilterChainProxy.java:303)
    at org.acegisecurity.context.HttpSessionContextIntegr ationFilter.doFilter(HttpSessionContextIntegration Filter.java:220)
    at org.acegisecurity.util.FilterChainProxy$VirtualFil terChain.doFilter(FilterChainProxy.java:303)
    at org.acegisecurity.util.FilterChainProxy.doFilter(F ilterChainProxy.java:173)
    at org.acegisecurity.util.FilterToBeanProxy.doFilter( FilterToBeanProxy.java:120)
    at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:202)
    at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:173)
    at org.springframework.orm.hibernate3.support.OpenSes sionInViewFilter.doFilterInternal(OpenSessionInVie wFilter.java:174)
    at org.springframework.web.filter.OncePerRequestFilte r.doFilter(OncePerRequestFilter.java:77)
    at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:202)
    at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:173)
    at nylip.web.filter.JAMonFilter.doFilter(Unknown Source)
    at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:202)
    at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:173)
    at org.springframework.web.filter.CharacterEncodingFi lter.doFilterInternal(CharacterEncodingFilter.java :78)
    at org.springframework.web.filter.OncePerRequestFilte r.doFilter(OncePerRequestFilter.java:77)
    at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:202)
    at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:173)
    at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doF ilter(ReplyHeaderFilter.java:96)
    at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:202)
    at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:173)
    at org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperValve.java:213)
    at org.apache.catalina.core.StandardContextValve.invo ke(StandardContextValve.java:178)
    at org.jboss.web.tomcat.security.SecurityAssociationV alve.invoke(SecurityAssociationValve.java:175)
    at org.jboss.web.tomcat.security.JaccContextValve.inv oke(JaccContextValve.java:74)
    at org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:126)
    at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:105)
    at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve .invoke(CachedConnectionValve.java:156)
    at org.apache.catalina.core.StandardEngineValve.invok e(StandardEngineValve.java:107)
    at org.apache.catalina.connector.CoyoteAdapter.servic e(CoyoteAdapter.java:148)
    at org.apache.coyote.http11.Http11Processor.process(H ttp11Processor.java:869)
    at org.apache.coyote.http11.Http11BaseProtocol$Http11 ConnectionHandler.processConnection(Http11BaseProt ocol.java:664)
    at org.apache.tomcat.util.net.PoolTcpEndpoint.process Socket(PoolTcpEndpoint.java:527)
    at org.apache.tomcat.util.net.MasterSlaveWorkerThread .run(MasterSlaveWorkerThread.java:112)
    at java.lang.Thread.run(Thread.java:595)
    Caused by: line 1:189: unexpected token: order
    at org.hibernate.hql.antlr.HqlBaseParser.negatedExpre ssion(HqlBaseParser.java:2425)
    at org.hibernate.hql.antlr.HqlBaseParser.logicalAndEx pression(HqlBaseParser.java:2331)
    at org.hibernate.hql.antlr.HqlBaseParser.logicalOrExp ression(HqlBaseParser.java:2306)
    at org.hibernate.hql.antlr.HqlBaseParser.expression(H qlBaseParser.java:2082)
    at org.hibernate.hql.antlr.HqlBaseParser.logicalExpre ssion(HqlBaseParser.java:1858)
    at org.hibernate.hql.antlr.HqlBaseParser.whereClause( HqlBaseParser.java:454)
    at org.hibernate.hql.antlr.HqlBaseParser.queryRule(Hq lBaseParser.java:708)
    at org.hibernate.hql.antlr.HqlBaseParser.selectStatem ent(HqlBaseParser.java:296)
    at org.hibernate.hql.antlr.HqlBaseParser.statement(Hq lBaseParser.java:159)
    at org.hibernate.hql.ast.QueryTranslatorImpl.parse(Qu eryTranslatorImpl.java:238)



    this is the error we are encountering, can somebody please help us do our error...

  • #2
    How is this related to Spring IDE and please use [ code][/code ] tags when posting!

    However as the error message indicates your query is wrong, it clearly identifies the location (line 1, column 189). Lets take a look....

    Code:
    from nylip.tables.admin.ContestAwardCriteriaResultSummaryTemp a 
    WHERE a.contestId=1 and a.channelId=1 and a.levelId=1 and a.contestExtractionId=1 and (a.PC>=10) OR (a.AFYP>=1000000) 
    OR order by PC desc, AFYP desc

    Comment

    Working...
    X