I have hibernate 3.0 and I have a HQL written as follows:-
<query name="product.deferral.servicesummary"><![CDATA[
select sum(begManualDeferral)
from ProductServiceDeferral
where profileFinancialId.profileId=? and profileFinancialId.fiscalPeriod=?
and profileFinancialId.offerType in('PRD_REV',''AS_REV','AST_REV')
]]>
</query>
My Mapping xml is like this :-
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="com.cisco.dms.rco.profile.model.ProductServiceDeferral" table="CCRM_REV_DEF_ROLL_FWD_VW">
<composite-id name="profileFinancialId" class="com.cisco.dms.rco.profile.model.ProfileFinancialId">
<key-property name="profileId">
<column name="PROFILE_ID"/>
</key-property>
<key-property name="offerType">
<column name="OFFER_TYPE"/>
</key-property>
<key-property name="fiscalPeriod">
<column name="FISCAL_PERIOD"/>
</key-property>
</composite-id>
<discriminator>
<column name="offer_type"/>
</discriminator>
<property name="begManualDeferral" type="double">
<column name="BEG_MANUAL_DEF"/>
</property>
<property name="begCurrencyEffect" type="double">
<column name="BEG_CURRENCY_EFFECT"/>
</property>
<property name="begBalance" type="double">
<column name="BEG_BALANCE"/>
</property>
<property name="begManualRelease" type="double">
<column name="BEG_MANUAL_REL"/>
</property>
<property name="begManualReserve" type="double">
<column name="BEG_MANUAL_RES"/>
</property>
<property name="begManualUsage" type="double">
<column name="BEG_MANUAL_USAGE"/>
</property>
<property name="begAPHDeferral" type="double">
<column name="BEG_AE_DEFERRAL"/>
</property>
<property name="begBalanceCogs" type="double">
<column name="BEG_BALANCE_COGS"/>
</property>
<property name="begManualDeferralCogs" type="double">
<column name="BEG_MANUAL_DEF_COGS"/>
</property>
<property name="begManualReleaseCogs" type="double">
<column name="BEG_MANUAL_REL_COGS"/>
</property>
<property name="begManualReserveCogs" type="double">
<column name="BEG_MANUAL_RES_COGS"/>
</property>
<property name="endBalance" type="double">
<column name="END_BALANCE_COGS"/>
</property>
<property name="firstDeferralBookDate" type="java.util.Date">
<column name="FIRST_DEFERRAL_BOOK_DATE"/>
</property>
<property name="firstReserveBookDate" type="java.util.Date">
<column name="FIRST_RESERVE_BOOK_DATE"/>
</property>
<property name="proposedBalance" type="double">
<column name="proposed_balance"/>
</property>
<property name="proposedBalanceCogs" type="double">
<column name="PROPOSED_BALANCE_COGS"/>
</property>
<property name="revTransBalance" type="double">
<column name="REV_TRANS_BALANCE"/>
</property>
<property name="begManualUsageCogs" type="double">
<column name="BEG_MANUAL_USAGE_COGS"/>
</property>
<property name="begAPHDeferralCogs" type="double">
<column name="BEG_AE_DEFERRAL_COGS"/>
</property>
<property name="aphDeferralCogs" type="double">
<column name="AE_DEFERRAL_COGS"/>
</property>
<property name="aphDeferral" type="double">
<column name="AE_DEFERRAL"/>
</property>
<property name="fx" type="double">
<column name="CURRENCY_EFFECT"/>
</property>
<property name="mrtaManualDeferral" type="double">
<column name="REV_TRANS_MANUAL_DEFERRAL"/>
</property>
<property name="mrtaManualRelease" type="double">
<column name="REV_TRANS_MANUAL_RELEASE"/>
</property>
<property name="mmaManualDeferral" type="double">
<column name="MANUAL_DEFERRAL"/>
</property>
<property name="mmaManualRelease" type="double">
<column name="MANUAL_RELEASE"/>
</property>
<property name="mmaManualReserve" type="double">
<column name="MANUAL_RESERVE"/>
</property>
<property name="mmaManualUsage" type="double">
<column name="MANUAL_USAGE"/>
</property>
<subclass name="com.cisco.dms.rco.profile.model.ProductRevenue" discriminator-value="PRD_REV">
</subclass>
<subclass name="com.cisco.dms.rco.profile.model.TSSCore" discriminator-value="TSS_REV">
</subclass>
<subclass name="com.cisco.dms.rco.profile.model.AsTransaction" discriminator-value="AST_REV">
</subclass>
<subclass name="com.cisco.dms.rco.profile.model.AsSubscription" discriminator-value="AS_REV">
</subclass>
</class>
<query name="product.deferral.productrevenue"><![CDATA[
from ProductServiceDeferral
where profileFinancialId.profileId=? and profileFinancialId.fiscalPeriod=?
]]>
</query>
<query name="product.deferral.servicesummary"><![CDATA[
select sum(begManualDeferral)
from ProductServiceDeferral
where profileFinancialId.profileId=? and profileFinancialId.fiscalPeriod=?
and profileFinancialId.offerType in('PRD_REV',''AS_REV','AST_REV')
]]>
</query>
</hibernate-mapping>
I am getting this exception :-
java.lang.NoSuchMethodError: org.hibernate.hql.antlr.HqlBaseParser.recover(Lantlr/RecognitionException;Lantlr/collections/impl/BitSet;)V
java.lang.NoSuchMethodError: org.hibernate.hql.antlr.HqlBaseParser.recover(Lantlr/RecognitionException;Lantlr/collections/impl/BitSet;)V
at org.hibernate.hql.antlr.HqlBaseParser.concatenation(HqlBaseParser.java:655)
at org.hibernate.hql.antlr.HqlBaseParser.relationalExpression(HqlBaseParser.java:2586)
at org.hibernate.hql.antlr.HqlBaseParser.equalityExpression(HqlBaseParser.java:2449)
at org.hibernate.hql.antlr.HqlBaseParser.negatedExpression(HqlBaseParser.java:2413)
at org.hibernate.hql.antlr.HqlBaseParser.logicalAndExpression(HqlBaseParser.java:2331)
at org.hibernate.hql.antlr.HqlBaseParser.logicalOrExpression(HqlBaseParser.java:2296)
at org.hibernate.hql.antlr.HqlBaseParser.expression(HqlBaseParser.java:2082)
at org.hibernate.hql.antlr.HqlBaseParser.compoundExpr(HqlBaseParser.java:3027)
at org.hibernate.hql.antlr.HqlBaseParser.inList(HqlBaseParser.java:2858)
at org.hibernate.hql.antlr.HqlBaseParser.relationalExpression(HqlBaseParser.java:2720)
at org.hibernate.hql.antlr.HqlBaseParser.equalityExpression(HqlBaseParser.java:2449)
at org.hibernate.hql.antlr.HqlBaseParser.negatedExpression(HqlBaseParser.java:2413)
at org.hibernate.hql.antlr.HqlBaseParser.logicalAndExpression(HqlBaseParser.java:2341)
at org.hibernate.hql.antlr.HqlBaseParser.logicalOrExpression(HqlBaseParser.java:2296)
at org.hibernate.hql.antlr.HqlBaseParser.expression(HqlBaseParser.java:2082)
at org.hibernate.hql.antlr.HqlBaseParser.logicalExpression(HqlBaseParser.java:1858)
at org.hibernate.hql.antlr.HqlBaseParser.whereClause(HqlBaseParser.java:454)
at org.hibernate.hql.antlr.HqlBaseParser.queryRule(HqlBaseParser.java:708)
at org.hibernate.hql.antlr.HqlBaseParser.selectStatement(HqlBaseParser.java:296)
at org.hibernate.hql.antlr.HqlBaseParser.statement(HqlBaseParser.java:159)
at org.hibernate.hql.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.java:248)
at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:157)
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.SessionFactoryImpl.checkNamedQueries(SessionFactoryImpl.java:400)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:351)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1218)
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:800)
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:726)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1059)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:363)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:269)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:320)
at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:134)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:184)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4343)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:823)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)
at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:277)
at org.apache.catalina.core.StandardHost.install(StandardHost.java:832)
at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:625)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:431)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:983)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:349)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
at org.apache.catalina.core.StandardService.start(StandardService.java:480)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)
at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)
Any pointers?
|