I built a version of the alfresco sdk from svn (version 741 I believe, from last Friday) and I've been able to get it running with mysql with no problems. For some of our testing, however, I was thinking it might be nice to run against hsqldb. When starting up the application against hsqldb, I see these errors:
07:35:17,130 INFO [domain.schema.SchemaBootstrap] Generating unmodified schema creation script: /tmp/Alfresco/AlfrescoSchemaCreate-org.hibernate.dialect.HSQLDialect-35750.sql 07:35:17,235 INFO [domain.schema.SchemaBootstrap] Executing database script: /tmp/Alfresco/AlfrescoSchemaCreate-org.hibernate.dialect.HSQLDialect-35750.sql 07:35:17,363 INFO [domain.schema.SchemaBootstrap] Executing database script: classpath:alfresco/dbscripts/create/2.0/${db.script.dialect}/AlfrescoPostCreate-2.0-FKIndexes.sql 07:35:17,955 ERROR [web.context.ContextLoader] Context initialization failed org.hibernate.exception.GenericJDBCException: could not insert: [org.alfresco.repo.attributes.MapAttributeImpl] at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103) at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43) at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:40) at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2108) at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2588) at org.hibernate.action.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:48) at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:248) at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:290) at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:180) at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:108) at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:186) at org.hibernate.event.def.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:33) at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:175) at org.hibernate.event.def.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:27) at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:70) at org.hibernate.impl.SessionImpl.fireSave(SessionImpl.java:535) at org.hibernate.impl.SessionImpl.save(SessionImpl.java:523) at org.hibernate.impl.SessionImpl.save(SessionImpl.java:519) at org.alfresco.repo.attributes.hibernate.AttributeDAOHibernate.save(AttributeDAOHibernate.java:133) at org.alfresco.repo.attributes.MapAttributeImpl.<init>(MapAttributeImpl.java:56) at org.alfresco.repo.attributes.AttributeConverter.toPersistent(AttributeConverter.java:84) Caused by: java.sql.SQLException: This function is not supported at org.hsqldb.jdbc.Util.sqlException(Lorg.hsqldb.HsqlExceptionLjava.sql.SQLException;(Unknown Source) at org.hsqldb.jdbc.Util.notSupported()Ljava.sql.SQLException;(Unknown Source) at org.hsqldb.jdbc.jdbcConnection.prepareStatement(Ljava.lang.String;I)Ljava.sql.PreparedStatement;(Unknown Source) at org.apache.commons.dbcp.DelegatingConnection.prepareStatement(DelegatingConnection.java:394) at org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.prepareStatement(PoolingDataSource.java:370) at jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.ObjectLjava.lang.Object;(Unknown Source) at java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava.lang.Object;(Unknown Source) at org.hibernate.util.GetGeneratedKeysHelper.prepareStatement(GetGeneratedKeysHelper.java:49) at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:487) at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:94) at org.hibernate.id.IdentityGenerator$GetGeneratedKeysDelegate.prepare(IdentityGenerator.java:69) at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:30) at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2108) at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2588) at org.hibernate.action.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:48) at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:248) at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:290) at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:180) at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:108) at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:186) at org.hibernate.event.def.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:33) at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:175) at org.hibernate.event.def.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:27) at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:70)
So this would be with spring 2.0.2, hibernate 3.2.1 and hsqldb 1.8.0. The only configuration I touched when flipping from mysql to hsql was in custom-hibernate-dialect.properties and custom-repository.properties.
I run into the same issue. I am using the Alfresco 2.1.0dev nightly build (Alfresco Community Tomcat) of today (May 1st 2007) and have not changed any configuration files at all.
It seems the hsqldb support is broken in the head at the moment?
As of the current svn contents, this seems to be fixed. That is, it worked for me. For a few days last week I'd turned on the get_generated_keys feature in hibernate. Mea culpa, mea culpa. The HSQL jdbc driver doesn't support that feature. Let us know if there's still a problem.