I fixed this issue by correcting my jdbc string.
For example, the correct jdbc string should be…
jdbc:oracle:thin:@myserver:1521/XE
But the jdbs string I was using is …
jdbc:oracle:thin:@myserver:1521:XE
(Note: between 1521 and XE should be a /)
This bad jdbc string give me a ORA-12505 error too.