• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Sudden database connection problem

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

I've got a really weird Hibernate problem and I'm hoping that one of you (who has used Hibernate and perhaps MySQL) has any ideas on how I could solve it.

I'm using Hibernate 3.2.6, MySQL Server 5.0.51a and Sun Java System Application Server 9.1.01 with NetBeans 5.5.1

The problem is that I can't connect to the database. When I try to do any kind of database operation I get these exceptions:


I can also add that this is a web application, that I'm using hbm.xml files and c3p0 as connection pool.

What's weird about this problem is that everything has worked earlier and since then I haven't changed a single thing.

What I have done is worked on another Hibernate application (not web but Java desktop app.) which uses another database with the same MySQL Server and the same NetBeans version. In this application I tried to autogenerate the database tables from the hbm.xml files using hbm2ddl, which didn't work. Only 2 out of 4 tables were generated and I couldn't see anything wrong with the mapping files. (It was possible, though, to save objects to the tables that were generated.

I'm thinking that the problems with the web application might have something to do with the database generation I tried to do with the desktop application. I know this sounds really strange but I can't find any other way of explaining it.

Anyway, the question is what I can do to make it work again. I would really appreciate any kind of advice on this matter.

Thanks in advance!

Best regards
Ylva
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


What's weird about this problem is that everything has worked earlier and since then I haven't changed a single thing.


Is the database up? Can you connect via another client?
 
Ylva Degerfeldt
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, I can connect to the database through MySQL Command Line Client.

/Ylva
 
permaculture is largely about replacing oil with people. And one tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic