Cannot read plugin classes from protocol vfszip

Hi,

I’m using liquibase with hibernate and spring. After migrating to 2.0 rc 2 I have the following exception. I tried to handle the ‘vfszip’ case in liquibase.servicelocator.ServiceLocator :
if (resource.getProtocol().equals(“jar”) || resource.getProtocol().equals(“vfszip”)) with no success.

Caused by: liquibase.exception.ServiceNotFoundException: liquibase.exception.UnexpectedLiquibaseException: Cannot read plugin classes from protocol vfszip
at liquibase.servicelocator.ServiceLocator.findClasses(ServiceLocator.java:134)
at liquibase.servicelocator.ServiceLocator.findClass(ServiceLocator.java:84)
at liquibase.servicelocator.ServiceLocator.newInstance(ServiceLocator.java:144)
… 86 more
Caused by: liquibase.exception.UnexpectedLiquibaseException: Cannot read plugin classes from protocol vfszip
at liquibase.servicelocator.ServiceLocator.findClasses(ServiceLocator.java:195)
at liquibase.servicelocator.ServiceLocator.findClasses(ServiceLocator.java:129)
… 88 more

It appears to be a feature of jboss 5.  I created an issue to fix it:  http://liquibase.jira.com/browse/CORE-664

Nathan

I saw that the bug has been fixed. How should I test it?
I tried to build from trunk, but some test failed.
I switched to tag 2.0-rc2 and the build failed again with Error deploying artifact: Authentication failed: Cannot connect. Reason: java.net.UnknownHostException: repo1.

What tests are failing for you?  It should build correctly from trunk.

I’m working on deploying RC3 now that should have the fix in.  I think your repo1 hostexception is from some of the maven repository configuration I was testing.

Nathan

I checked out from tags/rc-3 and the build was OK. But the spring integration still doesn’t work:

Caused by: 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.integration.spring.SpringLiquibase.(SpringLiquibase.java:125)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:126)
… 79 more
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)
… 85 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)
… 86 more

