From a previous post see
http://p2p.wrox.com/topic.asp?TOPIC_ID=68281
Hi. I was able to get past this by running the pixhsql.sql script found in wrox-pix-web/src/test/resources directory. There is probably a better way, but doing the following could help if you are stuck.
First off, I am having a little more success when starting my db via the instructions in appendix C (start from within my spring dir) over those in Chapter 3 (start db using the hsqldb-1.8.0.7.jar that comes with the wrox download).
C:\spring-framework-2.0.8\lib\hsqldb>java -cp hsqldb.jar org.hsqldb.Server -database.0 temp -dbname.0 pix
I also started SqlTool using my spring-framework-2.0.8 hsqldb.jar rather than the one in wrox-pix-web.
C:\spring-framework-2.0.8\lib\hsqldb>java -cp hsqldb.jar org.hsqldb.util.SqlTool pix-sa
Then I ran the following at the sql prompt
sql> \i C:\apps\begspring2\wrox-pix-web\src\test\resources\pixhsql.sql
This yielded quite a few errors (constraint/table already exists) but alas I was able to run
C:\apps\begspring2\wrox-pix-web>mvn exec:java -Dexec.mainClass=com.wrox.beginspring.pix.dao.examp les.AlbumDaoTest
after that I got an NullPointerException when running "select * from album", but I could "select id from album". Trying each column, I deduced that no creationdate was inserted so I did the following.
sql> update album set creationdate = current_date;
1 row updated
sql> select * from album
+> ;
DTYPE ID NAME DESCRIPTION CREATIONDATE LABELS USER_US
ERNAME
----- -- ---------------- ----------- --------------------- ------ -------
------
H 1 This is my album [null] 2008-01-23 00:00:00.0 user1
Looks like I can finally press on.