title: Oracle JDBC driver ORA-01843: not a valid month error
body: <p>I have a SQL script containing many INSERT statements which I execute through the  Liquibase Maven <code>update</code> goal.
  Some of the INSERT statements contain dates, like the below statement</p>
  
  <pre><code>Insert into  T (date) values ( to_date('16-JAN-12','DD-MON-RR'))
  </code></pre>
  
  <p>When I run the Liquibase <code>update</code> goal I get the following error</p>
  
  <pre><code>SEVERE 12/10/15 15.46: liquibase: install.xml: migrations/install/data/data.xml::1::gdm: Change Set migrations/install/data/data.xml::1::gdm failed.  Error: ORA-01843: not a valid month
   [Failed SQL: Insert into  T (date) values ( to_date('16-JAN-12','DD-MON-RR'))]
      at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:316)
      at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:55)
      at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:122)
      at liquibase.database.AbstractJdbcDatabase.execute(AbstractJdbcDatabase.java:1247)
      at liquibase.database.AbstractJdbcDatabase.executeStatements(AbstractJdbcDatabase.java:1230)
      at liquibase.changelog.ChangeSet.execute(ChangeSet.java:548)
      at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:51)
      at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:73)
      at liquibase.Liquibase.update(Liquibase.java:210)
      at liquibase.Liquibase.update(Liquibase.java:190)
      at liquibase.Liquibase.update(Liquibase.java:325)
      at org.liquibase.maven.plugins.LiquibaseUpdate.doUpdate(LiquibaseUpdate.java:33)
      at org.liquibase.maven.plugins.AbstractLiquibaseUpdateMojo.performLiquibaseTask(AbstractLiquibaseUpdateMojo.java:30)
      at org.liquibase.maven.plugins.AbstractLiquibaseMojo.execute(AbstractLiquibaseMojo.java:394)
      at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
      at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
      at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
      at org.apache.maven.cli.MavenCli.execute(MavenCli.java:862)
      at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:286)
      at org.apache.maven.cli.MavenCli.main(MavenCli.java:197)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:497)
      at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
      at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
      at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
      at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
  Caused by: java.sql.SQLDataException: ORA-01843: not a valid month
  
      at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:450)
      at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:399)
      at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:1017)
      at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:655)
      at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:249)
      at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:566)
      at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:202)
      at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:45)
      at oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:933)
      at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1075)
      at oracle.jdbc.driver.OracleStatement.executeInternal(OracleStatement.java:1718)
      at oracle.jdbc.driver.OracleStatement.execute(OracleStatement.java:1678)
      at oracle.jdbc.driver.OracleStatementWrapper.execute(OracleStatementWrapper.java:332)
      at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:314)
      ... 35 more
  </code></pre>
  
  <p>In Internet I found that this is an error regarding the <code>NLS_LANG</code> variable which has to be set on client and server (Oracle DB), but both the platforms seem to run with <code>EN</code> language.</p>
  
  <p>Have you ever experienced such a problem? What can be the issue?</p>
  
  <p>Thank you<br>
  Giulio</p>