- fixed errors starting the app on tomcat7.

(cherry picked from commit 50d684e340cdc36dbde1de18ad5d0d78d332f430)