hibernate integration in 2.0 rc 5/6

hi, I’m trying to obtain hibernate changes by:

       

it works with 1.9.5 if “referenceUrl” is replaced with “baseUrl”

but for 2.0 RCs i’ve got:
DatabaseException: driver not specified and no default could be found for hibernate:hibernate-development.cfg.xml

any ideas?

thanks
-dmytro

    UILD FAILED /home/dmytro/trunk/c5/build.xml:188: liquibase.exception.DatabaseException: driver not specified and no default could be found for hibernate:hibernate-development.cfg.xml at liquibase.integration.ant.DiffDatabaseTask.execute(DiffDatabaseTask.java:113) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.Target.execute(Target.java:357) at org.apache.tools.ant.Target.performTasks(Target.java:385) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337) at org.apache.tools.ant.Project.executeTarget(Project.java:1306) at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) at org.eclipse.ant.internal.core.ant.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32) at org.apache.tools.ant.Project.executeTargets(Project.java:1189) at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:662) at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:495) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.eclipse.ant.core.AntRunner.run(AntRunner.java:378) at org.eclipse.ant.internal.launching.launchConfigurations.AntLaunchDelegate$1.run(AntLaunchDelegate.java:298) at java.lang.Thread.run(Thread.java:619) Caused by: liquibase.exception.DatabaseException: driver not specified and no default could be found for hibernate:hibernate-development.cfg.xml at liquibase.integration.ant.BaseLiquibaseTask.createDatabaseObject(BaseLiquibaseTask.java:214)

Did you add the hibernate extension jar as listed in http://liquibase.org/v2_upgrade ?  I pulled the hibernate support out so it can be developed more independently from the core liquibase library.

Nathan

Missed this point… Thanks

Now I’ve got NPE in AbstractTypeConverter.getDataType(AbstractTypeConverter.java:60) in RC6

could not check on latest build: http://liquibase.org/ci/latest.html doesn’t seem to work for me. am i using wrong link?
RC5 works, but shows:

    [diffDatabaseToChangeLog] INFO 07/10/10 10:49:liquibase: Can not use class liquibase.executor.LoggingExecutor as a Liquibase service because it does not have a default constructor BUILD SUCCESSFUL

RC6:

    [diffDatabaseToChangeLog] seen table SystemVariable

    BUILD FAILED
    /home/dmytro/trunk/c5/build.xml:188: java.lang.NullPointerException
    at liquibase.integration.ant.DiffDatabaseTask.execute(DiffDatabaseTask.java:113)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.Target.execute(Target.java:357)
    at org.apache.tools.ant.Target.performTasks(Target.java:385)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
    at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
    at org.eclipse.ant.internal.core.ant.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
    at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:662)
    at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:495)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.eclipse.ant.core.AntRunner.run(AntRunner.java:378)
    at org.eclipse.ant.internal.launching.launchConfigurations.AntLaunchDelegate$1.run(AntLaunchDelegate.java:298)
    at java.lang.Thread.run(Thread.java:619)
    Caused by: java.lang.NullPointerException
    at liquibase.database.typeconversion.core.AbstractTypeConverter.getDataType(AbstractTypeConverter.java:60)
    at liquibase.diff.DiffResult.addChangedColumnChanges(DiffResult.java:805)
    at liquibase.diff.DiffResult.printChangeLog(DiffResult.java:494)
    at liquibase.diff.DiffResult.printChangeLog(DiffResult.java:407)
    at liquibase.integration.ant.DiffDatabaseToChangeLogTask.outputDiff(DiffDatabaseToChangeLogTask.java:12)
    at liquibase.integration.ant.DiffDatabaseTask.execute(DiffDatabaseTask.java:106)
    … 23 more
    — Nested Exception —
    java.lang.NullPointerException
    at liquibase.database.typeconversion.core.AbstractTypeConverter.getDataType(AbstractTypeConverter.java:60)
    at liquibase.diff.DiffResult.addChangedColumnChanges(DiffResult.java:805)
    at liquibase.diff.DiffResult.printChangeLog(DiffResult.java:494)
    at liquibase.diff.DiffResult.printChangeLog(DiffResult.java:407)
    at liquibase.integration.ant.DiffDatabaseToChangeLogTask.outputDiff(DiffDatabaseToChangeLogTask.java:12)
    at liquibase.integration.ant.DiffDatabaseTask.execute(DiffDatabaseTask.java:106)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.Target.execute(Target.java:357)
    at org.apache.tools.ant.Target.performTasks(Target.java:385)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
    at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
    at org.eclipse.ant.internal.core.ant.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
    at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:662)
    at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:495)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.eclipse.ant.core.AntRunner.run(AntRunner.java:378)
    at org.eclipse.ant.internal.launching.launchConfigurations.AntLaunchDelegate$1.run(AntLaunchDelegate.java:298)
    at java.lang.Thread.run(Thread.java:619)

    Total time: 14 seconds

