You work all night and finish off your lovely application for the meeting the following day. You check and re-check your application and it works like a champ. You are feeling good about the demo.
Then you get to the office where you are giving the demo, and spend time configuring your browser so you can get through the lovely corporate proxy/firewall. Always a pleasure.
Then you bring your app up, and all of a sudden you get a stacktrace that could reach to the moon and back, and at the heart of it you see:
org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from URL [jar:file:/C:/servers/tomcat/webapps/your-app/WEB-INF/lib/jsf-spring.jar!/META-INF/faces-config.xml]; nested exception is java.net.ConnectException: Connection timed out: connect
The faces-config.xml looks good in there. Everything seems fine.
You then look deeper into the message of stacktraces from Tomcat, and you find a bunch of connection errors. Hmm, what kind of connection?
After awhile you realise that this is ALL due to Digester, using Xerces, and VALIDATING the damn XML.
So the errors are due to loading the faces-config which has the DTD:
<!DOCTYPE faces-config PUBLIC
“-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN”
You can try to turn off the validation, or just through in your proxy info to Tomcat:
Now, just 2 hours later, you are ready to give your demo :)