Hi Wouter, Thursday, February 10, 2005, 11:29:23 AM, you wrote:
WZ> I'm using JBoss 3.2.5 with HSQLDB 1.7.1 too .. with the latest WZ> AndroMDA build, I don't have that problem strange ... WZ> It could be though, that you're using old mapping files, there WZ> used to be one for hypersonic that specified something like WZ> INTEGER(9) for Long datatypes, if you see that in the DDL it means WZ> you're using an old plugin No, I use a quite new CVS snapshot (3 days old). WZ> I will also take a look at it again, perhaps the error message is WZ> misleading (mentioning the 'GENERATED' keyword .. while the problem might WZ> be related to something else) No, I think it is not misleading at all. It is really caused by the "generated by default..." phrase in the DDL statement. The old HSQLDB does not understand it - after I upgraded to JBoss 4 with HSQLDB 1.7.2, the same statement runs silently and creates all the tables without any problem! To create the project, I simply used andromdapp:generate and said I want a Spring-based project with a web tier and without web services. I did not change any of the default settings of the Spring cartridge - all "plain vanilla"! The problem seems to be related to the automatic generation of database identifiers (sequences). In my mda/project.properties file, it says: "hibernate.generatorClass=native". The Hibernate manual says: "The native identitiy generator picks other generators like identity, sequence or hilo depending on the capabilities of the underlying database." For HQSLDB, it seems to have picked "identity" which caused the DDL dialect version problem. The entities in my model do not have a primary key field, the ids are auto-generated. The error is reported when I run app/target/initializeSchema.cmd which runs this line: java -classpath %JBOSS_HOME%\server\default\lib\hsqldb.jar org.hsqldb.util.ScriptTool -driver org.hsqldb.jdbcDriver -url jdbc:hsqldb:hsql: -database //localhost:1701 -script hibernate-schema-initialize.sql The problem is easy to fix: simply upgrade to a higher release of HSLDB or change the generator class to something that is understood by *any* database, i.e. uuid.hex (although not popular). Cheers... Matthias >> Hi all, >> >> just wanted to let you point to a nice trap when using the Hibernate >> or Spring cartridges on a HSQL database: >> >> I generated the DDL database schema using Hibernate schema export. It >> generated the following statement sytax: >> >> create table SOMETABLE (ID bigint generated by default as identity >> (start with 1), ...) >> >> When running this in JBoss 3.2.5 with HSQLDB 1.7.1, this results in an >> error message: >> >> SQL Error at line 36: java.sql.SQLException: Unexpected token: >> GENERATED ... >> >> The docs on the net say that this syntax has been introduced in HSQLDB >> 1.7.2, see http://hsqldb.sourceforge.net/doc/guide/guide.html >> >> I'll now upgrade to JBoss 4 - I hope it will contain a new release of >> HSQLDB! >> ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Andromda-user mailing list Andromda-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/andromda-user