Win a copy of Head First Android this week in the Android 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

Schema Export Unsuccesful

 
Ranch Hand
Posts: 188
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Am still on the first tutorial from Cameron Mckenzie's 'Hibernate Made Easy' book, and lots of things still going wrong so although not getting very far with the example am picking up a lot of new stuff

The problem now is that the examscam schema can't seem to be found using the hibernate.cfg.xml file I am using. I have copies of the schema in the c:\ root directory and also at C:\Program Files\MySQL

hibernate.cfg.xml


Stacktrace


Any pointers to where i am going wrong would be greatly appreciated.

Thaks Kevin.
 
Bartender
Posts: 4109
72
Hibernate Fedora Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Do you have a database 'examscam' in the MySQL engine? Does "show databases;" command in MySQL prompt show you that it exists? If not create a one using "create database examscam;".
 
Kevin Florish
Ranch Hand
Posts: 188
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Vijitha thanks for the fast reply.

I am also new to MySql so unsure of how to enter the commands you mentioned (went to dos command line and the Mysql directory and tried from there but didnt work). But in MySql workbench the examscam.mwb Schema definitely exists (maybe because it was created in workbench the file extension is different?)

I am wading through a plethora of documentation on MySql, Maven, Ecipse addons and hibernate at the moment trying to bring this all together

Thanks Kevin.
 
Vijitha Kumara
Bartender
Posts: 4109
72
Hibernate Fedora Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

... I am also new to MySql so unsure of how to enter the commands you mentioned (went to dos command line and the Mysql directory and tried from there but didnt work).


Go to the bin directory of the MySQL installation directory in command prompt and type "mysql -u root" (this should work if you haven't set any password for the root & assuming MySQL is running). Then you will be taken in to the MySQL prompt with root privileges. Try the command mentioned in the previous post, see what happens.
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'd recommend taking a step back: you are trying to do *far* too many things at once.
 
Kevin Florish
Ranch Hand
Posts: 188
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the example Vijitha, the 'show databases' command confirmed my suspicion that although the schema is present in the MySQL Workbench. Mysql doesn't show the database and therefore Eclipse is unaware of it.

I have now created the database from the MySql prompt and everything is working as intended

Thanks again for the help.

Kevin.

 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic