-
-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JHipster generator can't regenerate a jdl change (using issue for one or more Application JDLs) #27944
Comments
Can you try with the following command:
|
When I launch "jhipster entity Foo --single-entity" in an empty directory, I get the following output with Node v18.20.3 (and similar with Node v20.18.0 or Node v22.11.0): ~/testfoo/ jhipster entity Foo --single-entity ██╗ ██╗ ██╗ ████████╗ ███████╗ ██████╗ ████████╗ ████████╗ ███████╗ ██║ ██║ ██║ ╚══██╔══╝ ██╔═══██╗ ██╔════╝ ╚══██╔══╝ ██╔═════╝ ██╔═══██╗ ██║ ████████║ ██║ ███████╔╝ ╚█████╗ ██║ ██████╗ ███████╔╝ ██╗ ██║ ██╔═══██║ ██║ ██╔════╝ ╚═══██╗ ██║ ██╔═══╝ ██╔══██║ ╚██████╔╝ ██║ ██║ ████████╗ ██║ ██████╔╝ ██║ ████████╗ ██║ ╚██╗ ╚═════╝ ╚═╝ ╚═╝ ╚═══════╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══════╝ ╚═╝ ╚═╝ https://www.jhipster.tech Welcome to JHipster v8.7.3 _______________________________________________________________________________________________________________ Documentation for creating an application is at https://www.jhipster.tech/creating-an-app/ Application files will be generated in folder: /home/geiser/testfoo _______________________________________________________________________________________________________________ ✔ What is the base name of your application? testfoo INFO! The entity Foo is being created. Generating field #1 ✔ Do you want to add a field to your entity? yes ✔ What is the name of your field? fooAttribute ✔ What is the type of your field? String ✔ Do you want to add validation rules to your field? no ================= Foo ================= Fields fooAttribute (String) Generating field #2 ✔ Do you want to add a field to your entity? no ================= Foo ================= Fields fooAttribute (String) Generating relationships to other entities ✔ Do you want to add a relationship to another entity? no ================= Foo ================= Fields fooAttribute (String) ✔ Do you want to use separate service class for your business logic? Yes, generate a separate service interface and implementation ✔ Do you want to use a Data Transfer Object (DTO)? Yes, generate a DTO with MapStruct ✔ Do you want to add filtering? Dynamic filtering for the entities with JPA Static metamodel ✔ Is this entity read-only? no ✔ Do you want pagination and sorting on your entity? Yes, with pagination links and sorting headers Everything is configured, generating the entity... INFO! Generating entities Foo ✔ Which *type* of application would you like to create? Monolithic application (recommended for simple projects) ✔ What is your default Java package name? com.mycompany.myapp ✔ Would you like to use Maven or Gradle for building the backend? Maven ✔ Do you want to make it reactive with Spring WebFlux? no ✔ Which *type* of authentication would you like to use? HTTP Session Authentication (stateful, default Spring Security mechanism) ✔ Besides JUnit, which testing frameworks would you like to use? ✔ Which *type* of database would you like to use? SQL (H2, PostgreSQL, MySQL, MariaDB, Oracle, MSSQL) ✔ Which *production* database would you like to use? Oracle ✔ Which *development* database would you like to use? H2 with disk-based persistence ✔ Which cache do you want to use? (Spring cache abstraction) Ehcache (local cache, for a single node) ✔ Do you want to use Hibernate 2nd level cache? yes ✔ Which other technologies would you like to use? ✔ Which *framework* would you like to use for the client? Angular ✔ Besides Jest/Vitest, which testing frameworks would you like to use? ✔ Do you want to generate the admin UI? yes ✔ Would you like to use a Bootswatch theme (https://bootswatch.com/)? Default JHipster ✔ Would you like to enable internationalization support? yes ✔ Please choose the native language of the application Spanish ✔ Please choose additional languages to install English ✔ applying multi-step templates ✔ prettier configuration files committed to disk ERROR! An error occured while running jhipster:spring-cache#customizeFiles ERROR! ERROR! Unable to find /home/testfoo/src/main/java/com/mycompany/myapp/config/CacheConfiguration.java. Error: Unable to find /home/testfoo/src/main/java/com/mycompany/myapp/config/CacheConfiguration.java. at SpringCacheGenerator.editFile (file:///home/.nvm/versions/node/v18.20.3/lib/node_modules/generator-jhipster/dist/generators/base-core/generator.js:1047:23) at source.addEntityToCache (file:///home/.nvm/versions/node/v18.20.3/lib/node_modules/generator-jhipster/dist/generators/spring-cache/generator.js:74:30) at SpringCacheGenerator.customizeFiles (file:///home/.nvm/versions/node/v18.20.3/lib/node_modules/generator-jhipster/dist/generators/spring-cache/generator.js:168:50) at SpringCacheGenerator.executeTask (file:///home/.nvm/versions/node/v18.20.3/lib/node_modules/generator-jhipster/node_modules/yeoman-generator/dist/actions/lifecycle.js:258:26) at env.queueTask.once (file:///home/.nvm/versions/node/v18.20.3/lib/node_modules/generator-jhipster/node_modules/yeoman-generator/dist/actions/lifecycle.js:232:56) at runLoop.add.once (file:///home/.nvm/versions/node/v18.20.3/lib/node_modules/generator-jhipster/node_modules/yeoman-environment/dist/environment-base.js:395:23) at Immediate. (/home/.nvm/versions/node/v18.20.3/lib/node_modules/generator-jhipster/node_modules/grouped-queue/lib/subqueue.js:48:34) at process.processImmediate (node:internal/timers:476:21) at process.callbackTrampoline (node:internal/async_hooks:128:17) |
When I launch "jhipster entity Foo --single-entity" in an empty directory and select "No cache", I get the following output with Node v18.20.3 (and similar with Node v20.18.0 or Node v22.11.0): ~/testfoo/ jhipster entity Foo --single-entity ██╗ ██╗ ██╗ ████████╗ ███████╗ ██████╗ ████████╗ ████████╗ ███████╗ ██║ ██║ ██║ ╚══██╔══╝ ██╔═══██╗ ██╔════╝ ╚══██╔══╝ ██╔═════╝ ██╔═══██╗ ██║ ████████║ ██║ ███████╔╝ ╚█████╗ ██║ ██████╗ ███████╔╝ ██╗ ██║ ██╔═══██║ ██║ ██╔════╝ ╚═══██╗ ██║ ██╔═══╝ ██╔══██║ ╚██████╔╝ ██║ ██║ ████████╗ ██║ ██████╔╝ ██║ ████████╗ ██║ ╚██╗ ╚═════╝ ╚═╝ ╚═╝ ╚═══════╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══════╝ ╚═╝ ╚═╝ https://www.jhipster.tech Welcome to JHipster v8.7.3 _______________________________________________________________________________________________________________ Documentation for creating an application is at https://www.jhipster.tech/creating-an-app/ Application files will be generated in folder: /home/geiser/testfoo _______________________________________________________________________________________________________________ ✔ What is the base name of your application? testfoo INFO! The entity Foo is being created. Generating field #1 ✔ Do you want to add a field to your entity? yes ✔ What is the name of your field? fooAttribute ✔ What is the type of your field? String ✔ Do you want to add validation rules to your field? no ================= Foo ================= Fields fooAttribute (String) Generating field #2 ✔ Do you want to add a field to your entity? no ================= Foo ================= Fields fooAttribute (String) Generating relationships to other entities ✔ Do you want to add a relationship to another entity? no ================= Foo ================= Fields fooAttribute (String) ✔ Do you want to use separate service class for your business logic? Yes, generate a separate service interface and implementation ✔ Do you want to use a Data Transfer Object (DTO)? Yes, generate a DTO with MapStruct ✔ Do you want to add filtering? Dynamic filtering for the entities with JPA Static metamodel ✔ Is this entity read-only? no ✔ Do you want pagination and sorting on your entity? Yes, with pagination links and sorting headers Everything is configured, generating the entity... INFO! Generating entities Foo ✔ Which *type* of application would you like to create? Monolithic application (recommended for simple projects) ✔ What is your default Java package name? com.mycompany.myapp ✔ Would you like to use Maven or Gradle for building the backend? Maven ✔ Do you want to make it reactive with Spring WebFlux? no ✔ Which *type* of authentication would you like to use? HTTP Session Authentication (stateful, default Spring Security mechanism) ✔ Besides JUnit, which testing frameworks would you like to use? ✔ Which *type* of database would you like to use? SQL (H2, PostgreSQL, MySQL, MariaDB, Oracle, MSSQL) ✔ Which *production* database would you like to use? Oracle ✔ Which *development* database would you like to use? H2 with disk-based persistence ✔ Which cache do you want to use? (Spring cache abstraction) No cache - Warning, when using an SQL database, this will disable the Hibernate 2nd level cache! ✔ Which other technologies would you like to use? ✔ Which *framework* would you like to use for the client? Angular ✔ Besides Jest/Vitest, which testing frameworks would you like to use? ✔ Do you want to generate the admin UI? yes ✔ Would you like to use a Bootswatch theme (https://bootswatch.com/)? Default JHipster ✔ Would you like to enable internationalization support? yes ✔ Please choose the native language of the application Spanish ✔ Please choose additional languages to install English ✔ applying multi-step templates ✔ prettier configuration files committed to disk ERROR! An error occured while running jhipster:liquibase#postWriteChangelogs ERROR! ERROR! Unable to find /home/testfoo/src/main/resources/config/liquibase/master.xml. Error: Unable to find /home/testfoo/src/main/resources/config/liquibase/master.xml. at LiquibaseGenerator.editFile (file:///home/.nvm/versions/node/v18.20.3/lib/node_modules/generator-jhipster/dist/generators/base-core/generator.js:1047:23) at source.addLiquibaseChangelog (file:///home/.nvm/versions/node/v18.20.3/lib/node_modules/generator-jhipster/dist/generators/liquibase/generator.js:74:66) at LiquibaseGenerator._addLiquibaseFilesReferences (file:///home/.nvm/versions/node/v18.20.3/lib/node_modules/generator-jhipster/dist/generators/liquibase/generator.js:499:16) at LiquibaseGenerator.postWriteChangelog (file:///home/.nvm/versions/node/v18.20.3/lib/node_modules/generator-jhipster/dist/generators/liquibase/generator.js:710:25) at file:///home/.nvm/versions/node/v18.20.3/lib/node_modules/generator-jhipster/dist/generators/liquibase/generator.js:462:90 at Array.map () at LiquibaseGenerator.postWriteChangelogs (file:///home/.nvm/versions/node/v18.20.3/lib/node_modules/generator-jhipster/dist/generators/liquibase/generator.js:462:60) at LiquibaseGenerator.executeTask (file:///home/.nvm/versions/node/v18.20.3/lib/node_modules/generator-jhipster/node_modules/yeoman-generator/dist/actions/lifecycle.js:258:26) at env.queueTask.once (file:///home/.nvm/versions/node/v18.20.3/lib/node_modules/generator-jhipster/node_modules/yeoman-generator/dist/actions/lifecycle.js:232:56) at runLoop.add.once (file:///home/.nvm/versions/node/v18.20.3/lib/node_modules/generator-jhipster/node_modules/yeoman-environment/dist/environment-base.js:395:23) |
Issue check: JHipster has completed the sample check
This check uses app.jdl
app-1.jdl
|
Node 22 issue will be tracked at #27948. |
This issue is in |
Overview of the issue
I can't regenerate the application with changes in jdl
I indicate the 3 steps to reproduce:
JHipster JDL
JDL definitions
JDL definitions (incremental with second foo2 attribute)
jhipster from-issue
command.Motivation for or Use Case
Perform regenerations in the application with changes in the jdl
Reproduce the error
With Node v22.11.0 It finishes without errors and without trying to regenerate the rest of the files
With Node v20.18.0 finishes with errors and without trying to regenerate the rest of the files:
With Node v18.20.4 finishes with errors and without trying to regenerate the rest of the files:
Related issues
JHipster generator can't regenerate a jdl change #27866
Suggest a Fix
JHipster Version(s)
8.7.3
Browsers and Operating System
Ubuntu 22.04.2
Environment and Tools
openjdk version "17.0.7" 2023-04-18
OpenJDK Runtime Environment Temurin-17.0.7+7 (build 17.0.7+7)
OpenJDK 64-Bit Server VM Temurin-17.0.7+7 (build 17.0.7+7, mixed mode, sharing)
git version 2.34.1
node: v22.11.0
npm: 10.9.0
Docker version 24.0.2, build cb74dfc
The text was updated successfully, but these errors were encountered: