Closed terrytompkins closed 2 years ago
jhipster-jdl-error.txt content of error referenced above from running jhipster jdl entity.jdl
I have narrowed the problem down to changes made to generator-jhipster between 7.3.0 and 7.3.1. The former version worked with my sample jdl, and the latter does not. I'll do a comparison between these generator versions to see if anything jumps out.
Have you had any luck figuring this out @TransWebT?
Looks like there is a bug at prettier-plugin-java. It’s failing to report the error location.
@mraible - I was reviewing the relevant differences between 7.3.0 and 7.3.1 last week and then got busy with some day job work I had to catch up with. I'm planning on digging in again this weekend unless a fix jumps out at someone else. -terry
It's indeed a bug. The offending line is:
import .repository.rowmapper.UserRowMapper;
And prettier-plugin-java fails to identify the line. cc @clementdessoude
Overview of the issue
Generate a monolith application with WebFlux enabled as an option while running jhipster in a new directory. This works without issue. Then attempt to generate entities and the associated CRUD admin pages from a JDL file which has one or more relationships (different cardinalities tried) with the special User entity. Running "jhipster jdl entity.jdl" will fail during generation of java source files. The error will be similar to this: "Error running generator entities: Error: Error parsing file src/main/java/com/acme/webfluxuserjdltest/repository/BlogRepositoryInternalImpl.java: undefined". The full text of the error is attached as hipster-jdl-error.txt
Related issues
I did not find a similar reported issue.
Suggest a Fix
I will take a look at the generator code, but I am not familiar with how this code works (yet).
JHipster Version(s)
7.6.0
JHipster configuration
jhipster info INFO! Using JHipster version installed locally in current project's node_modules Welcome to the JHipster Information Sub-Generator
JHipster Version(s)
JHipster configuration, a
.yo-rc.json
file generated in the root folder.yo-rc.json file
JDL for the Entity configuration(s)
entityName.json
files generated in the.jhipster
directoryJDL entity definitions
Environment and Tools
openjdk version "11.0.11" 2021-04-20 LTS OpenJDK Runtime Environment Corretto-11.0.11.9.1 (build 11.0.11+9-LTS) OpenJDK 64-Bit Server VM Corretto-11.0.11.9.1 (build 11.0.11+9-LTS, mixed mode)
git version 2.34.1
node: v16.13.2
npm: 8.1.2
Docker version 20.10.8, build 3967b7d
docker-compose version 1.29.2, build 5becea4c
No change to package.json was detected. No package manager install will be executed. Congratulations, JHipster execution is complete!
Entity configuration(s)
entityName.json
files generated in the.jhipster
directoryHere is the Blog.json file from the .jhipster directory (this entity contains a relationship to the User entity.
Browsers and Operating System
Safari browser in use on an M1-based MacBook Pro 2020 with the latest operating system patches. Not browser-related the error occurs at the command line during jdl-driven entity code generation.
I do love jHipster, and I have and will continue donating the the collective - thank you! yo-rc.json.txt