JBoss Community

Re: EJB Persistence with JBoss 6 v2

created by Steve Dobson in Beginner's Corner - View the full discussion

Thanks Wolf-Dieter Fink.



That has fixed the problem.  I hadn't thought that although Emacs saw the XML as valid the DTD might have an order to the tags. 

 

I also had a problem with the MySQLInnoDialect not working because of a typo and I should have been using "MySQL5InnoDBDialect".

 

Just for anyone coming a long afterwards there is also two problems with the EJB file:

 

1). The setUUID(String newUUID) should, of course, be called "setIdentity(String new UUID)" or the parsing of the EJB will fail because hybernate will fail as it can't find a setter for the key.

 

2). The getUUID() method needs to be marked as "@Transient" so that hybernate doesn't try to map it to a database object.

 

But with these three little change my test EJB gets deployed and the table created in the database.  I'm now a happy bunny.

 

Many thanks

Reply to this message by going to Community

Start a new discussion in Beginner's Corner at Community