I applied the previously mentioned fix to GeoserverDataDirectory.java. Should fix 'GEOSERVER_DATA_DIR' users on trunk.
This bug was hard to find because it wasn't getting logged. It occurred during the spring application auto-wiring phase, before geoserver initializes itself and programmatically sets up log4j logging. (in GeoServer.java, geoserver sets up log4j logging appenders/levels which send specific packages log messages to stdout).
So I couldn't actually *see* the problem...and any other problem such as this (a mis-configured spring config file, noclassdeffounderrors during spring startup, etc.) would also be invisible. Frustratingly, they simply fail silently in tomcat.
In the end, I wound up getting an error trace by putting log4j.properties on the classpath of the webapp. Which made me wonder why it lives where it currently lives:
geoserver-trunk/web/src/main/webapp/WEB-INF/log4j.properties
It doesn't get picked up by the log4j configurator automatically (it's not on the classpath) and it's not referenced (as far as I could search) by any file in geoserver itself. Is it 'vestigal' or something?
Anyway, in 1.3.x this wasn't a big deal. There just wasn't a whole lot that happened between startup and GeoServer.java's calls to setup logging for org.geotools and org.vfny. However now there's a whole lot of awesome spring auto-wiring stuff that happens between web-app launch by the container, and the GeoServer.java calls to set up log4j logging.
I propose that we move the file "log4j.properties" to
geoserver-trunk/main/src/main/java/log4j.properties. That way it will wind up in the WEB-INF/classes directory when you do a '$mvn install' and will get picked up by the log4j configurator when the first log4j messages come from inside spring.
I also propose that the log4j.properties file makes everything pretty 'quiet' by setting logging levels to WARN or higher (lower?).
As far as I've tested, this doesn't conflict with the programmatic log4j logging that gets handled inside GeoServer.java...it just lets spring/tomcat tell you more about what's going on inside spring/tomcat while its starting up.
Thoughts?
--saul