Class loader behaved differently under tomcat