Wrox Programmer Forums
|
BOOK: Beginning Spring Framework 2 ISBN: 978-0-470-10161-2
This is the forum to discuss the Wrox book Beginning Spring Framework 2 by Thomas Van de Velde, Bruce Snyder, Christian Dupuis, Sing Li, Anne Horton, Naveen Balani; ISBN: 9780470101612
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Spring Framework 2 ISBN: 978-0-470-10161-2 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 28th, 2008, 07:47 AM
Registered User
 
Join Date: Feb 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Where are the tables created /Chapter 3

Hello,

I am wondering, where in Chapter 3 the tables are created? The webapp works fine. But even when the webapp works with the same running database, the code in chapter 3 doesn't work

Table not found in statement [insert into ALBUM_SEQUENCE]

In AlbumDAO its a pre
 * <pre>
 * The album database named pix is created.
 * The album managment tables along with sequence tables
 * ALBUM_SEQUENCE and PICTURE_SEQUENCE is created
 * <pre>

I think that should be done via the webapp, but on my system is not?

Kind regards
codemart



 
Old February 28th, 2008, 12:02 PM
Registered User
 
Join Date: Jan 2008
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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.


 
Old August 13th, 2008, 07:53 AM
Registered User
 
Join Date: Aug 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to dereklords Send a message via AIM to dereklords Send a message via MSN to dereklords Send a message via Yahoo to dereklords
Default

thanks. worked for me!

Derek Lords

Immediate Tech Support

P:&nbsp;&nbsp;212.227.6203
M:&nbsp;&nbsp;917.579.2367
F:&nbsp;&nbsp;917.591.2587





Similar Threads
Thread Thread Starter Forum Replies Last Post
creating tables within tables in access??? carswelljr Access 3 August 23rd, 2006 01:21 PM
Using tables to display data (chapter 4) gadjodilo BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 5 August 7th, 2006 01:42 PM
Creating database and tables. chapter 9 PeterJB BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 0 August 1st, 2006 06:52 AM
chapter 12, can't set up tables robtho BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 1 January 7th, 2006 04:38 PM
Self Created Function rajuru Beginning PHP 0 July 8th, 2005 06:33 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.