Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Schema Export Unsuccesful

 
Kevin Florish
Ranch Hand
Posts: 181
  • 0
  • Mark post as helpful
  • send pies
  • 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.
 
Vijitha Kumara
Bartender
Posts: 3908
9
Chrome Fedora Hibernate
  • 0
  • Mark post as helpful
  • send pies
  • 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: 181
  • 0
  • Mark post as helpful
  • send pies
  • 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: 3908
9
Chrome Fedora Hibernate
  • 0
  • Mark post as helpful
  • send pies
  • 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.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • Mark post as helpful
  • send pies
  • 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: 181
  • 0
  • Mark post as helpful
  • send pies
  • 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.

 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic