Thanks, I’ll look into it more.

 

Nathan

 

From: Kojo Gambrah-Sampaney [mailto:kgambrah@gmail.com]
Sent: Wednesday, December 31, 2008 9:06 PM
To: liquibase-user@lists.sourceforge.net
Subject: Re: [Liquibase-user] Liquibase and hibernate annotations

 

Here is my ant build script;

<?xml version="1.0" encoding="UTF-8"?>

<project name="liquibase-payroll">


<target name="prepare">
<path id="classpath">
<fileset dir="../../lib">
<include name="**/*.jar" />
</fileset>

<pathelement location="../../build" />
<!-- <pathelement location="../../build-test" /> -->
<!--<fileset dir="../../release">-->
<!--<include name="**/*.jar"/>-->
<!--</fileset>-->
</path>
<property name="loglevel" value="SEVERE"/>

<property name="db.changelog.file" value="changelogs/mysql/complete/root.changelog.xml" />
<property name="database.url" value="jdbc:mysql://localhost/liquibase" />
<property name="database.username" value="root" />
<property name="database.password" value="pass" />
<property name="database.driver" value="org.gjt.mm.mysql.Driver" />
<property name="prompt.user.if.not.local.database" value="true" />

<fail unless="db.changelog.file">db.changelog.file not set</fail>
<fail unless="database.url">database.url not set</fail>

<fail unless="database.username">database.username not set</fail>
<fail unless="database.password">database.password not set</fail>

<taskdef resource="liquibasetasks.properties">
<classpath refid="classpath" />
</taskdef>
</target>
<target name="hibernate-update" depends="prepare">

<taskdef resource="liquibasetasks.properties">
<classpath refid="classpath" />

</taskdef>

<diffDatabaseToChangeLog driver="org.gjt.mm.mysql.Driver"
url="jdbc:mysql://localhost/payroll" username="root" password="pass"
baseUrl="ejbModule/hibernate.cfg.xml" outputFile="changelog.xml" classpathref="classpath"
baseUsername="root" basePassword="pass">

</diffDatabaseToChangeLog>
</target>

</project>

On Wed, 2008-12-31 at 17:28 -0500, Voxland, Nathan wrote:

The error appears to be from ant trying to open a jar file. 

 

Can you post your ant build script?

Nathan

 

From: Kojo Gambrah-Sampaney [mailto:kgambrah@gmail.com]
Sent: Wednesday, December 31, 2008 10:49 AM
To: liquibase-user@lists.sourceforge.net
Subject: [Liquibase-user] Liquibase and hibernate annotations

 

I am new to liquibase and from the look of things it could prove a very useful solution to
my schema evolution difficulties.

I am using hibernate annotations in my project and my understanding is that since liquibase uses hibernate's API to obtain schema, it doesn't matter if you are using annotations or hbm files.

I have however tried to get it working without success using instructions from
liquibase complains of not being able to connect to the hibernate.xml file with the current driver.

I appreciate any help that will clear my frustration.

this is the full output ;

