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 October 3rd, 2009, 04:47 PM
Authorized User
 
Join Date: Aug 2009
Posts: 10
Thanks: 3
Thanked 3 Times in 3 Posts
Smile General Pitfalls Chapters 3 and 4

Just some general observations I have made when trying to work through the two chapters.
Conflicts between Tomcat Web Server, HSQLDB database server, and compiling and packaging application WAR file:
I encountered numerous problems resulting from the three above processes interacting with each other. I will attempt to relate these situations as best as I can. Here goes.
1. Compiling and packaging application WAR file:
Ensure that the HSQLDB database server is not running. This is only applicable if you are using the command to start the HSQLDB database server as presented in Chapter 3, pg. 60, TryItOut step 1. Your War build will not complete successfully.
Reason for conflict:
The startup command uses the hsqldb.jar file located in the Pix application lib directory. The WAR build also attempts to include this same hsqldb.jar file in the WAR package. It is unable to do this because hsqldb.jar is in use by another program [HSQLDB database server].
Solution:
Any time you process the command to compile and package the WAR application file, ensure that HSQLDB is not running.

2. Displaying createAlbum.jsp Form View as shown on pg.111:
This page will only display if there are no Album records in the HSQLDB database. If you have run the process to test this in Chapters 3/4, there will be records. This will cause the page not to display. Also, if you use the command mvn package to compile and package the WAR file, it will run the tests and create records.
Solution:
Use the following command instead - mvn package -Dmaven.test.skip=true.
This will create the WAR file but skip the tests and therefore not create records in the database.

Over time as I dealt with these chapters I have come up with the following procedure whenever I need to produce a new WAR file for deployment:
1. Stop HDQLDB.
2. Stop Tomcat.
3. Create WAR file - mvn package -Dmaven.test.skip=true.
4. Delete old pixweb-0.0.1 WebApp in Tomcat.
5. Copy WAR file to Tomcat webapps directory.
6. Start Tomcat - this will establish a new pixweb-0.0.1 WebApp.
7. Start HSQLDB.
8. Try WebApp.

That's it for now. Hope I didn't forget anything. Hope it makes sense. Hope it helps.

Until next time..........

EverettG





Similar Threads
Thread Thread Starter Forum Replies Last Post
CMS integrate with other chapters deepblue_km BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 8 December 22nd, 2008 07:22 AM
chapters 4,5,6 are so boring! johnperez BOOK: Expert SQL Server 2005 Integration Services ISBN: 978-0-470-13411-5 0 April 3rd, 2008 05:05 PM
FAQ: Common register_globals conversion pitfalls nikolai BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 0 September 10th, 2003 01:13 AM





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