-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 
Author Message
 Post subject: org.springframework.orm.hibernate3.HibernateQueryException:
PostPosted: Fri Sep 14, 2007 8:54 am 
Newbie

Joined: Thu May 18, 2006 6:36 am
Posts: 11
Location: Bangalore
Hi ,

I am getting the following exception when executing a query sometimes ,


Code:
ea83ba7 SystemErr     R org.springframework.orm.hibernate3.HibernateQueryException: unexpected end of subtree []; nested exception is org.hibernate.hql.ast.QuerySyntaxException: unexpected end of subtree []
[9/14/07 18:08:46:664 IST]  ea83ba7 SystemErr     R Caused by: org.hibernate.hql.ast.QuerySyntaxException: unexpected end of subtree []
   at org.hibernate.hql.ast.QuerySyntaxException.convert(QuerySyntaxException.java:31)
   at org.hibernate.hql.ast.QuerySyntaxException.convert(QuerySyntaxException.java:24)
   at org.hibernate.hql.ast.ErrorCounter.throwQueryException(ErrorCounter.java:59)
   at org.hibernate.hql.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:235)
   at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:160)
   at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:111)
   at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:77)
   at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:56)
   at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:72)
   at org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:133)
   at org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:112)
   at org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1623)
   at org.springframework.orm.hibernate3.HibernateTemplate$29.doInHibernate(HibernateTemplate.java:837)
   at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:367)
   at org.springframework.orm.hibernate3.HibernateTemplate.find(HibernateTemplate.java:835)
   at org.springframework.orm.hibernate3.HibernateTemplate.find(HibernateTemplate.java:827)
   at com.pyramis.pcrui.dao.PCRReportDAOImpl.getFilterByDet(PCRReportDAOImpl.java:141)
   at com.pyramis.pcrui.action.PCRAllRptsAction.populateFilter(PCRAllRptsAction.java:166)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled Code))
   at java.lang.reflect.Method.invoke(Method.java(Compiled Code))
   at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:270)
   at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:187)
   at com.pyramis.pcrui.common.PCRBaseAction.execute(PCRBaseAction.java:87)
   at org.springframework.web.struts.DelegatingActionProxy.execute(DelegatingActionProxy.java:106)
   at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:438)
   at com.fmr.struts.action.FMRBaseRequestProcessor.processActionPerform(FMRBaseRequestProcessor.java:190)
   at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:237)
   at com.fmr.struts.action.FMRBaseActionServlet.doProcess(FMRBaseActionServlet.java:136)
   at com.fmr.struts.action.FMRBaseActionServlet.process(FMRBaseActionServlet.java:102)
   at fmtc.web.struts.action.FWEBActionServlet.process(FWEBActionServlet.java:73)
   at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
   at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
   at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
   at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
   at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
   at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
   at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
   at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:76)
   at com.fmtc.common.filter.URLProcessingFilter.doFilter(URLProcessingFilter.java:174)
   at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:132)
   at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:71)
   at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:974)
   at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:564)
   at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:200)
   at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:119)
   at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:276)
   at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
   at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:182)
   at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
   at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
   at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:618)
   at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
   at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:672)



The query is as follows,


Code:
Select distinct pycis.cibsDiscCodeC ,pycis.cibsDiscNmC  from PCRPycisBean as pycis


What might be the cause for this.

Thanks,
Rohit


Top
 Profile  
 
 Post subject:
PostPosted: Sun Sep 16, 2007 3:02 pm 
Beginner
Beginner

Joined: Tue Aug 16, 2005 3:44 pm
Posts: 33
Hi!

Can you please post the hibernate mapping for PCRPycisBean?


-Kaj :)


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 17, 2007 1:15 am 
Newbie

Joined: Thu May 18, 2006 6:36 am
Posts: 11
Location: Bangalore
This is the mapping file for PCRPycisBean,

Quote:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<!--
Mapping file autogenerated by MyEclipse - Hibernate Tools
-->
<hibernate-mapping>
<class name="com.pyramis.pcrui.beans.PCRPycisBean" table="V_PYCIS_DWH_ACCT" schema="PCR">
<id name="instnIdN" type="java.lang.Long">
<column name="INSTN_ID_N" precision="12" scale="0" />
<generator class="assigned" />
</id>
<property name="instnNmC" type="java.lang.String">
<column name="INSTN_NM_C" length="250" />
</property>
<property name="tmplTypeLvl1c" type="java.lang.String">
<column name="TMPL_TYPE_LVL_1_C" length="250" not-null="true"/>
</property>
<property name="tmplTypeLvl2c" type="java.lang.String">
<column name="TMPL_TYPE_LVL_2_C" length="250" not-null="true" />
</property>
<property name="tmplTypeLvl3c" type="java.lang.String">
<column name="TMPL_TYPE_LVL_3_C" length="2000" not-null="true" />
</property>
<property name="dwsAcctId" type="java.lang.Long">
<column name="DWS_ACCT_ID" precision="12" scale="0" />
</property>
<property name="cibsAcctNumN" type="java.lang.Long">
<column name="CIBS_ACCT_NUM_N" precision="12" scale="0" />
</property>
<property name="qimdPortfNumC" type="java.lang.String">
<column name="QIMD_PORTF_NUM_C" length="250" scale="0" />
</property>
<property name="cibsDiscNmC" type="java.lang.String">
<column name="CIBS_DISC_NM_C" length="50" />
</property>
<property name="cibsDiscCodeC" type="java.lang.String">
<column name="CIBS_DISC_CODE_C" length="30" />
</property>
<property name="cibsSubdiscCodeC" type="java.lang.String">
<column name="CIBS_SUBDISC_CODE_C" length="50" />
</property>
<property name="cibsSubdiscNmC" type="java.lang.String">
<column name="CIBS_SUBDISC_NM_C" length="50" />
</property>
<property name="cibsStrucCodeC" type="java.lang.String">
<column name="CIBS_STRUC_CODE_C" length="50" />
</property>
<property name="qimdStrucCodeC" type="java.lang.String">
<column name="QIMD_STRUC_CODE_C" length="50" />
</property>
<property name="imBrandCodeC" type="java.lang.String">
<column name="IM_BRAND_CODE_C " length="50" />
</property>
<property name="asapAcctNmC" type="java.lang.String">
<column name="ASAP_ACCT_NM_C" length="50" />
</property>
<property name="asapAcctNumN" type="java.lang.Long">
<column name="ASAP_ACCT_NUM_N" precision="17" scale="0" />
</property>

</class>
</hibernate-mapping>


Thanks,
Rohit


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 17, 2007 1:42 am 
Beginner
Beginner

Joined: Tue Aug 16, 2005 3:44 pm
Posts: 33
Looks ok.

Have you tried upgrading to the lastest version of hibernate?

What happends if you try

Code:
Select distinct pycis from PCRPycisBean as pycis

or

Code:
Select pycis from PCRPycisBean as pycis


Does these queries work ok?


-Kaj :)


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 17, 2007 2:32 am 
Expert
Expert

Joined: Tue Jan 30, 2007 12:45 am
Posts: 283
Location: India
try with out as after from .Not sure

Code:
Select distinct pycis.cibsDiscCodeC ,pycis.cibsDiscNmC  from PCRPycisBean pycis

_________________
Dharmendra Pandey


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.