日期:2014-05-18  浏览次数:20741 次

查询HQL 出错 未执行的语句句柄
HQL 为
 
FROM PunishNotice WHERE billState <>'删除'  ORDER BY  CODENUMBER desc


具体异常信息

[QC] ERROR [http-bio-8080-exec-7] org.slf4j.impl.JCLLoggerAdapter.error(454) | 未执行语句句柄
 org.apache.jasper.JasperException:根据HQL语句[FROM PunishNotice WHERE billState <>'删除'  ORDER BY  CODENUMBER desc]查询对象时出错

Caused by: org.springframework.jdbc.UncategorizedSQLException: Hibernate operation: could not execute query; uncategorized SQLException for SQL [select punishnoti0_.innerId as innerId121_, punishnoti0_.classId as classId121_, punishnoti0_.codeNumber as codeNumber121_, punishnoti0_.fillDate as fillDate121_, punishnoti0_.punishedNotice as punished5_121_, punishnoti0_.isPublish as isPublish121_, punishnoti0_.billState as billState121_, punishnoti0_.workFlowStatus as workFlow8_121_, punishnoti0_.fillerDeptId as fillerDe9_121_, punishnoti0_.fillerDeptClassId as fillerD10_121_, punishnoti0_.fillerId as fillerId121_, punishnoti0_.fillerClassId as fillerC12_121_, punishnoti0_.punishedCodeId as punishe13_121_, punishnoti0_.punishedCodeClassId as punishe14_121_ from PunishNotice punishnoti0_ where punishnoti0_.billState<>'删除' order by CODENUMBER desc]; SQL state [null]; error code [17144]; 未执行语句句柄; nested exception is java.sql.SQLException: 未执行语句句柄
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:83)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
at org.springframework.orm.hibernate3.HibernateAccessor.convertJdbcAccessException(HibernateAccessor.java:424)
at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:410)
at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:411)
at org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:374)

... 49 more
Caused by: java.sql.SQLException: 未执行语句句柄
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:208)
at oracle.jdbc.driver.T4CPreparedStatement.doDescribe(T4CPreparedStatement.java:733)
at oracle.jdbc.driver.OracleStatement.getColumnIndex(OracleStatement.java:3285)
at oracle.jdbc.driver.OracleResultSetImpl.findColumn(OracleResultSetImpl.java:1914)
at oracle.jdbc.driver.OracleResultSet.getString(OracleResultSet.java:1515)
at org.hibernate.persister.en