This is not legal. The application will not work.
Hibernate.cfg.xml file, if found on the classpath, will have priority.
The application will select first properties from the Hibernate.cfg.xml and then from hibernate.properties.