So how does SQL Developer connect to the DB?
It connects the way you told it to when you created the connection.
If you create a connection using the default 'Basic' connection type Sql Developer doesn't even use the TNSNAMES.ORA file so it doesn't matter what is in it or if it even exists.
You have to post ALL of the connection settings that you used when you created the connection before anyone can answer your question.
I'm telling SQL Developer to connect through TNS.
Did you specify the TNSnames directory in the preferences? It's possible it's using the wrong tns file to do the connect. It's even possible it found multiple TNS files in that directory and it's not using the one you intend for it to. You can see this if you follow this 'trick.'
Thanks Jeff. I double checked my preferences and the directory wasn't even set. It was using the wrong tnsnames.ora file.