Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/mysql/63.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 在此结果集中找不到列名x,并且org.hibernate.exception.sqlgrammareexception:无法执行查询_Java_Mysql_Spring_Hibernate - Fatal编程技术网

Java 在此结果集中找不到列名x,并且org.hibernate.exception.sqlgrammareexception:无法执行查询

Java 在此结果集中找不到列名x,并且org.hibernate.exception.sqlgrammareexception:无法执行查询,java,mysql,spring,hibernate,Java,Mysql,Spring,Hibernate,尝试使用NamedQuery获取列表时出现此异常: org.hibernate.exception.SQLGrammarException: could not execute query. In detail it shows that org.nic.eoffice.mis.core.service.ServiceException: org.nic.eoffice.mis.core.service.ServiceException: org.nic.eoffice.mis.dao.

尝试使用NamedQuery获取列表时出现此异常:

org.hibernate.exception.SQLGrammarException: 
could not execute query. In detail it shows that 
org.nic.eoffice.mis.core.service.ServiceException: 
org.nic.eoffice.mis.core.service.ServiceException: 
org.nic.eoffice.mis.dao.DAOException: 
org.springframework.dao.InvalidDataAccessResourceUsageException: could not 
execute query; SQL [{? = call kermis_monthlyreport(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)}]; 
nested exception is org.hibernate.exception.SQLGrammarException: could not execute query
同时还存在另一个错误:在此结果集中找不到列名count11

{@SqlResultSetMapping(name = "MonthlyBuisinesModel", entities =                                                                    @EntityResult(entityClass org.nic.eoffice.mis.efile.model.MonthlyBuisinesModel.class))
@NamedNativeQueries({

@NamedNativeQuery(name = "findMonthlyReportModel", query = "{? = call        kermis_monthlyreport(:postdetailid, :fromDate, :toDate, :nature, :department,   :office, :userName, :typeId, :filterQuery, :orderQuery, :startIndex,    :maxResults)}", resultSetMapping = "MonthlyBuisinesModel", callable = true) })}
然后创建名为MonthlyBuisinesModel的类来存储结果集。 使用属性页传递输入参数。
请提供此异常的解决方案。

异常会告诉您第一个
的错误是什么?使用?在属性页中给出了查询的概念。name=findMonthlyReportModel query.isCallable=true query.entity=org.nic.eoffice.mis.efile.model.MonthlyBuisinesModel input.model=org.nic.eoffice.mis.efile.model.monthlybuisinesinputmodels请帮助我解决这个问题我没有得到这个问题