That line was missing from the second example. However my problem is infrastructure related:
java.lang.Class.forName ("oracle.jdbc.OracleDriver"); --->Wrapped java.lang.ClassNotFoundException: oracle.jdbc.OracleDriver
I used Data Modeler 18.104.22.1685. This could be related to the custom java home used by my installation.
The same code works with version "22.214.171.1247 jre included"