Discussion:
[Liquibase-user] New Topic: NumberFormatException running dropAllDatabaseObject ant task on SQLServer
Liquibase Community Forum
2010-10-06 16:08:06 UTC
Permalink
A new topic, 'NumberFormatException running dropAllDatabaseObject ant task on SQLServer', has been made on a board you are watching.

You can see it at
http://liquibase.org/forum/index.php?topic=731.new#new

The text of the topic is shown below:

Hi folks,

Once I'd reverse-merged revision 1733 out (following the previous problem: http://liquibase.org/forum/index.php?topic=730.0) I now get the following error when running the dropAllDatabaseObject task (again, full stacktrace attached):

liquibase.exception.DatabaseException: java.lang.NumberFormatException: null
at liquibase.Liquibase.dropAll(Liquibase.java:491)

This seems to be a problem introduced by revision 1747 (http://liquibase.jira.com/source/changelog/CORE/?cs=1747): in MSSQLTypeConverter, the error is caused by the following condition (starting on line 59) as "precision" can be null:

if (columnTypeString.equalsIgnoreCase("varbinary") && Long.valueOf(precision) > 8000) {
precision = "max";
}

I've attached a patch which just does a null check in the condition. Don't know if this is correct though.

Best wishes,

Dean.

Unsubscribe to new topics from this board by clicking here: http://liquibase.org/forum/index.php?action=notifyboard;board=1.0

Regards,
The Liquibase Community Forum Team.

Loading...