-->
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.  [ 3 posts ] 
Author Message
 Post subject: concreteQueries() in QueryTranslator.java - class load prob.
PostPosted: Tue Oct 07, 2003 1:08 pm 
Newbie

Joined: Tue Oct 07, 2003 12:36 pm
Posts: 1
It seems like the concreteQueries(...) method in QueryTranslator.java is trying to load classes of values specified in the IN(...) clause and sometimes even trying to load table columns as classes.

We have queries with potentially huge IN clauses for ex:

SELECT user.firstName
WHERE user.userID IN (1,2,3,4,5,6,7,8,9,15,20,30,50,100,.....1001)

What ends up happening is that concreteQueries(..) somehow thinks that the ID values in the IN clause are actually class names and so it tries to load them. It tries to load a class of name '1', then tries to load a class of name '2',....'1001'. This has couple of implications:

1. Huge performance penalty. Not only is it trying to load potentially tens if not hundreds of invalid classes, the problem gets compounded by the fact that each class load is attempted twice - once with the catalina class loader and the other with the JVM class loader in the catch block.

2. Unfortuately these ClassNotFoundExceptions are not logged, so it makes it a harder problem to find. You can test this problem out by putting output messages in the concreteQueries(...) to print out the exceptions.

3. A related but less major point is that we see this problem with the columns in the ORDER BY clauses also. It tries to load a class with the <column-name>.

Is this a parsing bug in concreteQueries? Has anybody seen this problem before? This behavior is one of the major performance bottlenecks for us.

Any response would be highly appreciated. Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 07, 2003 3:45 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
This is a known problem and there is an issue in JIRA.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 08, 2003 3:21 pm 
Beginner
Beginner

Joined: Wed Aug 27, 2003 4:17 pm
Posts: 27
Location: California, USA
There's a patch that mitigates this problem, in JIRA HB-379 <http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-379>.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.