-->
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.  [ 5 posts ] 
Author Message
 Post subject: Help! unable to locate HQL query plan in cache; generating
PostPosted: Sat Mar 11, 2006 9:11 am 
Newbie

Joined: Sat Mar 11, 2006 8:55 am
Posts: 2
Hi I am new to Hibernate. I just started working with the tutorial which is supplied with the reference. While I was strictly following the steps mentioned in the tutorial. I am just struck up at one point while trying to list the events from the EVENTS table, which throws an unDeclaredException and gives me a message as follows:
[java] 20:45:25,031 DEBUG QueryPlanCache:69 - unable to locate HQL query plan in cache; generating (from Event)
[java] java.lang.reflect.UndeclaredThrowableException


The method I have written for listing events is as follows:
Code:
private List listEvents(){
        Session session = HibernateUtil.getSessionFactory().getCurrentSession();
        session.beginTransaction();       

        List result = session.createQuery("from Event").list();   
       
        session.getTransaction().commit();
       
        return result;
    }


I am using Hibernate 3.0 and the database I am using is MySQL 5.0.

Can anyone explain me why I couldnt list out the events and help me in resolving this issue. Please Help me!


Top
 Profile  
 
 Post subject: More info...
PostPosted: Sat Mar 11, 2006 11:36 am 
Beginner
Beginner

Joined: Mon Mar 14, 2005 6:07 pm
Posts: 36
Do you get a stack trace? If yes, could you post the entire stack? It's very hard to tell what's going on without it.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Mar 11, 2006 3:32 pm 
Newbie

Joined: Sat Mar 11, 2006 8:55 am
Posts: 2
Dear friend, I got the solution. It was actually throwing some NoClassDefFoundError. I just included all the jars in the hibernate/lib folder and I got it running. But I have to figure out which exact jar file was missing. Coz I already included all the jars specified in the reference/tutorial. Would come back soon with the stack trace and with the class that was required.

Thanks again for your response.


Top
 Profile  
 
 Post subject: See the README.txt file in the lib/ directory
PostPosted: Thu Mar 23, 2006 1:35 pm 
Newbie

Joined: Thu Mar 23, 2006 1:10 pm
Posts: 1
Location: London
I had a similar problem which your blunderbus solution solved. If I had paid more attention to what it said in the tutorial I could have saved myself some pain...

gerry


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 31, 2006 7:32 pm 
Newbie

Joined: Thu Aug 31, 2006 7:29 pm
Posts: 1
Hello,

I faced the same problem and when i added antlr-2.7.6rc1.jar from hibernate/lib , the code worked as is.

sreekon.


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

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:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.