WebLogic deployment error: Cannot read plugin classes from protocol zip

Hi all,

First off this is really great open source project. Many thanks to the authors.

I’ve integrated the Liquibase ServletListener into our development environment which works fine on Tomcat, but fails when deployed on Weblogic 10.

Below is the relevant stackTrace:

liquibase.exception.UnexpectedLiquibaseException: Cannot read plugin classes from protocol zip
            at liquibase.servicelocator.ServiceLocator.findClasses(ServiceLocator.java:195)
            at liquibase.servicelocator.ServiceLocator.findClasses(ServiceLocator.java:129)
            at liquibase.database.DatabaseFactory.(DatabaseFactory.java:17)
            at liquibase.database.DatabaseFactory.getInstance(DatabaseFactory.java:32)

I’ve noticed a similar post couple of days ago for JBoss 5. I think WebLogic also has a funky abstraction of the file system.

For our needs we only target SQL Server so I wonder if I could work around the issue as follows:

  • Copy LiquibaseServletListener into our project
  • Change the Database lookup logic as follows:

    // Database database = DatabaseFactory.getInstance().findCorrectDatabaseImplementation(new JdbcConnection(connection));
    MSSQLDatabase database = new MSSQLDatabase();
    database.setConnection(new JdbcConnection(connection));

Are there any issues with this? I guess I’ll find out soon enough when we redeploy :wink:

Kind regards

Bob

Replying to my own post.

The above change gets me a little further but not by much:

liquibase.exception.UnexpectedLiquibaseException: Cannot read plugin classes from protocol zip
at liquibase.servicelocator.ServiceLocator.findClasses(ServiceLocator.java:195)
at liquibase.servicelocator.ServiceLocator.findClasses(ServiceLocator.java:129)
at liquibase.servicelocator.ServiceLocator.findClass(ServiceLocator.java:84)
at liquibase.servicelocator.ServiceLocator.newInstance(ServiceLocator.java:144)
at liquibase.logging.LogFactory.getLogger(LogFactory.java:17)
at liquibase.logging.LogFactory.getLogger(LogFactory.java:30)
at liquibase.database.AbstractDatabase.setConnection(AbstractDatabase.java:84)

So it seems that liquibase is quite dependent on the ServiceLocator to scan for classes?

Kind regards

Bob

I should have said that I was using 2.0-RC2 before. Just tested with 1.9.5 which works fine. Phew :slight_smile:

Kind regards

Bob

http://liquibase.org/forum/index.php?topic=586.0