prepare:
  [taskdef] java.util.zip.ZipException: error in opening zip file
  [taskdef] at java.util.zip.ZipFile.open(Native Method)
  [taskdef] at java.util.zip.ZipFile.<init>(ZipFile.java:114)
  [taskdef] at java.util.zip.ZipFile.<init>(ZipFile.java:131)
  [taskdef] at org.apache.tools.ant.AntClassLoader.getResourceURL(AntClassLoader.java:1014)
  [taskdef] at org.apache.tools.ant.AntClassLoader$ResourceEnumeration.findNextResource(AntClassLoader.java:146)
  [taskdef] at org.apache.tools.ant.AntClassLoader$ResourceEnumeration.nextElement(AntClassLoader.java:129)
  [taskdef] at org.apache.tools.ant.util.CollectionUtils$CompoundEnumeration.nextElement(CollectionUtils.java:198)
  [taskdef] at sun.misc.CompoundEnumeration.nextElement(CompoundEnumeration.java:43)
  [taskdef] at org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:260)
  [taskdef] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
  [taskdef] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  [taskdef] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  [taskdef] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  [taskdef] at java.lang.reflect.Method.invoke(Method.java:597)
  [taskdef] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
  [taskdef] at org.apache.tools.ant.Task.perform(Task.java:348)
  [taskdef] at org.apache.tools.ant.Target.execute(Target.java:357)
  [taskdef] at org.apache.tools.ant.Target.performTasks(Target.java:385)
  [taskdef] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
  [taskdef] at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
  [taskdef] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
  [taskdef] at org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
  [taskdef] at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
  [taskdef] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:423)
  [taskdef] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:137)
  [taskdef] java.util.zip.ZipException: error in opening zip file
  [taskdef] at java.util.zip.ZipFile.open(Native Method)
  [taskdef] at java.util.zip.ZipFile.<init>(ZipFile.java:114)
  [taskdef] at java.util.zip.ZipFile.<init>(ZipFile.java:131)
  [taskdef] at org.apache.tools.ant.AntClassLoader.getResourceURL(AntClassLoader.java:1014)
  [taskdef] at org.apache.tools.ant.AntClassLoader$ResourceEnumeration.findNextResource(AntClassLoader.java:146)
  [taskdef] at org.apache.tools.ant.AntClassLoader$ResourceEnumeration.nextElement(AntClassLoader.java:129)
  [taskdef] at org.apache.tools.ant.util.CollectionUtils$CompoundEnumeration.nextElement(CollectionUtils.java:198)
  [taskdef] at sun.misc.CompoundEnumeration.nextElement(CompoundEnumeration.java:43)
  [taskdef] at org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:260)
  [taskdef] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
  [taskdef] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  [taskdef] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  [taskdef] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  [taskdef] at java.lang.reflect.Method.invoke(Method.java:597)
  [taskdef] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
  [taskdef] at org.apache.tools.ant.Task.perform(Task.java:348)
  [taskdef] at org.apache.tools.ant.Target.execute(Target.java:357)
  [taskdef] at org.apache.tools.ant.Target.performTasks(Target.java:385)
  [taskdef] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
  [taskdef] at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
  [taskdef] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
  [taskdef] at org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
  [taskdef] at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
  [taskdef] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:423)
  [taskdef] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:137)
prepare:
  [taskdef] java.util.zip.ZipException: error in opening zip file
  [taskdef] at java.util.zip.ZipFile.open(Native Method)
  [taskdef] at java.util.zip.ZipFile.<init>(ZipFile.java:114)
  [taskdef] at java.util.zip.ZipFile.<init>(ZipFile.java:131)
  [taskdef] at org.apache.tools.ant.AntClassLoader.getResourceURL(AntClassLoader.java:1014)
  [taskdef] at org.apache.tools.ant.AntClassLoader$ResourceEnumeration.findNextResource(AntClassLoader.java:146)
  [taskdef] at org.apache.tools.ant.AntClassLoader$ResourceEnumeration.nextElement(AntClassLoader.java:129)
  [taskdef] at org.apache.tools.ant.util.CollectionUtils$CompoundEnumeration.nextElement(CollectionUtils.java:198)
  [taskdef] at sun.misc.CompoundEnumeration.nextElement(CompoundEnumeration.java:43)
  [taskdef] at org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:260)
  [taskdef] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
  [taskdef] at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
  [taskdef] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  [taskdef] at java.lang.reflect.Method.invoke(Method.java:597)
  [taskdef] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
  [taskdef] at org.apache.tools.ant.Task.perform(Task.java:348)
  [taskdef] at org.apache.tools.ant.Target.execute(Target.java:357)
  [taskdef] at org.apache.tools.ant.Target.performTasks(Target.java:385)
  [taskdef] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
  [taskdef] at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
  [taskdef] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
  [taskdef] at org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
  [taskdef] at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
  [taskdef] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:423)
  [taskdef] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:137)
  [taskdef] java.util.zip.ZipException: error in opening zip file
  [taskdef] at java.util.zip.ZipFile.open(Native Method)
  [taskdef] at java.util.zip.ZipFile.<init>(ZipFile.java:114)
  [taskdef] at java.util.zip.ZipFile.<init>(ZipFile.java:131)
  [taskdef] at org.apache.tools.ant.AntClassLoader.getResourceURL(AntClassLoader.java:1014)
  [taskdef] at org.apache.tools.ant.AntClassLoader$ResourceEnumeration.findNextResource(AntClassLoader.java:146)
  [taskdef] at org.apache.tools.ant.AntClassLoader$ResourceEnumeration.nextElement(AntClassLoader.java:129)
  [taskdef] at org.apache.tools.ant.util.CollectionUtils$CompoundEnumeration.nextElement(CollectionUtils.java:198)
  [taskdef] at sun.misc.CompoundEnumeration.nextElement(CompoundEnumeration.java:43)
  [taskdef] at org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:260)
  [taskdef] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
  [taskdef] at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
  [taskdef] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  [taskdef] at java.lang.reflect.Method.invoke(Method.java:597)
  [taskdef] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
  [taskdef] at org.apache.tools.ant.Task.perform(Task.java:348)
  [taskdef] at org.apache.tools.ant.Target.execute(Target.java:357)
  [taskdef] at org.apache.tools.ant.Target.performTasks(Target.java:385)
  [taskdef] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
  [taskdef] at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
  [taskdef] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
  [taskdef] at org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
  [taskdef] at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
  [taskdef] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:423)
  [taskdef] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:137)
