Hi ,
I am encountering the error when trying to select records .
Hibernate version:
3.1.3
Mapping documents:
The document is saved as subsequence.hbm.xml in the config sub-directory of the application .
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"config\hibernate-mapping-3.0.dtd">
<hibernate-mapping >
<class name="com.trx.ccas.vo.MatrixSubSequenceVO" table="subsequence" >
<id name="subId" column="SubmissionID">
</id>
<property name="dateEntered" column="DateEntered"/>
</class>
</hibernate-mapping>
Code between sessionFactory.openSession() and session.close():
Collection coll= session.createQuery("from com.trx.ccas.vo.MatrixSubSequenceVO").list();
(trying using MatrixSubSequenceVO but in vain).
Full stack trace of any exception that occurs:
ava.lang.reflect.UndeclaredThrowableException: java.lang.reflect.InvocationTargetException: java.lang.NoSuchMethodError
at org.hibernate.hql.ast.SqlGenerator$DefaultWriter.clause(SqlGenerator.java:170)
at org.hibernate.hql.ast.SqlGenerator.out(SqlGenerator.java:44)
at org.hibernate.hql.antlr.SqlGeneratorBase.selectStatement(SqlGeneratorBase.java:166)
at org.hibernate.hql.antlr.SqlGeneratorBase.statement(SqlGeneratorBase.java:117)
at org.hibernate.hql.ast.QueryTranslatorImpl.generate(QueryTranslatorImpl.java:203)
at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:178)
at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:109)
at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:75)
at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:54)
at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:71)
at org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:133)
at org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:112)
at org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1583)
at java.lang.reflect.Method.invoke(Native Method)
at org.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:301)
at $Proxy0.createQuery(Unknown Source)
Name and version of the database you are using:
MYSQL
The generated SQL (show_sql=true):
Debug level Hibernate log excerpt:
ERROR
JDK -1.3.1
Thanks ,
Arun
|