I have a Java application that uses JDBC (via JPA) that was connecting to a development database using hostname, port and Oracle SID, like this:
jdbc:oracle:
Try this: jdbc:oracle:thin:@oracle.hostserver2.mydomain.ca:1522/ABCD
jdbc:oracle:thin:@oracle.hostserver2.mydomain.ca:1522/ABCD
Edit: per comment below this is actualy correct: jdbc:oracle:thin:@//oracle.hostserver2.mydomain.ca:1522/ABCD (note the //)
jdbc:oracle:thin:@//oracle.hostserver2.mydomain.ca:1522/ABCD
//
Here is a link to a helpful article