The rest of the properties must be loaded in some manner by the Configuration object. Usually, this is instantiated by calling Configuration.configure(), which will read the hibernate.cfg.xml file and copy the properties found therein to the System.properties.
Try one of the following:
1) Configure from hibernate.cfg.xml and override:
Code:
Configuration cfg = new Configuration();
cfg.configure();
System.setProperty("hibernate.connection.password",pass);
System.setProperty("hibernate.connection.username",usr);
cfg.setProperties(System.getProperties());
sessionFactory = cfg.buildSessionFactory();
2) Configure it all in code:
Code:
Configuration cfg = new Configuration();
cfg.configure();
System.setProperty("hibernate.connection.password",pass);
System.setProperty("hibernate.connection.username",usr);
System.setProperty("hibernate.connection.driver_class", driver_class);
System.setProperty("hibernate.connection.url", driver_url);
System.setProperty("hibernate.dialect", dialect);
// etc, etc, for all properties
cfg.setProperties(System.getProperties());
sessionFactory = cfg.buildSessionFactory();
Good luck and good coding!