Unable to run liquibase-2.0.b2 from download site

I wanted to try and utilize liquibase-2.0.b2 from the download section of the site, however, after uploading it to a Solaris server (where I have 1.9.4 working fine, the liquibase-2.0.b2.jar doesn’t seem to run properly.

In the 1.9.4 version, I can kick off liquibase --version and get a response back. With the new 2.0, this is not possible and it seems to be an issue with the .jar.

% uname -a
SunOS wdszd4064 5.10 Generic_138888-01 sun4u sparc SUNW,Sun-Fire-V490

% liquibase
Exception in thread “main” java.lang.NoClassDefFoundError: liquibase/commandline/Main

% liquibase --version
Exception in thread “main” java.lang.NoClassDefFoundError: liquibase/commandline/Main

Kicking it off utilizing java specifically, I get some odd zip error.

java -jar liquibase-2.0.b2.jar --changeLogFile=update.xml update

Migration Failed: liquibase.exception.ServiceNotFoundException: java.util.zip.ZipException: error in opening zip file

% java -jar liquibase-2.0.b2.jar --changeLogFile=update.xml update --logLevel=finest
Migration Failed: liquibase.exception.ServiceNotFoundException: java.util.zip.ZipException: error in opening zip file.  For more information, use the --logLevel flag)
Aug 27, 2009 10:19:22 AM liquibase.logging.JavaUtilLogger severe
SEVERE: liquibase.exception.ServiceNotFoundException: java.util.zip.ZipException: error in opening zip file
java.lang.ExceptionInInitializerError
        at liquibase.integration.commandline.CommandLineUtils.createDatabaseObject(CommandLineUtils.java:62)
        at liquibase.integration.commandline.Main.doMigration(Main.java:589)
        at liquibase.integration.commandline.Main.main(Main.java:106)
Caused by: java.lang.RuntimeException: liquibase.exception.ServiceNotFoundException: java.util.zip.ZipException: error in opening zip file
        at liquibase.database.DatabaseFactory.(DatabaseFactory.java:27)
        at liquibase.database.DatabaseFactory.(DatabaseFactory.java:14)
        … 3 more
Caused by: liquibase.exception.ServiceNotFoundException: java.util.zip.ZipException: error in opening zip file
        at liquibase.servicelocator.ServiceLocator.getClasses(ServiceLocator.java:99)
        at liquibase.database.DatabaseFactory.(DatabaseFactory.java:20)
        … 4 more
Caused by: java.util.zip.ZipException: error in opening zip file
        at java.util.zip.ZipFile.open(Native Method)
        at java.util.zip.ZipFile.(ZipFile.java:203)
        at java.util.jar.JarFile.(JarFile.java:132)
        at java.util.jar.JarFile.(JarFile.java:97)
        at liquibase.servicelocator.ServiceLocator.findClasses(ServiceLocator.java:129)
        at liquibase.servicelocator.ServiceLocator.getClasses(ServiceLocator.java:94)
        … 5 more

I wanted to try this new 2.0, to see if it solves some rollback issues I’m having (can’t rollback after I surpass a certain number of changesets), in which I really do need to rollback a set of over 100 changes, and none of the rollback options in 1.9.4 are currently functioning with that many changesets.

Thanks!

It looks like a problem with the beta2 build.  I’ll have to make sure it is fixed before the beta3 release.

I would guess that the current state of beta2 is not going to solve your problem.  We have been primarily making code architecture changes and am pretty sure we have broken more functionality currently than we have fixed or improved.  We are working to et beta3 out as the last rearchitecting beta before we move our focus on new features and QA.

What problems are you seeing trying to rollback your changelog?

Nathan

I think it is problem with calculating absolute path from url on Unix (they must start with /).
It’s fixed in trunk (revision 1068)

For details, see: http://liquibase.jira.com/source/browse/CORE/trunk/liquibase-core/src/main/java/liquibase/servicelocator/ServiceLocator.java?r1=1066&r2=1067

Thanks for the update! In response to Nathan’s question, it is the problem identical to post:
http://liquibase.org/forum/index.php?topic=85.0

Basically, the date format or if i put single quotes, double quotes or no quotes around the date format, nothing else is returned except:
Migration Failed: Unexpected date/time format.  Use ‘yyyy-MM-dd HH:mm:ss’

I can rollback currently based on ‘tag’, however, it would be entirely useful to be able to rollback to a specific date, instead of in sections, as I have designed it now.

I can rollback currently based on 'tag', however, it would be entirely useful to be able to rollback to a specific date, instead of in sections, as I have designed it now.

Liquibase has a few rollback commands. They are rollback [tag] (the one you’re using), rollbackToDate [date] (the one you’re after) and rollbackCount [number of change sets to roll back]. You can even generate a future rollback of your current migration with futureRollbackSql in case you need to revert that release.

Christian.

I get the same exception with Beta 3 when running the command updateSQL

    Unexpected error running LiquiBase: liquibase.exception.ServiceNotFoundException: liquibase.exception.ServiceNotFoundException: Could not find implementation of liquibase.logging.Logger Exception in thread "main" liquibase.exception.ServiceNotFoundException: liquibase.exception.ServiceNotFoundException: liquibase.exception.ServiceNotFoundException: Could not find implementation of liquibase.logging.Logger         at liquibase.logging.LogFactory.getLogger(LogFactory.java:19)         at liquibase.logging.LogFactory.getLogger(LogFactory.java:30)         at liquibase.integration.commandline.Main.main(Main.java:132) Caused by: liquibase.exception.ServiceNotFoundException: liquibase.exception.ServiceNotFoundException: Could not find implementation of liquibase.logging.Logger         at liquibase.servicelocator.ServiceLocator.newInstance(ServiceLocator.java:146)         at liquibase.logging.LogFactory.getLogger(LogFactory.java:17)         ... 2 more Caused by: liquibase.exception.ServiceNotFoundException: Could not find implementation of liquibase.logging.Logger         at liquibase.servicelocator.ServiceLocator.findClass(ServiceLocator.java:101)         at liquibase.servicelocator.ServiceLocator.newInstance(ServiceLocator.java:144)         ... 3 more

I fixed it.  Unfortunately I won’t be able to upload a beta4 release for a couple hours.  I will announce when it is available.

Thanks for the report.

Nathan

Beta 4 is now available (http://blog.liquibase.org/2009/09/liquibase-2-0-beta-4-released.html)

Let me know if you continue to have problems.

Nathan