|
Using the migrate plugin for MyBatis
(http://code.google.com/p/maven-migrate-plugin/) I sometimes get an error on the changelog script where it says: [18:18:35]: [INFO] -- BigInteger and String compatible fields respectively. [18:18:35]: [INFO] CREATE TABLE CHANGELOG ( [18:18:35]: [INFO] ID NUMERIC(20,0) NOT NULL, [18:18:35]: [INFO] APPLIED_AT VARCHAR(25) NOT NULL, [18:18:35]: [INFO] DESCRIPTION VARCHAR(255) NOT NULL [18:18:35]: [INFO] ) [18:18:35]: [INFO] [18:18:35]: [INFO] ALTER TABLE CHANGELOG [18:18:35]: [INFO] ADD CONSTRAINT PK_CHANGELOG [18:18:35]: [INFO] PRIMARY KEY (id) [18:18:35]: [INFO] [18:18:35]: [INFO] ------------------------------------------------------------------------ [18:18:35]: [ERROR] FATAL ERROR [18:18:35]: [INFO] ------------------------------------------------------------------------ [18:18:35]: [INFO] Error executing command. Cause: org.apache.ibatis.migration.MigrationException: Error querying last applied migration. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'beetle.CHANGELOG' doesn't exist [18:18:35]: [INFO] ------------------------------------------------------------------------ [18:18:35]: [INFO] Trace [18:18:35]: org.apache.ibatis.migration.MigrationException: Error executing command. Cause: org.apache.ibatis.migration.MigrationException: Error querying last applied migration. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'beetle.CHANGELOG' doesn't exist [18:18:35]: at org.apache.ibatis.migration.commands.UpCommand.execute(UpCommand.java:52) [18:18:35]: at com.googlecode.mvnmigrate.UpCommandMojo.execute(UpCommandMojo.java:54) [18:18:35]: at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490) I don't know why it's apparently not creating the CHANGELOG table but I can't seem to find a way to enable debugging info on migrations or the plugin. Is there any way to see that? |
|
Hi Tim,
the maven-migrate-plugin is not officially supported (yet) by the MyBatis community, I cc-ed the original author (is a close friend of mine) that's maintaining the code, feel free to ask him, he'll be able to reply to your questions. Have a nice day and thanks for your interest on it! Simo http://people.apache.org/~simonetripodi/ http://www.99soft.org/ On Wed, Sep 8, 2010 at 7:23 PM, Tim <[hidden email]> wrote: > Using the migrate plugin for MyBatis > (http://code.google.com/p/maven-migrate-plugin/) > I sometimes get an error on the changelog script where it says: > > [18:18:35]: [INFO] -- BigInteger and String compatible fields respectively. > [18:18:35]: [INFO] CREATE TABLE CHANGELOG ( > [18:18:35]: [INFO] ID NUMERIC(20,0) NOT NULL, > [18:18:35]: [INFO] APPLIED_AT VARCHAR(25) NOT NULL, > [18:18:35]: [INFO] DESCRIPTION VARCHAR(255) NOT NULL > [18:18:35]: [INFO] ) > [18:18:35]: [INFO] > [18:18:35]: [INFO] ALTER TABLE CHANGELOG > [18:18:35]: [INFO] ADD CONSTRAINT PK_CHANGELOG > [18:18:35]: [INFO] PRIMARY KEY (id) > [18:18:35]: [INFO] > [18:18:35]: [INFO] > ------------------------------------------------------------------------ > [18:18:35]: [ERROR] FATAL ERROR > [18:18:35]: [INFO] > ------------------------------------------------------------------------ > [18:18:35]: [INFO] Error executing command. Cause: > org.apache.ibatis.migration.MigrationException: Error querying last > applied migration. Cause: > com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table > 'beetle.CHANGELOG' doesn't exist > [18:18:35]: [INFO] > ------------------------------------------------------------------------ > [18:18:35]: [INFO] Trace > [18:18:35]: org.apache.ibatis.migration.MigrationException: Error > executing command. Cause: > org.apache.ibatis.migration.MigrationException: Error querying last > applied migration. Cause: > com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table > 'beetle.CHANGELOG' doesn't exist > [18:18:35]: at org.apache.ibatis.migration.commands.UpCommand.execute(UpCommand.java:52) > [18:18:35]: at com.googlecode.mvnmigrate.UpCommandMojo.execute(UpCommandMojo.java:54) > [18:18:35]: at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490) > > I don't know why it's apparently not creating the CHANGELOG table but > I can't seem to find a way to enable debugging info on migrations or > the plugin. > Is there any way to see that? > |
|
In reply to this post by Tim
Hello Tim, sorry for my delay,
1) you can activate the trace with mvn-X migration:up 2) one question, but the error happens always or only sometimes? can you post the debug trace? and, finally, what version of mvnmigration plugin you're using? Have a nice day and tnx for you help -- Marco Speranza <[hidden email]> On 8 Set, 19:23, Tim <[hidden email]> wrote: > Using the migrate plugin for MyBatis > (http://code.google.com/p/maven-migrate-plugin/) > I sometimes get an error on the changelog script where it says: > > [18:18:35]: [INFO] -- BigInteger and String compatible fields respectively. > [18:18:35]: [INFO] CREATE TABLE CHANGELOG ( > [18:18:35]: [INFO] ID NUMERIC(20,0) NOT NULL, > [18:18:35]: [INFO] APPLIED_AT VARCHAR(25) NOT NULL, > [18:18:35]: [INFO] DESCRIPTION VARCHAR(255) NOT NULL > [18:18:35]: [INFO] ) > [18:18:35]: [INFO] > [18:18:35]: [INFO] ALTER TABLE CHANGELOG > [18:18:35]: [INFO] ADD CONSTRAINT PK_CHANGELOG > [18:18:35]: [INFO] PRIMARY KEY (id) > [18:18:35]: [INFO] > [18:18:35]: [INFO] > ------------------------------------------------------------------------ > [18:18:35]: [ERROR] FATAL ERROR > [18:18:35]: [INFO] > ------------------------------------------------------------------------ > [18:18:35]: [INFO] Error executing command. Cause: > org.apache.ibatis.migration.MigrationException: Error querying last > applied migration. Cause: > com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table > 'beetle.CHANGELOG' doesn't exist > [18:18:35]: [INFO] > ------------------------------------------------------------------------ > [18:18:35]: [INFO] Trace > [18:18:35]: org.apache.ibatis.migration.MigrationException: Error > executing command. Cause: > org.apache.ibatis.migration.MigrationException: Error querying last > applied migration. Cause: > com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table > 'beetle.CHANGELOG' doesn't exist > [18:18:35]: at org.apache.ibatis.migration.commands.UpCommand.execute(UpCommand.java:52) > [18:18:35]: at com.googlecode.mvnmigrate.UpCommandMojo.execute(UpCommandMojo.java:54) > [18:18:35]: at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManag er.java:490) > > I don't know why it's apparently not creating the CHANGELOG table but > I can't seem to find a way to enable debugging info on migrations or > the plugin. > Is there any way to see that? |
|
Ok thanks Marco. I've already enabled -X but was wondering if there
was a way to just get debugging for the plugin alone. -X works fine though just a bit verbose. This error only happens sometimes but at this point I haven't figured out yet where the problem is. I'm using version 1.0 of the plugin and following the docs. I have a feeling that this error is not with the plugin but due to a problem with a shared mysql server that it's using for testing. Another reason to not use real databases during testing I suppose :P On Fri, Sep 10, 2010 at 2:11 AM, Marco Speranza <[hidden email]> wrote: > Hello Tim, sorry for my delay, > > 1) you can activate the trace with mvn-X migration:up > 2) one question, but the error happens always or only sometimes? > > can you post the debug trace? > and, finally, what version of mvnmigration plugin you're using? > > Have a nice day and tnx for you help > > -- > Marco Speranza <[hidden email]> > > > > On 8 Set, 19:23, Tim <[hidden email]> wrote: >> Using the migrate plugin for MyBatis >> (http://code.google.com/p/maven-migrate-plugin/) >> I sometimes get an error on the changelog script where it says: >> >> [18:18:35]: [INFO] -- BigInteger and String compatible fields respectively. >> [18:18:35]: [INFO] CREATE TABLE CHANGELOG ( >> [18:18:35]: [INFO] ID NUMERIC(20,0) NOT NULL, >> [18:18:35]: [INFO] APPLIED_AT VARCHAR(25) NOT NULL, >> [18:18:35]: [INFO] DESCRIPTION VARCHAR(255) NOT NULL >> [18:18:35]: [INFO] ) >> [18:18:35]: [INFO] >> [18:18:35]: [INFO] ALTER TABLE CHANGELOG >> [18:18:35]: [INFO] ADD CONSTRAINT PK_CHANGELOG >> [18:18:35]: [INFO] PRIMARY KEY (id) >> [18:18:35]: [INFO] >> [18:18:35]: [INFO] >> ------------------------------------------------------------------------ >> [18:18:35]: [ERROR] FATAL ERROR >> [18:18:35]: [INFO] >> ------------------------------------------------------------------------ >> [18:18:35]: [INFO] Error executing command. Cause: >> org.apache.ibatis.migration.MigrationException: Error querying last >> applied migration. Cause: >> com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table >> 'beetle.CHANGELOG' doesn't exist >> [18:18:35]: [INFO] >> ------------------------------------------------------------------------ >> [18:18:35]: [INFO] Trace >> [18:18:35]: org.apache.ibatis.migration.MigrationException: Error >> executing command. Cause: >> org.apache.ibatis.migration.MigrationException: Error querying last >> applied migration. Cause: >> com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table >> 'beetle.CHANGELOG' doesn't exist >> [18:18:35]: at org.apache.ibatis.migration.commands.UpCommand.execute(UpCommand.java:52) >> [18:18:35]: at com.googlecode.mvnmigrate.UpCommandMojo.execute(UpCommandMojo.java:54) >> [18:18:35]: at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManag er.java:490) >> >> I don't know why it's apparently not creating the CHANGELOG table but >> I can't seem to find a way to enable debugging info on migrations or >> the plugin. >> Is there any way to see that? |
| Powered by Nabble | Edit this page |
