Lets get some more verbose logging for this by enabling Error Stack Tracing in the ErrorLog.log file. To do this access the LoggingSubsystem entity in ThingWorx. Navigate to the Configuration tab and tick "Enable Error Stack Tracing", save the entity.
Following this reproduce the connection attempt by simply re-saving your DatabaseThing. Afterwards grab the ApplicationLog, ErrorLog from ThingworxStorage\logs along with any time relevant Tomcat logs located under <Apache Tomcat Install>\logs.