Here are some debug messages:
15:04:48,750 ERROR [STDERR] DEBUG 10-7-19 15:04:liquibase: ServiceLocator.findClasses for liquibase.logging.Logger
15:04:48,750 ERROR [STDERR] DEBUG 10-7-19 15:04:liquibase: ServiceLocator scanning liquibase.change with resoureAccessor liquibase.resource.ClassLoaderResourceAccessor
15:04:48,750 ERROR [STDERR] DEBUG 10-7-19 15:04:liquibase: Found liquibase.change in vfszip:/F:/Work/.metadata/.plugins/org.jboss.ide.eclipse.as.core/JBoss_5.1_Runtime_Server1273061544806/deploy/Brokers.war/WEB-INF/lib/liquibase.jar/liquibase/change/
15:04:48,750 ERROR [STDERR] DEBUG 10-7-19 15:04:liquibase: ServiceLocator finding liquibase.change classes in vfszip:/F:/Work/.metadata/.plugins/org.jboss.ide.eclipse.as.core/JBoss_5.1_Runtime_Server1273061544806/deploy/Brokers.war/WEB-INF/lib/liquibase.jar/liquibase/change/ matching interface liquibase.logging.Logger
15:04:48,750 ERROR [STDERR] DEBUG 10-7-19 15:04:liquibase: ServiceLocator scanning liquibase.database with resoureAccessor liquibase.resource.ClassLoaderResourceAccessor
15:04:48,750 ERROR [STDERR] DEBUG 10-7-19 15:04:liquibase: Found liquibase.database in vfszip:/F:/Work/.metadata/.plugins/org.jboss.ide.eclipse.as.core/JBoss_5.1_Runtime_Server1273061544806/deploy/Brokers.war/WEB-INF/lib/liquibase.jar/liquibase/database/
15:04:48,750 ERROR [STDERR] DEBUG 10-7-19 15:04:liquibase: ServiceLocator finding liquibase.database classes in vfszip:/F:/Work/.metadata/.plugins/org.jboss.ide.eclipse.as.core/JBoss_5.1_Runtime_Server1273061544806/deploy/Brokers.war/WEB-INF/lib/liquibase.jar/liquibase/database/ matching interface liquibase.logging.Logger
15:04:48,750 ERROR [STDERR] DEBUG 10-7-19 15:04:liquibase: ServiceLocator scanning liquibase.parser with resoureAccessor liquibase.resource.ClassLoaderResourceAccessor
15:04:48,750 ERROR [STDERR] DEBUG 10-7-19 15:04:liquibase: Found liquibase.parser in vfszip:/F:/Work/.metadata/.plugins/org.jboss.ide.eclipse.as.core/JBoss_5.1_Runtime_Server1273061544806/deploy/Brokers.war/WEB-INF/lib/liquibase.jar/liquibase/parser/
15:04:48,750 ERROR [STDERR] DEBUG 10-7-19 15:04:liquibase: ServiceLocator finding liquibase.parser classes in vfszip:/F:/Work/.metadata/.plugins/org.jboss.ide.eclipse.as.core/JBoss_5.1_Runtime_Server1273061544806/deploy/Brokers.war/WEB-INF/lib/liquibase.jar/liquibase/parser/ matching interface liquibase.logging.Logger
15:04:48,750 ERROR [STDERR] DEBUG 10-7-19 15:04:liquibase: ServiceLocator scanning liquibase.precondition with resoureAccessor liquibase.resource.ClassLoaderResourceAccessor
15:04:48,750 ERROR [STDERR] DEBUG 10-7-19 15:04:liquibase: Found liquibase.precondition in vfszip:/F:/Work/.metadata/.plugins/org.jboss.ide.eclipse.as.core/JBoss_5.1_Runtime_Server1273061544806/deploy/Brokers.war/WEB-INF/lib/liquibase.jar/liquibase/precondition/
15:04:48,750 ERROR [STDERR] DEBUG 10-7-19 15:04:liquibase: ServiceLocator finding liquibase.precondition classes in vfszip:/F:/Work/.metadata/.plugins/org.jboss.ide.eclipse.as.core/JBoss_5.1_Runtime_Server1273061544806/deploy/Brokers.war/WEB-INF/lib/liquibase.jar/liquibase/precondition/ matching interface liquibase.logging.Logger
15:04:48,750 ERROR [STDERR] DEBUG 10-7-19 15:04:liquibase: ServiceLocator scanning liquibase.serializer with resoureAccessor liquibase.resource.ClassLoaderResourceAccessor
15:04:48,750 ERROR [STDERR] DEBUG 10-7-19 15:04:liquibase: Found liquibase.serializer in vfszip:/F:/Work/.metadata/.plugins/org.jboss.ide.eclipse.as.core/JBoss_5.1_Runtime_Server1273061544806/deploy/Brokers.war/WEB-INF/lib/liquibase.jar/liquibase/serializer/
15:04:48,750 ERROR [STDERR] DEBUG 10-7-19 15:04:liquibase: ServiceLocator finding liquibase.serializer classes in vfszip:/F:/Work/.metadata/.plugins/org.jboss.ide.eclipse.as.core/JBoss_5.1_Runtime_Server1273061544806/deploy/Brokers.war/WEB-INF/lib/liquibase.jar/liquibase/serializer/ matching interface liquibase.logging.Logger
15:04:48,750 ERROR [STDERR] DEBUG 10-7-19 15:04:liquibase: ServiceLocator scanning liquibase.sqlgenerator with resoureAccessor liquibase.resource.ClassLoaderResourceAccessor
15:04:48,750 ERROR [STDERR] DEBUG 10-7-19 15:04:liquibase: Found liquibase.sqlgenerator in vfszip:/F:/Work/.metadata/.plugins/org.jboss.ide.eclipse.as.core/JBoss_5.1_Runtime_Server1273061544806/deploy/Brokers.war/WEB-INF/lib/liquibase.jar/liquibase/sqlgenerator/
15:04:48,750 ERROR [STDERR] DEBUG 10-7-19 15:04:liquibase: ServiceLocator finding liquibase.sqlgenerator classes in vfszip:/F:/Work/.metadata/.plugins/org.jboss.ide.eclipse.as.core/JBoss_5.1_Runtime_Server1273061544806/deploy/Brokers.war/WEB-INF/lib/liquibase.jar/liquibase/sqlgenerator/ matching interface liquibase.logging.Logger
15:04:48,750 ERROR [STDERR] DEBUG 10-7-19 15:04:liquibase: ServiceLocator scanning liquibase.executor with resoureAccessor liquibase.resource.ClassLoaderResourceAccessor
15:04:48,750 ERROR [STDERR] DEBUG 10-7-19 15:04:liquibase: Found liquibase.executor in vfszip:/F:/Work/.metadata/.plugins/org.jboss.ide.eclipse.as.core/JBoss_5.1_Runtime_Server1273061544806/deploy/Brokers.war/WEB-INF/lib/liquibase.jar/liquibase/executor/
15:04:48,750 ERROR [STDERR] DEBUG 10-7-19 15:04:liquibase: ServiceLocator finding liquibase.executor classes in vfszip:/F:/Work/.metadata/.plugins/org.jboss.ide.eclipse.as.core/JBoss_5.1_Runtime_Server1273061544806/deploy/Brokers.war/WEB-INF/lib/liquibase.jar/liquibase/executor/ matching interface liquibase.logging.Logger
15:04:48,750 ERROR [STDERR] DEBUG 10-7-19 15:04:liquibase: ServiceLocator scanning liquibase.snapshot with resoureAccessor liquibase.resource.ClassLoaderResourceAccessor
15:04:48,765 ERROR [STDERR] DEBUG 10-7-19 15:04:liquibase: Found liquibase.snapshot in vfszip:/F:/Work/.metadata/.plugins/org.jboss.ide.eclipse.as.core/JBoss_5.1_Runtime_Server1273061544806/deploy/Brokers.war/WEB-INF/lib/liquibase.jar/liquibase/snapshot/
15:04:48,765 ERROR [STDERR] DEBUG 10-7-19 15:04:liquibase: ServiceLocator finding liquibase.snapshot classes in vfszip:/F:/Work/.metadata/.plugins/org.jboss.ide.eclipse.as.core/JBoss_5.1_Runtime_Server1273061544806/deploy/Brokers.war/WEB-INF/lib/liquibase.jar/liquibase/snapshot/ matching interface liquibase.logging.Logger
15:04:48,765 ERROR [STDERR] DEBUG 10-7-19 15:04:liquibase: ServiceLocator scanning liquibase.logging with resoureAccessor liquibase.resource.ClassLoaderResourceAccessor
15:04:48,765 ERROR [STDERR] DEBUG 10-7-19 15:04:liquibase: Found liquibase.logging in vfszip:/F:/Work/.metadata/.plugins/org.jboss.ide.eclipse.as.core/JBoss_5.1_Runtime_Server1273061544806/deploy/Brokers.war/WEB-INF/lib/liquibase.jar/liquibase/logging/
15:04:48,765 ERROR [STDERR] DEBUG 10-7-19 15:04:liquibase: ServiceLocator finding liquibase.logging classes in vfszip:/F:/Work/.metadata/.plugins/org.jboss.ide.eclipse.as.core/JBoss_5.1_Runtime_Server1273061544806/deploy/Brokers.war/WEB-INF/lib/liquibase.jar/liquibase/logging/ matching interface liquibase.logging.Logger
15:04:48,765 ERROR [STDERR] DEBUG 10-7-19 15:04:liquibase: ServiceLocator scanning liquibase.ext with resoureAccessor liquibase.resource.ClassLoaderResourceAccessor

Brokers.war is a directory. liquibase.jar is a jar file.

Tell me if you need some help fixing this bug.

Hi Nathan,

You might be interested in the class scanning work done in the Stripes framework. Specifically the ResolverUtil class[1]. The method of interest is listClassResources. In Apache Click we have used the same code in order to work scan for files under the JBoss5 and WebLogic file systems.

Hope this information is of use.

Kind regards

Bob

[1: http://stripes.svn.sourceforge.net/viewvc/stripes/trunk/stripes/src/net/sourceforge/stripes/util/ResolverUtil.java?revision=1217&content-type=text/plain

Thanks for the reference to ResolverUtil.  I incorporated it into the codebase.  I’ll do a bit more testing and hopefully have a new RC out on sunday.

Nathan

Thanks Nathan, I’ll give it a whirl on WebLogic once the new RC is out and report back any issues.

Kind regards

Bob

I’ve tested trunk and it works fine.

Great, thanks for testing it out.  The ResolverUtils class certainly made fixing the issue easier.  Classloaders and URL formats was a pain to work with.

Nathan