I'm seeing a wierd combination of things in Equinox when using HSQLDB, JPOX and Spring:
First of all, my JDBC URL for my HSQLDB database is set at:
jdbc.url=jdbc:hsqldb:db/equinox
I'm using HSQLDB version 1.7.1 because I've found when I upgrade to 1.7.3, my jWebUnit tests quit working (because of a file lock error).
JPOX 1.1.0-beta-1 + Spring 1.1.3 + HSQLDB 1.7.1 = works fine
JPOX 1.1.0-beta-1 + Spring 1.1.4 + HSQLDB 1.7.1 = results in the following error:
JPOX 1.1.0-beta-1 + Spring 1.1.4 + HSQLDB 1.7.3 = results in the following error:Code:[junit] (JDO operation): data integrity violated by SQL ''; nested exception is java.sql.SQLException: Try to insert null into a non-nullable column in statement [INSERT INTO APP_USER (FIRST_NAME,LAST_NAME,BIRTHDAY,ID) VALUES ('Rod','Johnson',NULL,NULL)]
So it seems there's an issue with HSQLDB 1.7.1 and Spring 1.1.4. Everything works fine with 1.1.3. For good meaure, I tried a spring.jar built from CVS and I got the same error. Strangely enough, this seems to only be an issue with JPOX - all other persistence packages (Hibernate, Spring JDBC, iBATIS and OJB) work fine with HSQLDB 1.7.1 and Spring 1.1.4.Code:[junit] NestedThrowables: [junit] java.sql.SQLException: The database is already in use by another pro cess: org.hsqldb.NIOLockFile@76a8caef[file =C:\Source\equinox\extras\jdo\db\equinox.lck, exists=true, locked=false, valid=false, fl =null]: java.lang.Exception: The process cannot access the file because another process has locked a portion of the file : C:\Source\equinox\extras\jdo\db\equinox.lck
My package.jdo file looks as follows:
For now, I guess I'll just stick with Spring 1.1.3 with JPOX and HSQLDB 1.7.1. A better solution would probably be to figure out the lock problem with 1.7.3 or use some other in-memory database.Code:<?xml version="1.0"?> <!DOCTYPE jdo PUBLIC "-//Sun Microsystems, Inc.//DTD Java Data Objects Metadata 2.0//EN" "http://java.sun.com/dtd/jdo_2_0.dtd"> <jdo> <package name="org.appfuse.model"> <class name="User" identity-type="application" objectid-class="org.appfuse.model.PrimaryKey" table="app_user"> <field name="id" primary-key="true"/> <field name="firstName" persistence-modifier="persistent"> <column name="first_name" jdbc-type="VARCHAR" length="50"/> </field> <field name="lastName" persistence-modifier="persistent"> <column name="last_name" jdbc-type="VARCHAR" length="50"/> </field> <field name="birthday"/> <extension vendor-name="jpox" key="use-poid-generator" value="true"/> </class> </package> </jdo>


Reply With Quote