Reputation: 61
I am running into a problem with import-jdl and I am not sure why it is not working. I am trying to generate entities for microservices application.
All I get is
The jdl is being imported.
but nothing else.
I used the sample https://jhipster.github.io/jdl-studio/ entity provided by JDL without any modification.
I have tried this in my Mac, Linux (Ubuntu), and Docker container but I get the same error.
Here are the versions of the software:
JHipster Generator: v3.3.0
npm : 3.9.2
yo : 1.8.3
Microservices Application
------- Application files will be generated in folder: /Users/anand/Desktop/jhexample
JHipster update available: 3.4.0 (current: 3.3.0) Run npm install -g generator-jhipster to update. ______________________________________________________________________________
? (1/16) Which type of application would you like to create? Microservice application
? (2/16) What is the base name of your application? jhexample
? (3/16) As you are running in a microservice architecture, on which port would like your server to run? It should be unique to avoid port conflicts. 8081
? (4/16) What is your default Java package name? com.anand
? (5/16) Which type of authentication would you like to use? JWT authentication (stateless, with a token)
? (6/16) Which type of database would you like to use? MongoDB
? (7/16) Would you like to use Maven or Gradle for building the backend? Maven
? (8/16) Would you like to enable internationalization support? No
? (9/16) Which testing frameworks would you like to use? (Press to select)Gatling
...snip...
Server app generated successfully.
anand$ yo jhipster:import-jdl ./jhipster-jdl.jh
The jdl is being imported.
Upvotes: 6
Views: 6164
Reputation: 5155
if you are here because your jhipster import-jdl youfile.jdl doesn't create java code for entities but reportes the entities are imported, please try
jhipster import-jdl youfile.jdl --force
Upvotes: 3
Reputation: 300
I've faced the same situation: The jdl is being imported but nothing is generated. As Vikas Joshi suggests try using jhipster-uml:
npm install -g jhipster-uml
jhipster-uml ./jhipster-jdl.jh -db mongodb
jhispter-uml usually returns more feedback. Anyway take into account that in MongoDB as noSQL database that it is, some options have no sense (e.g relations between entities).
Upvotes: 7
Reputation: 501
I've run on the same issue on my OSX. Currently I've managed to workaround this through a virtual-machine on linux(debian/ubuntu) using the jhipster-generator version 3.4.0 . Newer version will not create the entities even for me.
Please try to delete all stuff installed from bottom to top from the instalation guide here until nodejs part.
So yo will done the following:
npm uninstall -g generator-jhipster
npm uninstall -g gulp
npm uninstall -g bower
npm uninstall -g yo
Then follow steps to remove nodejs from here
After uninstalling start again installing nodejs and commponents as suggested on jhipster guide with the only difference at the last step:
npm install -g [email protected]
Upvotes: 1
Reputation: 86
I was also struggling with the same error (for MySql i.s.o MongoDB). I used jhipster-uml i.s.o jhipster:import-jdl to create Entities and it worked for me. Hope it works with MongoDB as well. Don't exactly know why it does not work with import-jdl.
Upvotes: 1