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:
When using dag instead of thin, the syntax below pointing to service name worked for me. The jdbc:thin solutions above did not work.
dag
thin
jdbc:thin
jdbc:dag:oracle://HOSTNAME:1521;ServiceName=SERVICE_NAME