FileInputStream is used to load resources from files located on the file system. Files inside a jar are not on the file system. You need to use a different InputStream.
For this case, using the ClassLoader#getResourceAsStream(String) method would be advised. It returns an InputStream resource found on the classpath. Something like:
InputStream is = getClass().getClassLoader().getResourceAsStream("/Db.properties");
should work. Or for convenience:
InputStream is = getClass().getResourceAsStream("/Db.properties");
Of note, the reason the log4j.properties
works is because Log4j by design can load configuration files in the root classpath.