• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Creating Databases and Roles from Enterprise Application

 
Marembo Ochieng'
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all;

Am Trying to create a database and user roles from an enterprise application but to no avail.
The following exception is overthrown

the code is as follows

any help will really be appreaciated



 
Tom Reilly
Rancher
Posts: 618
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Holy moly that's a lot of error. I didn't read every line but I didn't see any explanation of a database / sql error. How about trying your SQL in a simple main() test? You may be able to get a better explanation of the problem (SQL error, wrong privileges error, etc). Or may be the error is not a SQL error at all.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34974
379
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Marembo,
Many (or all) databases do not allow you to create a database via JDBC. Try it using Runtime.exec to run at the command line.
 
Marembo Ochieng'
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you guys, actually doing it as a process command will help, its only that now i'll have to know what type of database the client will be using-but thats a lot easier.

However, i want to use two datasources in the same ejb-unit; viz:



is this possible, because it is not working apparently.

Thanks guys.
 
Amol Nayak
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes we can use two Datasources in a way you are using. What is not working out for you?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic