title: liquibase.exception.DatabaseException: ORA-00933: SQL command not properly ended
body: <p>The oracle command works perfectly when run in <a href="http://software.dell.com/products/toad-for-oracle/" rel="nofollow">Toad for Oracle</a>.</p>
  
  <p>When I try to deploy the below code snippet to server, getting <code>SQL command not properly ended</code> error.</p>
  
  <p>Below is the error :</p>
  
  <pre><code>Reason: liquibase.exception.DatabaseException: 
      Error executing SQL GRANT EXECUTE ON SPT_ADD_SI_EVENT_RECIPIENT 
      TO PROJECT_SUPPORT_RW, APPSUPPORT_RW, PROJECT_ANALYST_RW, DB_DATASUPPORT_RW;
      : ORA-00933: SQL command not properly ended
  </code></pre>
  
  <p>CODE:</p>
  
  <pre><code>CREATE OR REPLACE PROCEDURE SPT_ADD_SI_EVENT_RECIPIENT (eventName IN VARCHAR2, emailAddresses IN VARCHAR2) IS
       nExists int;
  BEGIN
      select count(*) into nExists from SI_RECIPIENT where event = eventName;
      if nExists = 1 then
          UPDATE SI_RECIPIENT
          SET email = emailAddresses
          WHERE event = eventName;
      else
          INSERT INTO SI_RECIPIENT(event,email) VALUES (eventName,emailAddresses);
      end if;
  END SPT_ADD_SI_EVENT_RECIPIENT;
  /
  GRANT EXECUTE ON SPT_ADD_SI_EVENT_RECIPIENT TO PROJECT_SUPPORT_RW, APPSUPPORT_RW, PROJECT_ANALYST_RW, DB_DATASUPPORT_RW;
  </code></pre>
  
  <p>LOG:</p>
  
  <pre><code>[groovy]    at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:61)
  
  [groovy]    at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:106)
  
  [groovy]    at liquibase.database.AbstractJdbcDatabase.execute(AbstractJdbcDatabase.java:1189)
  
  [groovy]    at liquibase.database.AbstractJdbcDatabase.executeStatements(AbstractJdbcDatabase.java:1172)
  
  [groovy]    at liquibase.changelog.ChangeSet.execute(ChangeSet.java:352)
  
  [groovy]    at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:40)
  
  [groovy]    at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:64)
  
  [groovy]    at liquibase.Liquibase.update(Liquibase.java:202)
  
  [groovy]    at liquibase.Liquibase.update(Liquibase.java:181)
  
  [groovy]    at liquibase.integration.ant.DatabaseUpdateTask.executeWithLiquibaseClassloader(DatabaseUpdateTask.java:45)
  
  [groovy]    at liquibase.integration.ant.BaseLiquibaseTask.execute(BaseLiquibaseTask.java:71)
  
  [groovy]    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
  
  [groovy]    at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
  
  [groovy]    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  
  [groovy]    at java.lang.reflect.Method.invoke(Method.java:597)
  
  [groovy]    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
  
  [groovy]    at org.apache.tools.ant.Task.perform(Task.java:348)
  
  [groovy]    at org.apache.tools.ant.Target.execute(Target.java:357)
  
  [groovy]    at org.apache.tools.ant.Target.performTasks(Target.java:385)
  
  [groovy]    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
  
  [groovy]    at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
  
  [groovy]    at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
  
  [groovy]    at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:416)
  
  [groovy]    at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)
  
  [groovy]    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
  
  [groovy]    at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
  
  [groovy]    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  
  [groovy]    at java.lang.reflect.Method.invoke(Method.java:597)
  
  [groovy]    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
  
  [groovy]    at org.apache.tools.ant.Task.perform(Task.java:348)
  
  [groovy]    at org.apache.tools.ant.Target.execute(Target.java:357)
  
  [groovy]    at org.apache.tools.ant.Target.performTasks(Target.java:385)
  
  [groovy]    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
  
  [groovy]    at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
  
  [groovy]    at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
  
  [groovy]    at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:416)
  
  [groovy]    at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)
  
  [groovy]    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  
  [groovy]    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  
  [groovy]    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  
  [groovy]    at java.lang.reflect.Method.invoke(Method.java:597)
  
  [groovy]    at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoCachedMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:229)
  
  [groovy]    at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:52)
  
  [groovy]    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:121)
  
  [groovy]    at embedded_script_in__repositories_tools_ant_gradle_wsql_dot_build_dot_xml.run(embedded_script_in__repositories_tools_ant_gradle_wsql_dot_build_dot_xml:112)
  
  [groovy]    at org.codehaus.groovy.ant.Groovy.parseAndRunScript(Groovy.java:425)
  
  [groovy]    at org.codehaus.groovy.ant.Groovy.execGroovy(Groovy.java:404)
  
  [groovy]    at org.codehaus.groovy.ant.Groovy.execute(Groovy.java:279)
  
  [groovy]    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
  
  [groovy]    at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
  
  [groovy]    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  
  [groovy]    at java.lang.reflect.Method.invoke(Method.java:597)
  
  [groovy]    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
  
  [groovy]    at org.apache.tools.ant.Task.perform(Task.java:348)
  
  [groovy]    at org.apache.tools.ant.Target.execute(Target.java:357)
  
  [groovy]    at org.apache.tools.ant.Target.performTasks(Target.java:385)
  
  [groovy]    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
  
  [groovy]    at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
  
  [groovy]    at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
  
  [groovy]    at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:416)
  
  [groovy]    at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)
  
  [groovy]    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  
  [groovy]    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  
  [groovy]    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  
  [groovy]    at java.lang.reflect.Method.invoke(Method.java:597)
  
  [groovy]    at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoCachedMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:229)
  
  [groovy]    at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:52)
  
  [groovy]    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:40)
  
  [groovy]    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:117)
  
  [groovy]    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:121)
  
  [groovy]    at embedded_script_in__repositories_tools_ant_gradle_wsql_dot_build_dot_xml.run(embedded_script_in__repositories_tools_ant_gradle_wsql_dot_build_dot_xml:9)
  
  [groovy]    at org.codehaus.groovy.ant.Groovy.parseAndRunScript(Groovy.java:425)
  
  [groovy]    at org.codehaus.groovy.ant.Groovy.execGroovy(Groovy.java:404)
  
  [groovy]    at org.codehaus.groovy.ant.Groovy.execute(Groovy.java:279)
  
  [groovy]    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
  
  [groovy]    at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
  
  [groovy]    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  
  [groovy]    at java.lang.reflect.Method.invoke(Method.java:597)
  
  [groovy]    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
  
  [groovy]    at org.apache.tools.ant.Task.perform(Task.java:348)
  
  [groovy]    at org.apache.tools.ant.Target.execute(Target.java:357)
  
  [groovy]    at org.apache.tools.ant.Target.performTasks(Target.java:385)
  
  [groovy]    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
  
  [groovy]    at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
  
  [groovy]    at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
  
  [groovy]    at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
  
  [groovy]    at org.apache.tools.ant.Main.runBuild(Main.java:758)
  
  [groovy]    at org.apache.tools.ant.Main.startAnt(Main.java:217)
  
  [groovy]    at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
  
  [groovy]    at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
  
  [groovy] Caused by: java.sql.SQLSyntaxErrorException: ORA-00933: SQL command not properly ended
  
  [groovy] 
  
  [groovy]    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:447)
  
  [groovy]    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396)
  
  [groovy]    at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:951)
  
  [groovy]    at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:513)
  
  [groovy]    at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:227)
  
  [groovy]    at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:531)
  
  [groovy]    at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:195)
  
  [groovy]    at oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:1036)
  
  [groovy]    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1336)
  
  [groovy]    at oracle.jdbc.driver.OracleStatement.executeInternal(OracleStatement.java:1916)
  
  [groovy]    at oracle.jdbc.driver.OracleStatement.execute(OracleStatement.java:1878)
  
  [groovy]    at oracle.jdbc.driver.OracleStatementWrapper.execute(OracleStatementWrapper.java:318)
  
  [groovy]    at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:294)
  
  [groovy]    at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:54)
  
  [groovy]    ... 89 more
  
  [groovy] INFO 2/24/16 12:47 PM:liquibase: /tmp/java_build/DRUG_T0075016/Template/DRUG_T0075016/sql_tmp/db.changelog-standard.2.xml::2::system: Successfully released change log lock
  
  BUILD FAILED
  
  /repositories/tools/ant/gradle_wsql.build.xml:471: The following error occurred while executing this line:
  
  /repositories/tools/ant/gradle_wsql.build.xml:497: The following error occurred while executing this line:
  
  /repositories/tools/ant/gradle_wsql.build.xml:673: The following error occurred while executing this line:
  
  /repositories/tools/ant/gradle_wsql.build.xml:694: liquibase.exception.MigrationFailedException: Migration failed for change set /tmp/java_build/DRUG_T0075016/Template/DRUG_T0075016/sql_tmp/db.changelog-standard.2.xml::2::system:
  
   Reason: liquibase.exception.DatabaseException: Error executing SQL GRANT EXECUTE ON SPT_ADD_SI_EVENT_RECIPIENT TO PROJECT_SUPPORT_RW, APPSUPPORT_RW, PROJECT_ANALYST_RW, DB_DATASUPPORT_RW;: ORA-00933: SQL command not properly ended
  </code></pre>