kimptoc / dbdeploy

Automatically exported from code.google.com/p/dbdeploy
0 stars 0 forks source link

Prescence of comments in SQL file causes java.lang.RuntimeException: java.sql.SQLException: Invalid SQL type #40

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. add a sql file to a migration set that contains comments which start 
with --
2. run the dbdeploy process
3. build process fails with java.lang.RuntimeException: 
java.sql.SQLException: Invalid SQL type
4. If the comments are deleted and the process is re-run, then no 
exceptions are thrown.

What version of the product are you using? db-deploy 3.0M2
On what operating system? windows
Database: Oracle

Please provide any additional information below.

BUILD FAILED
C:\Documents and Settings\barretni\My Documents\development\db-
deploy\build.xml:110: The following error occurred while executing this 
line:
C:\Documents and Settings\barretni\My Documents\development\db-
deploy\build-macros.xml:16: java.lang.RuntimeException: 
java.sql.SQLException: Invalid SQL type
        at com.dbdeploy.appliers.DirectToDbApplier.applyChangeScriptContent
(DirectToDbApplier.java:50)
        at com.dbdeploy.appliers.DirectToDbApplier.apply
(DirectToDbApplier.java:29)
        at com.dbdeploy.Controller.processChangeScripts(Controller.java:40)
        at com.dbdeploy.DbDeploy.go(DbDeploy.java:111)
        at com.dbdeploy.AntTarget.execute(AntTarget.java:35)
        at org.apache.tools.ant.UnknownElement.execute
(UnknownElement.java:291)
        at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:618)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute
(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.taskdefs.Sequential.execute
(Sequential.java:68)
        at org.apache.tools.ant.UnknownElement.execute
(UnknownElement.java:291)
        at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:618)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute
(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.taskdefs.MacroInstance.execute
(MacroInstance.java:398)
        at org.apache.tools.ant.UnknownElement.execute
(UnknownElement.java:291)
        at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:618)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute
(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:390)
        at org.apache.tools.ant.Target.performTasks(Target.java:411)
        at org.apache.tools.ant.Project.executeSortedTargets
(Project.java:1360)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1329)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets
(DefaultExecutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1212)
        at org.apache.tools.ant.Main.runBuild(Main.java:801)
        at org.apache.tools.ant.Main.startAnt(Main.java:218)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
Caused by: java.sql.SQLException: Invalid SQL type
        at oracle.jdbc.driver.DatabaseError.throwSqlException
(DatabaseError.java:125)
        at oracle.jdbc.driver.DatabaseError.throwSqlException
(DatabaseError.java:162)
        at oracle.jdbc.driver.DatabaseError.throwSqlException
(DatabaseError.java:227)
        at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:64)
        at oracle.jdbc.driver.T4CStatement.execute_for_rows
(T4CStatement.java:475)
        at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout
(OracleStatement.java:1027)
        at oracle.jdbc.driver.OracleStatement.execute
(OracleStatement.java:1515)
        at com.dbdeploy.database.changelog.QueryExecuter.execute
(QueryExecuter.java:22)
        at com.dbdeploy.appliers.DirectToDbApplier.applyChangeScriptContent
(DirectToDbApplier.java:47)
        ... 34 more

Total time: 1 second

Original issue reported on code.google.com by Nick.bar...@gmail.com on 4 May 2010 at 9:56

GoogleCodeExporter commented 9 years ago
related to this ant bug?
https://issues.apache.org/bugzilla/show_bug.cgi?id=43413

Original comment by chris.sh...@gmail.com on 3 Jun 2010 at 7:04

GoogleCodeExporter commented 9 years ago
also 
/* blah
   blah
*/

Original comment by jscott...@gmail.com on 3 Aug 2010 at 2:44

GoogleCodeExporter commented 9 years ago
It also reproduced if it is started without ANT (directly from the java-code)

Original comment by Andrey.Chorniy on 17 Sep 2010 at 1:47