javahql语句错了 不知道那个地方错了

问题描述

org.hibernate.hql.ast.QuerySyntaxException:CLAIM_VOUCHERisnotmapped[selectsum(c.TOTAL_ACCOUNT),c.CREATE_SNfromCLAIM_VOUCHERcwherec.status='已付款'andto_char(c.create_time,'yyyy-MM')=?groupbyc.create_sn]atorg.hibernate.hql.ast.util.SessionFactoryHelper.requireClassPersister(SessionFactoryHelper.java:158)atorg.hibernate.hql.ast.tree.FromElementFactory.addFromElement(FromElementFactory.java:87)atorg.hibernate.hql.ast.tree.FromClause.addFromElement(FromClause.java:71)atorg.hibernate.hql.ast.HqlSqlWalker.createFromElement(HqlSqlWalker.java:295)atorg.hibernate.hql.antlr.HqlSqlBaseWalker.fromElement(HqlSqlBaseWalker.java:3228)atorg.hibernate.hql.antlr.HqlSqlBaseWalker.fromElementList(HqlSqlBaseWalker.java:3112)atorg.hibernate.hql.antlr.HqlSqlBaseWalker.fromClause(HqlSqlBaseWalker.java:720)atorg.hibernate.hql.antlr.HqlSqlBaseWalker.query(HqlSqlBaseWalker.java:571)atorg.hibernate.hql.antlr.HqlSqlBaseWalker.selectStatement(HqlSqlBaseWalker.java:288)atorg.hibernate.hql.antlr.HqlSqlBaseWalker.statement(HqlSqlBaseWalker.java:231)atorg.hibernate.hql.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:231)atorg.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:162)atorg.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:113)atorg.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:77)atorg.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:56)atorg.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:72)atorg.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:133)atorg.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:112)atorg.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1624)atcom.dao.DepartClaimDAO.add(DepartClaimDAO.java:184)atcom.service.impl.DepartClaimBizImpl.yyfindAll(DepartClaimBizImpl.java:28)atsun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)atsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)atsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)atjava.lang.reflect.Method.invoke(Method.java:597)atorg.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:318)atorg.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)atorg.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)atorg.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)atorg.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)atorg.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:90)atorg.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)atorg.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)at$Proxy7.yyfindAll(UnknownSource)atcom.web.DepartClaimAction.add(DepartClaimAction.java:50)atsun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)atsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)atsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)atjava.lang.reflect.Method.invoke(Method.java:597)atcom.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:450)atcom.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:289)atcom.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:252)atorg.apache.struts2.interceptor.DeprecationInterceptor.intercept(DeprecationInterceptor.java:41)atcom.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)atorg.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:256)atcom.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)atcom.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:167)atcom.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)atcom.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)atcom.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:265)atorg.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)atcom.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)atcom.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)atcom.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:138)atcom.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)atcom.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:249)atcom.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)atcom.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)atcom.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:249)atcom.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)atcom.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)atcom.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:191)atcom.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)atorg.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:73)atcom.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)atorg.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:91)atcom.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)atorg.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:252)atcom.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)atcom.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:100)atcom.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)atcom.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:141)atcom.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)atcom.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:145)atcom.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)atcom.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:171)atcom.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)atcom.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)atcom.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:139)atcom.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)atorg.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)atcom.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)atcom.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:193)atcom.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)atcom.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:189)atcom.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)atorg.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:54)atorg.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:562)atorg.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)atorg.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:99)atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)atorg.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)atorg.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)atorg.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)atorg.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)atorg.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)atorg.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)atorg.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)atorg.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)atorg.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)atorg.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)atorg.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)atjava.lang.Thread.run(Thread.java:619)

解决方案

解决方案二:
CLAIM_VOUCHER换成实体类名称
解决方案三:
1、表CLAIM_VOUCHER对应的实体类是否也是这个名字2、hql语句除了关键字都是区分大小写的,保证查询的字段与相应数据表中映射列大小一致

时间: 2025-01-31 10:46:59

