Win a copy of Modern JavaScript for the Impatient this week in the Server-Side JavaScript and NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

utterly stumped - HQL query stalls program

 
Ranch Hand
Posts: 141
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Greetings all,

I've used Eclipse to create a Spring/Hibernate standalone desktop GUI app whose behavior has got me buffaloed - it stalls with no error messages when it hits an HQL query statement in a DAO method.

UserDAOHibernate.java


and the relavent parts of my stripped-down app. All it does is accept two string values and has two Login buttons.
Each calls validateAgainstDB which in turn calls the the DAO's validateIt method.



executing opens the GUI just fine, I fill in the username and password, click the LoginA button , validateAgainstDB gets called, UserDAOHibernate.validateIt gets called,
"got to A" gets printed then the program stalls on line 46. No error msgs, nothing, like an infinite wait-state. Commenting out lines 46-62 and forcing
out_bool = true at the top of the method allows the program to work perfectly.

So I am at a loss - how could this be happening, and how do I debug something when there's no messages or errors thrown?

TIA,

Still-learning Steve


 
Stuart Rogers
Ranch Hand
Posts: 141
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm so frustrated with this that I'm willing to put some cold hard cash out to get it solved - if you live within 30mi of Arizona State University, we can meet someplace , I'll bring my laptop and if you can get this thing working it's worth USD50.00 .

Or if you're further away but still want a crack at it, I could zip up some scripts and send it to you. You'd have to create a User table and populate it with one row, the adjust a properties file to point to your database.

Thanks,

Still-stumped Steve
 
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Steve,

not sure why this absurd behavior. But i'd like to give it a try, send me the necessary files so that i can test it here locally.
komalrenu@gmail.com

Thanks and Regards,
-------------------------------------------------------------------------------------
Komal Renu | krenu@infocepts.com | www.infocepts.com
-------------------------------------------------------------------------------------
 
Ranch Hand
Posts: 218
Hibernate Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could do the following to get some more information on cause
1.) Take thread dump when the application is stalled. It will tell you the exact piece of code/line causing the problem.
2.) Enable show sql in Hibernate, it will output the HQL along with the generted SQL. You could execute the SQL to check if the SQL is causing issues.

How much data is there in the user table ?
 
Stuart Rogers
Ranch Hand
Posts: 141
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I can try grabbing a thread-dump. Stalling *seems* to occur when the Query is built. But it's a very simple HQL query, of a form I've used dozens of times before. I feel the stalling is transaction/thread related .

I will try turning on "show sql" and look at the *real* generated SQL statement - perhaps there's something hinky happening because this table is called User/users.

Thanks for your help!

Regards,

Still-learning Steve
 
Ranch Hand
Posts: 662
Eclipse IDE Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you post your configuration files?
 
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic