Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Newbie : Unable to Fetch Data From MySQL using Hibernate

 
Russell Ray
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • 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
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • Quote
  • Report post to moderator
I fixed my problem by increating the heal size from the standard to



Thanks Mark!
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic