title: Oracle 11g r2 ORA-01017: invalid username/password; logon denied when connecting via JDBC driver
body: <p>I'm not an Oracle expert nor a Database Administrator. But we have this Java program that we created and it used to connect to an Oracle 9i database (Windows environment), using the OCI driver.</p>
  
  <p>But when we migrated to Oracle 11g r2 (Linux environment), we got this error when we tried to run the tool:</p>
  
  <blockquote>
    <p>ORA-01017: invalid username/password; logon denied</p>
  </blockquote>
  
  <p>I've tried a lot of possible codes to connect to the database (specifying host and port instead of just SID/service name, setting Properties object, using OracleDataSource, switching from OCI driver to thin driver, checking REMOTE_LOGIN_PASSWORDFILE, etc.) But still the same error.</p>
  
  <p>Do you think this is a driver issue? Do we need to configure something in the database?
  By the way, these are the versions:
  JDBC => 11.2.0.3.0
  Oracle DB => 11.2.0.4.0</p>
  
  <p>In addition, I can't connect to sqlplus if I indicate the connect string:</p>
  
  <pre><code>sqlplus user@ORCL as sysdba
  
  SQL*Plus: Release 11.2.0.4.0 Production on Fri Apr 17 11:27:45 2015
  
  Copyright (c) 1982, 2013, Oracle.  All rights reserved.
  
  Enter password: 
  
  ERROR: ORA-01017: invalid username/password; logon denied
  </code></pre>
  
  <p>However, I can connect without indicating the connect string. The ORACLE_SID is set upon logging in to the server.</p>
  
  <pre><code>sqlplus user as sysdba
  
  SQL*Plus: Release 11.2.0.4.0 Production on Fri Apr 17 11:28:06 2015
  
  Copyright (c) 1982, 2013, Oracle.  All rights reserved.
  
  Enter password:
  
  Connected to: Oracle Database 11g Enterprise Edition Release
  11.2.0.4.0 - 64bit Production
  </code></pre>
  
  <p>Is there a missing configuration that we should have set?
  Thanks in advance.</p>