The link is right.  The project that was hosting our CI server has apparently given up on getting their server fixed.  I’m in the process of trying to figure out other options.

I fixed the null pointer in trunk for the next build.

Nathan

thank you

A new error comes up.

  1. [ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.6:run (compile) on project model: An Ant BuildException has occured: liquibase.exception.DatabaseException: java.lang.NullPointerException -> [Help 1]
  2. org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.6:run (compile) on project model: An Ant BuildException has occured: liquibase.exception.DatabaseException: java.lang.NullPointerException
  3.     at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
  4.     at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
  5.     at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
  6.     at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
  7.     at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
  8.     at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
  9.     at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
  10.     at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
  11.     at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
  12.     at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
  13.     at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
  14.     at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
  15.     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  16.     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  17.     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  18.     at java.lang.reflect.Method.invoke(Method.java:597)
  19.     at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
  20.     at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
  21.     at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
  22.     at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
  23. Caused by: org.apache.maven.plugin.MojoExecutionException: An Ant BuildException has occured: liquibase.exception.DatabaseException: java.lang.NullPointerException
  24.     at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:283)
  25.     at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
  26.     at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
  27.     … 19 more
  28. Caused by: /home/smuwanga/projects/mohr/model/target/antrun/build-main.xml:7: liquibase.exception.DatabaseException: java.lang.NullPointerException
  29.     at liquibase.integration.ant.DiffDatabaseTask.execute(DiffDatabaseTask.java:115)
  30.     at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
  31.     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  32.     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  33.     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  34.     at java.lang.reflect.Method.invoke(Method.java:597)
  35.     at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
  36.     at org.apache.tools.ant.Task.perform(Task.java:348)
  37.     at org.apache.tools.ant.Target.execute(Target.java:390)
  38.     at org.apache.tools.ant.Target.performTasks(Target.java:411)
  39.     at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1397)
  40.     at org.apache.tools.ant.Project.executeTarget(Project.java:1366)
  41.     at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:270)
  42.     … 21 more
  43. Caused by: liquibase.exception.DatabaseException: java.lang.NullPointerException
  44.     at liquibase.ext.hibernate.snapshot.HibernateDatabaseSnapshotGenerator.createSnapshot(HibernateDatabaseSnapshotGenerator.java:216)
  45.     at liquibase.snapshot.DatabaseSnapshotGeneratorFactory.createSnapshot(DatabaseSnapshotGeneratorFactory.java:69)
  46.     at liquibase.diff.Diff.compare(Diff.java:63)
  47.     at liquibase.integration.ant.DiffDatabaseTask.execute(DiffDatabaseTask.java:103)
  48.     … 33 more
  49. Caused by: java.lang.NullPointerException
  50.     at java.lang.Class.forName0(Native Method)
  51.     at java.lang.Class.forName(Class.java:169)
  52.     at liquibase.ext.hibernate.database.HibernateGenericDialect.(HibernateGenericDialect.java:18)
  53.     at liquibase.ext.hibernate.snapshot.HibernateDatabaseSnapshotGenerator.createSnapshot(HibernateDatabaseSnapshotGenerator.java:76)
  54.     … 36 more
  55. [ERROR]
Below is my code snippet for the pom.xml



     
        
        org.apache.maven.plugins
        maven-antrun-plugin
        1.6
       
         
            compile
            compile
           
             
             
              
                  
               
               
                <diffDatabaseToChangeLog
            driver=“com.mysql.jdbc.Driver”
            url=“jdbc:mysql://localhost:3306/mohr”
            username=“root”
            password=""
 
            referenceUrl=“hibernate:hibernate.cfg.xml”
 
            outputFile=“src/main/resources/changelog2.xml”
            classpathref=“maven.compile.classpath”
            >
   
               
             
           
           
              run
           
         
       
     

What could I be doing wrong ?

Simon.