[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - EJB3 Entity persistence OK with JBoss 4.2.2GA, but fails wil
do-not-reply at jboss.com
Mon Jun 16 10:48:58 EDT 2008
I wrote a very basic EJB3 entity and deployed it on JBoss 4.2.2GA - it worked fine. But when I tried to deploy the exact same EAR on JBoss 5.0.0 Beta4, the deployment failed with the following error:
10:42:51,673 INFO [SchemaUpdate] Running hbm2ddl schema update
10:42:51,673 INFO [SchemaUpdate] fetching database metadata
10:42:51,674 INFO [SchemaUpdate] updating schema
10:42:51,686 INFO [DatabaseMetadata] table not found: Book
10:42:51,689 INFO [DatabaseMetadata] table not found: Book
10:42:51,691 ERROR [SchemaUpdate] Unsuccessful: create table database.Book (id integer not null auto_increment, author varchar(255), title varchar(255), primary key (id))
10:42:51,698 ERROR [SchemaUpdate] CREATE command denied to user 'jboss'@'localhost' for table 'book'
10:42:51,698 INFO [SchemaUpdate] schema update complete
It appears like it is unable to create the "Book" table ("Book" is the name of my entity EJB class).
However, note the SQL query it uses the create the table:
create table database.Book (id integer not null auto_increment, author varchar(255), title varchar(255), primary key (id))
It qualifies the table name "Book" with the identifier "database" - this is what is causing it to fail. In my EJB, I have set the schema to "jbossdb" wich is a valid database. It is not clear to me why the query does not use "jbossdb.Book" instead of "database.Book"
I am using MySQL 5.1
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4158372#4158372
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4158372
More information about the jboss-user