Also, is the server actually listening on tcp port 1521?
Note on "registerDriver". This is an obscure variant of the obsolete Class.forName() mechanism which has been unnecessary for many, many years now. All JDBC drivers within the last decade or so self-register automatically.
Oracle's docs apparently need some housecleaning. The top Google hit on "registerDriver" was for Oracle 11 and it also says:
Oracle 11g Java Documentation wrote:
However, this method is valid only for JDK-compliant Java virtual machines. It is not valid for Microsoft Java virtual machines.
Right there you know something is wrong. Microsoft hasn't been producing
Java Virtual Machines since before Oracle bought Sun. Specifically since Microsoft tried to hijack Java, got sued, and lost.
The secret of how to be miserable is to constantly expect things are going to happen the way that they are "supposed" to happen.
You can have faith, which carries the understanding that you may be disappointed. Then there's being a willfully-blind idiot, which virtually guarantees it.