-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Exception help needed
PostPosted: Thu Jun 23, 2005 2:44 am 
Newbie

Joined: Tue Jun 21, 2005 6:18 am
Posts: 4
Location: Kerala-India
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate 3.0



public static void deleteOldestresource(int user_id)
{
Date min_date = null;
List list = new ArrayList();
Session session;
Query query1, query2;
try
{
HibernateUtil.beginTransaction();
session = HibernateUtil.getSession();
query1 = session.createQuery(HQL_SELECT_OLDEST_RESOURCE);
query1.setParameter("user_id", Integer.toString(user_id), Hibernate.STRING);
list = query1.list();
min_date = (Date)list.get(0);

query2 = session.createQuery(HQL_DELETE_OLDEST_RESOURCE);
query2.setParameter("user_id", Integer.toString(user_id), Hibernate.STRING);
query2.setParameter("min_date", min_date, Hibernate.DATE);
System.out.println("BEFORE QUERY 2 ="+query2);
query2.list();
System.out.println("AFTER QUERY 2 ="+query2);
HibernateUtil.commitTransaction();
HibernateUtil.closeSession();
}
catch(HibernateException he)
{
System.out.println("Hibernate Exception"+ he);
}
}


6150 [http-8080-Processor25] ERROR hql.parser - *** ERROR: <AST>:0:0: unexpected end of subtree
6158 [http-8080-Processor25] ERROR hql.parser - *** ERROR: <AST>:0:0: unexpected end of subtree


Name and version of the database you are using:

The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.