title: Can't connect to oracle database with IntelliJ, Locale not recognized
body: <p>I have Oracle Database 11g Express Edition installed, and can normally connect to my local database with PLSQL Developer, but I can't connect with IntelliJ. It says Locale not recognized. </p>
  
  <p><a href="https://i.stack.imgur.com/w4SLE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/w4SLE.png" alt="enter image description here"></a></p>
  
  <p>After searching for some similar questions here, solution was kinda to change the machine locale manually, I did that and rebooted, but it still does not work. And I'm sure it really changed, because now, this line of java code:
  <code>System.out.println(Locale.getDefault())</code> printed <code>en_US</code>.</p>
  
  <p>Now i really don't know what is the problem, why does PLSQL work and IntelliJ does not.</p>
  
  <p>I am using ojdbc6.jar for connection.</p>
  
  <p>When I tried to connect with the java code below the same kind of exception was thrown.</p>
  
  <pre><code>Class.forName("oracle.jdbc.driver.OracleDriver");
  Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe", "SYSTEM", "password");
  </code></pre>
  
  <p>exception:</p>
  
  <pre><code>Exception in thread "main" java.sql.SQLException: Locale not recognized
      at oracle.jdbc.driver.T4CTTIoauthenticate.setSessionFields(T4CTTIoauthenticate.java:1006)
      at oracle.jdbc.driver.T4CTTIoauthenticate.&lt;init&gt;(T4CTTIoauthenticate.java:238)
      at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:401)
      at oracle.jdbc.driver.PhysicalConnection.&lt;init&gt;(PhysicalConnection.java:553)
      at oracle.jdbc.driver.T4CConnection.&lt;init&gt;(T4CConnection.java:254)
      at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
      at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:528)
      at java.sql.DriverManager.getConnection(DriverManager.java:664)
      at java.sql.DriverManager.getConnection(DriverManager.java:247)
      at data_coonnections.DataConnector.main(DataConnector.java:15)
  </code></pre>