This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes Schema Export Unsuccesful Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Schema Export Unsuccesful" Watch "Schema Export Unsuccesful" New topic
Author

Schema Export Unsuccesful

Kevin Florish
Ranch Hand

Joined: Jan 06, 2009
Posts: 175
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.


Java5 Tutorials | Java6 Tutorials | HTML/CSS Tutorials | JavaScript and jQuery Tutorials
Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3827

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;".


SCJP 5 | SCWCD 5
[How to ask questions] [Twitter]
Kevin Florish
Ranch Hand

Joined: Jan 06, 2009
Posts: 175
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

Joined: Mar 24, 2008
Posts: 3827

... 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

Joined: Sep 29, 2008
Posts: 12617

I'd recommend taking a step back: you are trying to do *far* too many things at once.
Kevin Florish
Ranch Hand

Joined: Jan 06, 2009
Posts: 175
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
 
subject: Schema Export Unsuccesful