Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.3
-
Fix Version/s: 1.4
-
Labels:None
-
Environment:ubuntu, java 1.6,
-
Patch Submitted:Yes
-
Number of attachments :
Description
The plugin throws an exception when executing an update script against Lucid. (Fails for create table, drop table, and insert, at least.)
[INFO] Executing file: [...] create_table.sql
[ERROR] Failed to execute: CREATE TABLE [... my table]
[ERROR] java.sql.SQLException: java.lang.NullPointerException
at de.simplicit.vjdbc.VirtualStatement.getResultSet(VirtualStatement.java:152)
at org.codehaus.mojo.sql.SqlExecMojo.execSQL(SqlExecMojo.java:817)
at org.codehaus.mojo.sql.SqlExecMojo.runStatements(SqlExecMojo.java:782)
at org.codehaus.mojo.sql.SqlExecMojo.access$200(SqlExecMojo.java:53)
at org.codehaus.mojo.sql.SqlExecMojo$Transaction.runTransaction(SqlExecMojo.java:992)
at org.codehaus.mojo.sql.SqlExecMojo$Transaction.access$100(SqlExecMojo.java:939)
at org.codehaus.mojo.sql.SqlExecMojo.execute(SqlExecMojo.java:463)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
The problem seems to be an exact replica of this bug for ant sql exec:
https://issues.apache.org/bugzilla/show_bug.cgi?id=36265
I made a local patch of Maven Sql plugin using the fix in the ant sql bug report and this solved the problem.
(The patch conforms to my local coding standards so unfortunately has lots of trivial changes. You may prefer to make the change directly to the code yourselves)
Steve, could you try to create the patch again, but this time without all the formatting changes?
This way it's just too hard to figure out the real differences.
If you your attachment you'll see why