title: liquibase.exception.DatabaseException: java.lang.ClassNotFoundException
body: <p>I am new to Liquibase and JHipster, and am having some problems with using the maven plugin to generate a diff.</p>
  
  <p>I am getting the following error when running <code>mvn liquibase:diff -e -X</code></p>
  
  <p>The relevant section of my pom is:</p>
  
  <pre><code>&lt;plugin&gt;
              &lt;groupId&gt;org.liquibase&lt;/groupId&gt;
              &lt;artifactId&gt;liquibase-maven-plugin&lt;/artifactId&gt;
              &lt;version&gt;${liquibase.version}&lt;/version&gt;
              &lt;dependencies&gt;
                  &lt;dependency&gt;
                      &lt;groupId&gt;org.javassist&lt;/groupId&gt;
                      &lt;artifactId&gt;javassist&lt;/artifactId&gt;
                      &lt;version&gt;3.18.2-GA&lt;/version&gt;
                  &lt;/dependency&gt;
                  &lt;dependency&gt;
                      &lt;groupId&gt;org.liquibase.ext&lt;/groupId&gt;
                      &lt;artifactId&gt;liquibase-hibernate4&lt;/artifactId&gt;
                      &lt;version&gt;${liquibase-hibernate4.version}&lt;/version&gt;
                  &lt;/dependency&gt;
                  &lt;dependency&gt;
                      &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
                      &lt;artifactId&gt;spring-boot-starter-data-jpa&lt;/artifactId&gt;
                      &lt;version&gt;${project.parent.version}&lt;/version&gt;
                  &lt;/dependency&gt;
                  &lt;dependency&gt;
                      &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
                      &lt;artifactId&gt;hibernate-core&lt;/artifactId&gt;
                      &lt;version&gt;5.2.1.Final&lt;/version&gt;
                  &lt;/dependency&gt;
  
              &lt;/dependencies&gt;
              &lt;configuration&gt;
                  &lt;changeLogFile&gt;src/main/resources/config/liquibase/master.xml&lt;/changeLogFile&gt;
                  &lt;diffChangeLogFile&gt;
                      src/main/resources/config/liquibase/changelog/${maven.build.timestamp}_changelog.xml
                  &lt;/diffChangeLogFile&gt;
                  &lt;driver&gt;org.postgresql.Driver&lt;/driver&gt;
                  &lt;url&gt;jdbc:postgresql://localhost/shiftwork&lt;/url&gt;
                  &lt;defaultSchemaName/&gt;
                  &lt;username&gt;postgres&lt;/username&gt;
                  &lt;password/&gt;
                  &lt;referenceUrl&gt;hibernate:spring:com.teammachine.staffrostering.domain?dialect=org.hibernate.dialect.PostgreSQL94Dialect&amp;amp;hibernate.ejb.naming_strategy=org.springframework.boot.orm.jpa.hibernate.SpringNamingStrategy&lt;/referenceUrl&gt;
                  &lt;verbose&gt;true&lt;/verbose&gt;
                  &lt;logging&gt;debug&lt;/logging&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
          &lt;changeLogFile&gt;src/main/resources/config/liquibase/master.xml&lt;/changeLogFile&gt;
          &lt;diffChangeLogFile&gt;
              src/main/resources/config/liquibase/changelog/${maven.build.timestamp}_changelog.xml
          &lt;/diffChangeLogFile&gt;
          &lt;driver&gt;org.postgresql.Driver&lt;/driver&gt;
          &lt;url&gt;jdbc:postgresql://localhost/myApp&lt;/url&gt;
          &lt;defaultSchemaName/&gt;
          &lt;username&gt;postgres&lt;/username&gt;
          &lt;password/&gt;
          &lt;referenceUrl&gt;hibernate:spring:com.myapp.domain?dialect=&amp;amp;hibernate.ejb.naming_strategy=org.springframework.boot.orm.jpa.hibernate.SpringNamingStrategy&lt;/referenceUrl&gt;
          &lt;verbose&gt;true&lt;/verbose&gt;
          &lt;logging&gt;debug&lt;/logging&gt;
      &lt;/configuration&gt;
  &lt;/plugin&gt;
  </code></pre>
  
  <p>Perhaps I am wrong, but it is my understanding that the missing class (org.hibernate.boot) is part of Hibernate Core, which is included.</p>
  
  <pre><code>  Number of foreign imports: 1
  import: Entry[import  from realm ClassRealm[maven.api, parent: null]]
  
  -----------------------------------------------------
  
      at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:166)
      ... 21 more
  Caused by: java.lang.NoClassDefFoundError: org/hibernate/boot/registry/classloading/internal/ClassLoaderServiceImpl$Work
      at org.hibernate.jpa.boot.spi.Bootstrap.getEntityManagerFactoryBuilder(Bootstrap.java:45)
      at org.hibernate.jpa.boot.spi.Bootstrap.getEntityManagerFactoryBuilder(Bootstrap.java:57)
      at liquibase.ext.hibernate.database.HibernateSpringDatabase.buildConfigurationFromScanning(HibernateSpringDatabase.java:243)
      at liquibase.ext.hibernate.database.HibernateSpringDatabase.buildConfiguration(HibernateSpringDatabase.java:55)
      at liquibase.ext.hibernate.database.HibernateDatabase.setConnection(HibernateDatabase.java:45)
      at liquibase.database.DatabaseFactory.findCorrectDatabaseImplementation(DatabaseFactory.java:131)
      at liquibase.database.DatabaseFactory.openDatabase(DatabaseFactory.java:151)
      at liquibase.integration.commandline.CommandLineUtils.createDatabaseObject(CommandLineUtils.java:85)
      at org.liquibase.maven.plugins.LiquibaseDatabaseDiff.performLiquibaseTask(LiquibaseDatabaseDiff.java:166)
      at org.liquibase.maven.plugins.AbstractLiquibaseMojo.execute(AbstractLiquibaseMojo.java:394)
      at org.liquibase.maven.plugins.LiquibaseDatabaseDiff.execute(LiquibaseDatabaseDiff.java:146)
      at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
      ... 21 more
  Caused by: java.lang.ClassNotFoundException: org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl$Work
      at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
      at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
      at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:247)
      at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239)
      ... 33 more
  [ERROR] 
  [ERROR] 
  [ERROR] For more information about the errors and possible solutions, please read the following articles:
  [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginContainerException
  anton@anton-K93SV:~/git/hughestech/shiftwork/staffservice$ 
  </code></pre>