javahql语句错了 不知道那个地方错了的相关文章

c语言-我想用定时和外部中断写一个小车避障程序,可是不知道哪里错了,求解答

问题描述 我想用定时和外部中断写一个小车避障程序,可是不知道哪里错了,求解答 5C #include#include#define uint unsigned int#define uchar unsigned charsbit echo=P3^2;sbit trig=P2^3;unsigned char stime; void PWM_zk0(float zk) //高电 平占得比例占空比为(Gao/255){ CCAP0H = CCAP0L =255*(100.0 - zk)/100.0;

c++ 内存问题 找了好久都不知道呢错了

问题描述 c++ 内存问题 找了好久都不知道呢错了 #include<iostream> using namespace std; struct Node { float coef;//系数 int expn;//指数 Node* next; }; class Ploy { public: Ploy(); ~Ploy(); void CreatePloy(int n); void DispPloy(); void PloyAdd(Ploy b); Node* GetNode() { retur

javascript-初学者, 不知道哪里错了 求指点 谢谢 不怕嘲笑 不怕讽刺 只求进步

问题描述 初学者, 不知道哪里错了 求指点 谢谢 不怕嘲笑 不怕讽刺 只求进步 <br> var i = 2;</p><pre><code> while ( i<101) { var arr=[]; for (var a = 2; a < =i;a++) { if (i%a==0) { arr.push(0); } } if (arr.length==1) { document.write(i); } document.write("&

在html 5中加视...-不知道哪里错了,就是不成功

问题描述 不知道哪里错了,就是不成功 在notepad里输入的,文件的格式也转换的对,但是试了好多次,就是无法在谷歌浏览器里播放视频 ,求大神指点 解决方案 换ie或者火狐 解决方案二: 试试其他浏览器,看看行不行 解决方案三: 你试下加个html5media.min.js

我的程序哪里错了?-shell中程序调试问题 不知道哪错了 求解答

问题描述 shell中程序调试问题 不知道哪错了 求解答 #!/bin/bashfunction a {read -p ""input: "" valueecho -n ""doubling the value ""return $[ $value * 2 ]} aecho ""the new value is $?"" 我想让输入的数的两倍大于255时,程序输出的值为1如果我输入的数的

java-新手问题:想用加强的for循环 但是编译不过 不知道哪里错了

问题描述 新手问题:想用加强的for循环 但是编译不过 不知道哪里错了 public class test { public static void main(String[] args) { int[] s = new int[10]{1,2,3,4,5,6,7,8,9,10}; for(int i:s) { System.out.println(i); } } } 解决方案 int[] s = new int[10]{1,2,3,4,5,6,7,8,9,10};这个写法是不合理的,要么int

c++-进程调度 计算平均周转时间 第一次提问真的是不知道哪儿错了 感觉逻辑正确啊

问题描述 进程调度 计算平均周转时间 第一次提问真的是不知道哪儿错了 感觉逻辑正确啊 #include ""stdio.h"" typedef struct p { int id; char name; int atime;//到达时间 int stime;//服务时间 int rstime;//已经服务时间 int pri;//优先级 int t;//周转时间 float ts; int flag; }pcb;main(){void fcfs(pcb p[5]);

c语言-杭电oj 2014题 代码不对 不知道哪里错了

问题描述 杭电oj 2014题 代码不对 不知道哪里错了 偶数求和 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 65195 Accepted Submission(s): 27929 Problem Description 有一个长度为n(n<=100)的数列,该数列定义为从2开始的递增有序偶数,现在要求你按照顺序每m个数求出一个平均值,

HDU4561 一直WA 不知道哪里错了 跪求提示 java版 不想直接拿答案谢谢

问题描述 HDU4561 一直WA 不知道哪里错了 跪求提示 java版 不想直接拿答案谢谢 package arithmetic; import java.util.Scanner; public class Main { public static int maxProduct(int[] list,int start,int end){ int sum=0;//记录数组中-2的个数[start,end) if(start==end||start+1==end){ return 0; } f