title: ORA-01017 when connecting through jdbc thin driver
body: <p>Using </p>
  
  <ul>
  <li>the Oracle Database 11g Release 2 (11.2.0.4) JDBC Driver "ojdbc6.jar" (from <a href="http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-112010-090769.html" rel="nofollow">this page</a>), </li>
  <li>Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production (verified by doing "select * from v$version")</li>
  </ul>
  
  <p>I'm trying to connect to the database from a Java application using the JDBC Driver. This fails with a "ORA-01017: invalid username/password; logon denied" message. </p>
  
  <ul>
  <li>I'm 100% certain that the username and password I'm inputting in my code is correct. I have verified this by going as far as copy-pasting the values from my code in the connection manager of SQLDeveloper, where connecting works fine.</li>
  <li>The ojdbc6.jar-file is imported in my Eclipse project (as a library).</li>
  <li>The TNS string is copied from a tnsping to the TNS name which works in SQLDeveloper.</li>
  <li>I've additionally verified that the username / password for the server I'm using are not case sensitive (by connecting in SQL developer using an uppercased version of my username and password, and trying the same with a lowercased version), as there was some issue with that on earlier JDBC drivers.</li>
  </ul>
  
  <p>Things installed on my computer (over which I have no power):</p>
  
  <ul>
  <li>Oracle Client 11.2.0</li>
  <li>SQLDeveloper Version 4.0.1.14</li>
  </ul>
  
  <p>I don't think these are interfering, as removing the ojdbc6.jar from the libraries the Eclipse project uses gives rise to no output (no errors, also no output from the select-clause), so I'm fairly sure the thin driver is in fact being used.</p>
  
  <p>I've created a small test application to demonstrate the problem:</p>
  
  <pre><code>import java.sql.Connection;
  import java.sql.DriverManager;
  import java.sql.ResultSet;
  import java.sql.Statement;
  
  public class OracleTester {
  
      public static void main(String[] args) {
          String database = "jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=xxx.xx.xxx.xxx)(PORT=13301)))(CONNECT_DATA=(SERVICE_NAME=something)))";
  
          String username = "myUser";
          String password = "myPass";
  
          try{
              Class.forName("oracle.jdbc.driver.OracleDriver");
              Connection conn = DriverManager.getConnection(database,username,password);
              Statement stmt = conn.createStatement();
              ResultSet rs = stmt.executeQuery("select 'hello' from dual");
              while(rs.next()){
                  System.out.println("output: " + rs.getString(0));
              }
              conn.close();
          }
          catch(Exception e){
              System.out.println(e.getLocalizedMessage());
          }
  
          System.out.println("Done!");
      }
  
  }
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>ORA-01017: invalid username/password; logon denied
  
  Done!
  </code></pre>