Liquibase-3.3.0 -- not working with JBoss vfs

Hi

I have been using Liquibase 2.0.2 and it has been great! Thanks for the wonderful tool.

However, after upgrade to 3.3.0, liquibase start to fail on JBoss EAP 6, when trying to load osgi jar file. I think it is because JBoss use vfs to load file and so does the classpath:

vfs:/E:/JAVA/JBOSS/EAP-6.0.0.GA/jboss-eap-6.0/standalone/deployments/My.App.version.01.war/WEB-INF/lib/liquibase-osgi-3.3.0-SNAPSHOT.jar
So when org.liquibase.util.FileUtl tries to open the jar file

File tempDir = File.createTempFile("liquibase-unzip", ".dir");

tempDir.delete();

tempDir.mkdir();

JarFile jarFile = new JarFile(zipFile);

please note the zip file is "vfs:/E:/JAVA/JBOSS/EAP-6.0.0.GA/jboss-eap-6.0/standalone/deployments/My.App.version.01.war/WEB-INF/lib/liquibase-osgi-3.3.0-SNAPSHOT.jar"

then it throws an error:

vfs:/E:/JAVA/JBOSS/EAP-6.0.0.GA/jboss-eap-6.0/standalone/deployments/My.App.version.01.war/WEB-INF/lib/liquibase-osgi-3.3.0-SNAPSHOT.jar' for classes due to an IOException: vfs:\E:\JAVA\JBOSS\EAP-6.0.0.GA\jboss-eap-6.0\standalone\deployments\My.App.version.01.war\WEB-INF\lib\liquibase-osgi-3.3.0-SNAPSHOT.jar (The filename, directory name, or volume label syntax is incorrect)

I am sure the file exist in the classpath however either Jboss or liquibase failed to load the file.

please help thanks

Can you try it with Liquibase 3.3.3?

Nathan

I am guessing the the vfs: prefix is referring to commons-vfs, which is supposed to allow access to differing file systems somewhat transparently. In this case, it appears that JBoss may be using it to get to a file that is inside a WAR file.

I think for this to work, either Liquibase will need to incorporate commons-vfs, or JBoss will need to expand the war file and provide a path to the expanded files on disk.

Steve Donie
Principal Software Engineer
Datical, Inc. http://www.datical.com/

Hi Nathan

sorry for the late response. We upgrade Liquibase to 3.3.5 but the issue still occurs when deploy in JBoss.

Looks like Liquibase still fails if refering jar file using vfs in the classpath,

10:11:15,997 ERROR [stderr] (MSC service thread 1-8) WARNING 10/16/15 10:11 AM: liquibase: Cannot search jar file

‘vfs :/C:/Windows/System32/content/MyApp.Test.With.Liquibase.with.jboss…war/WEB-INF/lib/liquibase-osgi-3.3.5.jar’ for classes due to an IOException: vfs:\C:\Windows\System32\content\MyApp.Test.With.Liquibase.with.jboss…war\WEB-INF\lib\liquibase-osgi-3.3.5.jar (The filename, directory name, or volume label syntax is incorrect)

10:11:15,998 ERROR [stderr] (MSC service thread 1-8) java.io.FileNotFoundException :

vfs:\C:\Windows\System32\content\MyApp.Test.With.Liquibase.with.jboss…war\WEB-INF\lib\liquibase-osgi-3.3.5.jar (The filename, directory name, or volume label syntax is incorrect)