hibernate-update:
  [taskdef] java.util.zip.ZipException: error in opening zip file
  [taskdef] at java.util.zip.ZipFile.open(Native Method)
  [taskdef] at java.util.zip.ZipFile.<init>(ZipFile.java:114)
  [taskdef] at java.util.zip.ZipFile.<init>(ZipFile.java:131)
  [taskdef] at org.apache.tools.ant.AntClassLoader.getResourceURL(AntClassLoader.java:1014)
  [taskdef] at org.apache.tools.ant.AntClassLoader$ResourceEnumeration.findNextResource(AntClassLoader.java:146)
  [taskdef] at org.apache.tools.ant.AntClassLoader$ResourceEnumeration.nextElement(AntClassLoader.java:129)
  [taskdef] at org.apache.tools.ant.util.CollectionUtils$CompoundEnumeration.nextElement(CollectionUtils.java:198)
  [taskdef] at sun.misc.CompoundEnumeration.nextElement(CompoundEnumeration.java:43)
  [taskdef] at org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:260)
  [taskdef] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
  [taskdef] at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
  [taskdef] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  [taskdef] at java.lang.reflect.Method.invoke(Method.java:597)
  [taskdef] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
  [taskdef] at org.apache.tools.ant.Task.perform(Task.java:348)
  [taskdef] at org.apache.tools.ant.Target.execute(Target.java:357)
  [taskdef] at org.apache.tools.ant.Target.performTasks(Target.java:385)
  [taskdef] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
  [taskdef] at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
  [taskdef] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
  [taskdef] at org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
  [taskdef] at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
  [taskdef] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:423)
  [taskdef] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:137)
  [taskdef] java.util.zip.ZipException: error in opening zip file
  [taskdef] at java.util.zip.ZipFile.open(Native Method)
  [taskdef] at java.util.zip.ZipFile.<init>(ZipFile.java:114)
  [taskdef] at java.util.zip.ZipFile.<init>(ZipFile.java:131)
  [taskdef] at org.apache.tools.ant.AntClassLoader.getResourceURL(AntClassLoader.java:1014)
  [taskdef] at org.apache.tools.ant.AntClassLoader$ResourceEnumeration.findNextResource(AntClassLoader.java:146)
  [taskdef] at org.apache.tools.ant.AntClassLoader$ResourceEnumeration.nextElement(AntClassLoader.java:129)
  [taskdef] at org.apache.tools.ant.util.CollectionUtils$CompoundEnumeration.nextElement(CollectionUtils.java:198)
  [taskdef] at sun.misc.CompoundEnumeration.nextElement(CompoundEnumeration.java:43)
  [taskdef] at org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:260)
  [taskdef] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
  [taskdef] at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
  [taskdef] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  [taskdef] at java.lang.reflect.Method.invoke(Method.java:597)
  [taskdef] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
  [taskdef] at org.apache.tools.ant.Task.perform(Task.java:348)
  [taskdef] at org.apache.tools.ant.Target.execute(Target.java:357)
  [taskdef] at org.apache.tools.ant.Target.performTasks(Target.java:385)
  [taskdef] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
  [taskdef] at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
  [taskdef] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
  [taskdef] at org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
  [taskdef] at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
  [taskdef] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:423)
  [taskdef] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:137)

BUILD FAILED
/home/user/workspace/project/liquibase.xml:47: liquibase.exception.JDBCException: Connection could not be created to ejbModule/hibernate.cfg.xml with driver org.gjt.mm.mysql.Driver.  Possibly the wrong driver for the given database URL



Total time: 12 seconds

 
------------------------------------------------------------------------------
_______________________________________________
Liquibase-user mailing list
Liquibase-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/liquibase-user