I created the following connection url from the tnsnames entry:
jdbc:oracle:thin:@server1.domain.com:1521/FOO
try using the above connection url. Also check if the listener is working: in the windows: ctrl + r , services.msc , check if the service is running: "Oracle * TNSListener".
jdbc:oracle:thin:@(DESCRIPTION=(FAILOVER=ON)LOAD_BALANCE=OFF)(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=server1.domain.com)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=server2.domain.com)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=FOO)))
source share