Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

MYSQL Dialect problem

843844Dec 13 2007 — edited Dec 14 2007
Hi all,
I am getting exception while tyring to use Aggregate function as
follows in Hibernate3.0.
String SQL_QUERY = "select SUM(creation_date) from
customer_account";

SessionFactory sessionFactory = HibernateUtil.getSessionFactory();
Session session = sessionFactory.openSession();
Query query = session.createSQLQuery(SQL_QUERY);

Configuration Details:
************************
I am using Hibernate3.0 with MYSql Database.

<!-- SQL dialect -->
<property name="dialect">org.hibernate.dialect.MySQLDialect</property>
<property name="dialect">org.hibernate.dialect.MySQLInnoDBDialect</property>
<property name="dialect">org.hibernate.dialect.MySQLMyISAMDialect</property>

Exception Got:
*****************
SQLException.

Note:
******
I am able run this query successfully when i dont use Aggregate function.

Pls Help me regarding this dialect problem.

Thanks in Advance,
sundar.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 11 2008
Added on Dec 13 2007
1 comment
234 views