Added Derby connection compatible with tomcat & fixed some bugs.