generator-jhipster: Liquibase changeset generation failing
Hi,
After recently getting hot reload to work with my application (I think it’s working anyawy) I’m now running into errors during liquibase changeset generation. If I generate a new entity using -
yo jhipster:entity foo
and then run a gradle compileJava
this is the error that gets thrown :
[DEBUG] io.github.jhipster.loaded.listener.filewatcher.NewClassLoaderListener -
JHipster reload - Start to reload the new class 'D:\Projects\uclpreferences\buil
d\classes\main\com\company\uclpreferences\web\propertyeditors\LocaleDateTimeEdito
r.class'
[ERROR] io.github.jhipster.loaded.listener.filewatcher.NewClassLoaderListener -
Failed to find a watched folder for the directory: build\classes\main\com\company
\uclpreferences\web\propertyeditors
[DEBUG] io.github.jhipster.loaded.listener.filewatcher.NewClassLoaderListener -
JHipster reload - Start to reload the new class 'D:\Projects\uclpreferences\buil
d\classes\main\com\company\uclpreferences\web\rest\AccountResource.class'
[ERROR] io.github.jhipster.loaded.listener.filewatcher.NewClassLoaderListener -
Failed to find a watched folder for the directory: build\classes\main\com\company
\uclpreferences\web\rest
[DEBUG] io.github.jhipster.loaded.listener.filewatcher.NewClassLoaderListener -
JHipster reload - Start to reload the new class 'D:\Projects\uclpreferences\buil
d\classes\main\com\company\uclpreferences\web\rest\dto\UserDTO.class'
[ERROR] io.github.jhipster.loaded.listener.filewatcher.NewClassLoaderListener -
Failed to find a watched folder for the directory: build\classes\main\com\company
\uclpreferences\web\rest\dto
[DEBUG] io.github.jhipster.loaded.listener.filewatcher.NewClassLoaderListener -
JHipster reload - Start to reload the new class 'D:\Projects\uclpreferences\buil
d\classes\main\com\company\uclpreferences\web\rest\AuditResource.class'
[ERROR] io.github.jhipster.loaded.listener.filewatcher.NewClassLoaderListener -
Failed to find a watched folder for the directory: build\classes\main\com\company
\uclpreferences\web\rest
[DEBUG] io.github.jhipster.loaded.listener.filewatcher.NewClassLoaderListener -
JHipster reload - Start to reload the new class 'D:\Projects\uclpreferences\buil
d\classes\main\com\company\uclpreferences\web\rest\FooResource.class'
[ERROR] io.github.jhipster.loaded.listener.filewatcher.NewClassLoaderListener -
Failed to find a watched folder for the directory: build\classes\main\com\company
\uclpreferences\web\rest
[INFO] io.github.jhipster.loaded.JHipsterReloaderThread - Batch reload has been
triggered, waiting for new classes for 250 ms
[DEBUG] io.github.jhipster.loaded.listener.filewatcher.NewClassLoaderListener -
JHipster reload - Start to reload the new class 'D:\Projects\uclpreferences\buil
d\classes\main\com\company\uclpreferences\web\rest\LogsResource.class'
[ERROR] io.github.jhipster.loaded.listener.filewatcher.NewClassLoaderListener -
Failed to find a watched folder for the directory: build\classes\main\com\company
\uclpreferences\web\rest
[DEBUG] io.github.jhipster.loaded.listener.filewatcher.NewClassLoaderListener -
JHipster reload - Start to reload the new class 'D:\Projects\uclpreferences\buil
d\classes\main\com\company\uclpreferences\web\rest\dto\LoggerDTO.class'
[ERROR] io.github.jhipster.loaded.listener.filewatcher.NewClassLoaderListener -
Failed to find a watched folder for the directory: build\classes\main\com\company
\uclpreferences\web\rest\dto
[DEBUG] io.github.jhipster.loaded.listener.filewatcher.NewClassLoaderListener -
JHipster reload - Start to reload the new class 'D:\Projects\uclpreferences\buil
d\classes\main\com\company\uclpreferences\web\rest\UserResource.class'
[ERROR] io.github.jhipster.loaded.listener.filewatcher.NewClassLoaderListener -
Failed to find a watched folder for the directory: build\classes\main\com\company
\uclpreferences\web\rest
[INFO] io.github.jhipster.loaded.JHipsterReloaderThread - Batch reload has been
triggered, waiting for new classes for 250 ms
[INFO] io.github.jhipster.loaded.JHipsterReloaderThread - Batch reload in progre
ss...
[DEBUG] io.github.jhipster.loaded.JHipsterReloaderThread - There are 1 Spring en
tities updated, adding them to be reloaded
[DEBUG] io.github.jhipster.loaded.reloader.JacksonReloader - Hot reloading Jacks
on classes
[DEBUG] io.github.jhipster.loaded.JHipsterReloaderThread - There are 1 Spring en
tities updated, adding them to be reloaded
[DEBUG] io.github.jhipster.loaded.reloader.LiquibaseReloader - Hot reloading JPA
& Liquibase classes
[INFO] liquibase-hibernate - Reading hibernate configuration hibernate:spring:co
m.company.uclpreferences.domain?dialect=org.hibernate.dialect.H2Dialect
[INFO] io.github.jhipster.loaded.reloader.LiquibaseReloader - Found package com.
company.uclpreferences.domain
[INFO] io.github.jhipster.loaded.reloader.LiquibaseReloader - Found dialect org.
hibernate.dialect.H2Dialect
[INFO] liquibase-hibernate - Using dialect org.hibernate.dialect.H2Dialect
[INFO] liquibase-hibernate - Found table T_AUTHORITY
[INFO] liquibase-hibernate - Found table T_FOO
[INFO] liquibase-hibernate - Found table T_PERSISTENT_AUDIT_EVENT
Exception in thread "Thread-17" [INFO] liquibase-hibernate - Found table T_PERSI
STENT_AUDIT_EVENT_DATA
java.lang.NoSuchMethodError: liquibase.datatype.DataTypeFactory.from(Lliquibase/
structure/core/DataType;)Lliquibase/datatype/LiquibaseDataType;
[INFO] liquibase-hibernate - Found table T_PERSISTENT_TOKEN
at io.github.jhipster.loaded.patch.liquibase.JHipsterTableSnapshotGenera
tor.snapshotObject(JHipsterTableSnapshotGenerator.java:97)
[INFO] liquibase-hibernate - Found table T_USER
at liquibase.ext.hibernate.snapshot.TableSnapshotGenerator.snapshotObjec
t(TableSnapshotGenerator.java)
[INFO] liquibase-hibernate - Found table T_USER_AUTHORITY
at liquibase.ext.hibernate.snapshot.HibernateSnapshotGenerator.snapshot(
HibernateSnapshotGenerator.java:69)
[INFO] liquibase-hibernate - Found table T_PERSISTENT_AUDIT_EVENT
at liquibase.snapshot.SnapshotGeneratorChain.snapshot(SnapshotGeneratorC
hain.java:50)
[INFO] liquibase-hibernate - Found column event_id bigint
at liquibase.ext.hibernate.snapshot.HibernateSnapshotGenerator.snapshot(
HibernateSnapshotGenerator.java:72)
at liquibase.snapshot.SnapshotGeneratorChain.snapshot(SnapshotGeneratorC
hain.java:50)
at liquibase.ext.hibernate.snapshot.HibernateSnapshotGenerator.snapshot(
HibernateSnapshotGenerator.java:72)
at liquibase.snapshot.SnapshotGeneratorChain.snapshot(SnapshotGeneratorC
hain.java:50)
at liquibase.ext.hibernate.snapshot.HibernateSnapshotGenerator.snapshot(
HibernateSnapshotGenerator.java:72)
at liquibase.snapshot.SnapshotGeneratorChain.snapshot(SnapshotGeneratorC
hain.java:50)
at liquibase.ext.hibernate.snapshot.HibernateSnapshotGenerator.snapshot(
HibernateSnapshotGenerator.java:72)
at liquibase.snapshot.SnapshotGeneratorChain.snapshot(SnapshotGeneratorC
hain.java:50)
at liquibase.ext.hibernate.snapshot.HibernateSnapshotGenerator.snapshot(
HibernateSnapshotGenerator.java:72)
at liquibase.snapshot.SnapshotGeneratorChain.snapshot(SnapshotGeneratorC
hain.java:50)
at liquibase.snapshot.DatabaseSnapshot.include(DatabaseSnapshot.java:153
)
at liquibase.snapshot.DatabaseSnapshot.replaceObject(DatabaseSnapshot.ja
va:226)
at liquibase.snapshot.DatabaseSnapshot.replaceObject(DatabaseSnapshot.ja
va:248)
at liquibase.snapshot.DatabaseSnapshot.includeNestedObjects(DatabaseSnap
shot.java:185)
at liquibase.snapshot.DatabaseSnapshot.include(DatabaseSnapshot.java:167
)
at liquibase.snapshot.DatabaseSnapshot.init(DatabaseSnapshot.java:56)
at liquibase.snapshot.DatabaseSnapshot.<init>(DatabaseSnapshot.java:33)
at liquibase.snapshot.JdbcDatabaseSnapshot.<init>(JdbcDatabaseSnapshot.j
ava:22)
at liquibase.snapshot.SnapshotGeneratorFactory.createSnapshot(SnapshotGe
neratorFactory.java:126)
at liquibase.snapshot.SnapshotGeneratorFactory.createSnapshot(SnapshotGe
neratorFactory.java:119)
at liquibase.snapshot.SnapshotGeneratorFactory.createSnapshot(SnapshotGe
neratorFactory.java:107)
at liquibase.diff.DiffGeneratorFactory.compare(DiffGeneratorFactory.java
:75)
at liquibase.diff.DiffGeneratorFactory.compare(DiffGeneratorFactory.java
:71)
at liquibase.Liquibase.diff(Liquibase.java:986)
at io.github.jhipster.loaded.reloader.LiquibaseReloader.reload(Liquibase
Reloader.java:152)
at io.github.jhipster.loaded.JHipsterReloaderThread.batchReload(JHipster
ReloaderThread.java:206)
at io.github.jhipster.loaded.JHipsterReloaderThread.run(JHipsterReloader
Thread.java:153)
at java.lang.Thread.run(Thread.java:722)
[DEBUG] io.github.jhipster.loaded.JHipsterReloaderThread - com.company.uclprefere
nces.web.rest.dto.LoggerDTO is a REST DTO
[DEBUG] io.github.jhipster.loaded.JHipsterReloaderThread - com.company.uclprefere
nces.web.rest.dto.UserDTO is a REST DTO
I see a bunch of other errors about failing to find a watched folder for the directory so I’m not sure exactly what those are about.
Since gradle is putting my build files in ./build and not ./target I updated my application-dev.yml to read :
# You can add as many as folders to watch
# You just need to add a dash + the directory to watch
hotReload:
enabled: true
package:
project: com.company.uclpreferences
domain: com.company.uclpreferences.domain
restdto: com.company.uclpreferences.web.rest.dto
liquibase:
defaultCatalogName:
defaultSchema: public
excludeTables: oauth_access_token,oauth_approvals,oauth_client_details,oauth_client_token,oauth_code,oauth_refresh_token
watchdir:
- build/classes
About this issue
- Original URL
- State: closed
- Created 10 years ago
- Comments: 24 (9 by maintainers)
Commits related to this issue
- Merge pull request #413 from jhipster/fix/411 Fixed failing imports after exporting to JDL — committed to MathieuAA/generator-jhipster by MathieuAA 5 years ago
mvn liquibase:clearCheckSums
http://www.liquibase.org/documentation/maven/maven_clearchecksums.html
The solution is updating the MD5SUM to the new value which you can get in the error log.
for example, update DATABASECHANGELOG set MD5SUM = ‘7:06db5cbe9543b2531533d8badfe9cad9’ where id = 20150729084026