• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Newbie : Unable to Fetch Data From MySQL using Hibernate

 
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have been working with Hibernate only a short period of time. I have gotten my database model up and running and I have generated all the classes using the tools from MyEclipse. I have been successful in storing and retrieving data to the main object/table. I have written a Junit test to accomplish this action. Now I have moved on to the second table. In this table I have one attribute as a LONGTEXT datatype (XML Doucment). I have mapped this attribute as described in the Hibernate documentation:



What I see in the log files is the data is being pumped into the database as it should. Next, Hibernate fetches the data to test the SELECT statement works. However, something is going wrong because I see:



From what I can tell something is happening in the database Connection pool.


My setting are as follows for the database Connection pool:



Thank you for taking the time to read my post and for any suggestions you can offer.

Russ
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So the connection has closed. Did you close the Session? is there a timeout in MySQL or the Connection pool that closes it quickly?

Can you post your Session code that does the query?

Thanks

Mark
 
Russell Ray
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Mark,

I took you question as a suggestion and I tried something. The only thing different is a I placed the find operation within a transaction per your question.



I am still getting the same error. My method for adding metadata documents is identifical with regards to wrapping the actions within a transaction.

Russ
 
Russell Ray
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I fixed my problem by increating the heal size from the standard to



Thanks Mark!
 
Mark Spritzler
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Russell Ray:
I fixed my problem by increating the heal size from the standard to



Thanks Mark!



Cool.

Mark
 
reply
    Bookmark Topic Watch Topic
  • New Topic