• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Getting unknown database exception while creating schema programmatically?

 
Milind Bharambe
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to create schema and tables programmatically using hibernate/GWT/Java. I created the configuration with all mapping resources and properties etc. follows,



but when I say



it is throwing exception as,



**my cfg.xml file**:




And If I manually created the schema then it is working fine, i.e. creating tables and columns also. But normally it is not creating schema, Is it not possible to create schema automatically?
 
Milind Bharambe
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hibernate will not create the schema dynamically...you have to manually create it. I used simple JDBC connection and statement to create schema, then SchemaExport will do the work of generating the tables and fields. So there is no way to create actual schema using hibernate. You have to create it manually.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic