Try determining the correct SID for using JDBC. With reference to the URL:
http://www.dbmotive.com/oracle_error_codes.php?errcode=12505
Confirm the SID with your database administrator who has access to tnsnames.ora file. You may change it to something else and see what happens.