Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Object Relational Mapping
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Tim Cooke
Campbell Ritchie
paul wheaton
Jeanne Boyarsky
Ron McLeod
Sheriffs:
Paul Clapham
Devaka Cooray
Saloon Keepers:
Tim Holloway
Carey Brown
Piet Souris
Bartenders:
Forum:
Object Relational Mapping
Getting exception on hibernate named query ...
Sonx Nkuks
Ranch Hand
Posts: 47
posted 13 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
i have the following named query ...
<sql-query name="RunTaskOverrideItemSummary"> <return alias="RunTaskOverrideItemSummary" class="co.test.domain.RunTaskOverrideItemSummaryDo" lock-mode="none"> <return-property name="runNumber" column="runNumber"/> <return-property name="runWorkUnitNumber" column="runWorkUnitNumber"/> <return-property name="runTaskNumber" column="runTaskNumber"/> <return-property name="workUnitName" column="workUnitName"/> <return-property name="taskName" column="taskName"/> <return-property name="overrideItemCount" column="overrideItemCount"/> <return-property name="runStatusCode" column="runStatusCode"/> <return-property name="runTaskStatusCode" column="runTaskStatusCode"/> <return-property name="runStartDate" column="runStartDate"/> <return-property name="runEndDate" column="runEndDate"/> <return-property name="isListItemApplicable" column="isListItemApplicable"/> </return> <![CDATA[select max(br.startdate) as runStartDate, br.runid as runNumber, max(brwu.workunitname) as workUnitName, max(brt.taskname) as taskName, count(rtoli.runtaskoverridelistitemid) as overrideItemCount, case when max(t.TaskEngineLimit) >= 1 then 1 else 0 end as isListItemApplicable, brt.runtaskid as runTaskNumber, max(br.StatusCode) as runStatusCode, max(brt.statusCode) as runTaskStatusCode, max(brwu.runWorkUnitID) as runWorkUnitNumber, max(br.enddate) as runEndDate from batchrun br inner join batchrunworkunit brwu on brwu.runid = br.runid --and br.statuscode = 0 -- Must be not started. inner join batchruntask brt on brt.runworkunitid = brwu.runworkunitid inner join Task t on t.TaskName = brt.TaskName and t.TaskType = 2 left join runtaskoverridelistitem rtoli on rtoli.runtaskid = brt.runtaskid group by br.runid, brwu.runworkunitid, brt.runtaskid order by max(br.startdate), br.runid, max(brwu.SequenceNo), max(brwu.workunitname), max(brt.TaskName), brt.RunTaskID ]]> </sql-query>
i get
EJB threw an unexpected (non-declared) exception during invocation of method "retrieveRunTaskOverrideSummary" on bean "BeanId(EpsilonPlanComponentApp#EpsilonPlanComponentEJB.jar#BatchOverrideManagerBean, null)". Exception data: za.co.sanlam.common.exception.SystemException: CMNDA0001E: A data access system exception has occured. Implementation: Hibernate. Cause: org.hibernate.HibernateException: Errors in named queries: RunTaskOverrideItemSummary at co.test.common.exception.ExceptionUtils.createHibernateSystemException(ExceptionUtils.java:210) at co.test.common.exception.ExceptionUtils.createHibernateSystemException(ExceptionUtils.java:183) at co.test.dao.hibernate.BatchOverrideDaoHibernate.getRunTaskOverrideSummary(BatchOverrideDaoHibernate.java:115) at co.tes.business.BatchOverrideBo.retrieveRunTaskOverrideSummary(BatchOverrideBo.java:72) at co.test.service.batchoverridemanager.BatchOverrideManagerServiceImpl.retrieveRunTaskOverrideSummary(BatchOverrideManagerServiceImpl.java:132) at co.test.service.batchoverridemanager.ejb.BatchOverrideManagerBean.retrieveRunTaskOverrideSummary(BatchOverrideManagerBean.java:116) ....................... ....................... .......................
This happens when hibernate gets the currentSussion
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Problems in Hibernate executing stored procedure
could not read column value from result set: IS6_32_0_; Invalid column name
Stored proc calling exception: org hibernate MappingException: Unknown entity:
named sql-query dilema
inner join not working !!! please help
More...