Jhipster not creating entities which I have imported at the time of jhipster command












2















I have used jhipster import-jdl my_file.jdl
Jhipster version V5.7.0



And content of that jdl file is(below(IDK application?config is not showing in code editor in stack overflow))



application {
config {
prodDatabaseType mysql
buildTool maven
}
}

entity Region {
regionName String
}

entity Country {
countryName String
}

// an ignored comment
/** not an ignored comment */
entity Location {
streetAddress String,
postalCode String,
city String,
stateProvince String
}

entity Department {
departmentName String required
}

entity Task {
title String,
description String
}

entity Employee {
firstName String,
lastName String,
email String,
phoneNumber String,
hireDate Instant,
salary Long,
commissionPct Long
}

entity Job {
jobTitle String,
minSalary Long,
maxSalary Long
}

entity JobHistory {
startDate Instant,
endDate Instant,
language Language
}

enum Language {
FRENCH, ENGLISH, SPANISH
}

relationship OneToOne {
Country{region} to Region
}

relationship OneToOne {
Location{country} to Country
}

relationship OneToOne {
Department{location} to Location
}

relationship ManyToMany {
Job{task(title)} to Task{job}
}

relationship OneToMany {
Employee{job} to Job,
Department{employee} to Employee
}

relationship ManyToOne {
Employee{manager} to Employee
}

relationship OneToOne {
JobHistory{job} to Job,
JobHistory{department} to Department,
JobHistory{employee} to Employee
}

// Set pagination options
paginate JobHistory, Employee with infinite-scroll
paginate Job with pagination

// Use Data Transfert Objects (DTO)
// dto * with mapstruct

// Set service options to all except few
//service all with serviceImpl except Employee, Job

// Set an angular suffix
// angularSuffix * with mySuffix`


And cmd showing



DEBUG!  importState exportedEntities: 0
DEBUG! importState exportedApplications: 1
DEBUG! importState exportedDeployments: 0
INFO! No change in entity configurations, no entities were updated.


When I am not mentioning application > config details, it is giving error as



Error: The JDL object and the database type are both mandatory.        
ERROR! Error while parsing applications and entities from the JDL Error: The JDL object and the database type are both mandatory.


Can anyone tell me what I am doing wrong ?










share|improve this question

























  • Is it complusory to give application > config ?

    – P Satish Patro
    Nov 22 '18 at 12:05













  • And why it is not creating entity in java code ?

    – P Satish Patro
    Nov 22 '18 at 12:05











  • I tried to add it in code editor, but I can't able to, and that 4 space in first is to show it in diff line, otherwise it was taking everything in 1 line

    – P Satish Patro
    Nov 29 '18 at 6:04
















2















I have used jhipster import-jdl my_file.jdl
Jhipster version V5.7.0



And content of that jdl file is(below(IDK application?config is not showing in code editor in stack overflow))



application {
config {
prodDatabaseType mysql
buildTool maven
}
}

entity Region {
regionName String
}

entity Country {
countryName String
}

// an ignored comment
/** not an ignored comment */
entity Location {
streetAddress String,
postalCode String,
city String,
stateProvince String
}

entity Department {
departmentName String required
}

entity Task {
title String,
description String
}

entity Employee {
firstName String,
lastName String,
email String,
phoneNumber String,
hireDate Instant,
salary Long,
commissionPct Long
}

entity Job {
jobTitle String,
minSalary Long,
maxSalary Long
}

entity JobHistory {
startDate Instant,
endDate Instant,
language Language
}

enum Language {
FRENCH, ENGLISH, SPANISH
}

relationship OneToOne {
Country{region} to Region
}

relationship OneToOne {
Location{country} to Country
}

relationship OneToOne {
Department{location} to Location
}

relationship ManyToMany {
Job{task(title)} to Task{job}
}

relationship OneToMany {
Employee{job} to Job,
Department{employee} to Employee
}

relationship ManyToOne {
Employee{manager} to Employee
}

relationship OneToOne {
JobHistory{job} to Job,
JobHistory{department} to Department,
JobHistory{employee} to Employee
}

// Set pagination options
paginate JobHistory, Employee with infinite-scroll
paginate Job with pagination

// Use Data Transfert Objects (DTO)
// dto * with mapstruct

// Set service options to all except few
//service all with serviceImpl except Employee, Job

// Set an angular suffix
// angularSuffix * with mySuffix`


And cmd showing



DEBUG!  importState exportedEntities: 0
DEBUG! importState exportedApplications: 1
DEBUG! importState exportedDeployments: 0
INFO! No change in entity configurations, no entities were updated.


When I am not mentioning application > config details, it is giving error as



Error: The JDL object and the database type are both mandatory.        
ERROR! Error while parsing applications and entities from the JDL Error: The JDL object and the database type are both mandatory.


Can anyone tell me what I am doing wrong ?










share|improve this question

























  • Is it complusory to give application > config ?

    – P Satish Patro
    Nov 22 '18 at 12:05













  • And why it is not creating entity in java code ?

    – P Satish Patro
    Nov 22 '18 at 12:05











  • I tried to add it in code editor, but I can't able to, and that 4 space in first is to show it in diff line, otherwise it was taking everything in 1 line

    – P Satish Patro
    Nov 29 '18 at 6:04














2












2








2








I have used jhipster import-jdl my_file.jdl
Jhipster version V5.7.0



And content of that jdl file is(below(IDK application?config is not showing in code editor in stack overflow))



application {
config {
prodDatabaseType mysql
buildTool maven
}
}

entity Region {
regionName String
}

entity Country {
countryName String
}

// an ignored comment
/** not an ignored comment */
entity Location {
streetAddress String,
postalCode String,
city String,
stateProvince String
}

entity Department {
departmentName String required
}

entity Task {
title String,
description String
}

entity Employee {
firstName String,
lastName String,
email String,
phoneNumber String,
hireDate Instant,
salary Long,
commissionPct Long
}

entity Job {
jobTitle String,
minSalary Long,
maxSalary Long
}

entity JobHistory {
startDate Instant,
endDate Instant,
language Language
}

enum Language {
FRENCH, ENGLISH, SPANISH
}

relationship OneToOne {
Country{region} to Region
}

relationship OneToOne {
Location{country} to Country
}

relationship OneToOne {
Department{location} to Location
}

relationship ManyToMany {
Job{task(title)} to Task{job}
}

relationship OneToMany {
Employee{job} to Job,
Department{employee} to Employee
}

relationship ManyToOne {
Employee{manager} to Employee
}

relationship OneToOne {
JobHistory{job} to Job,
JobHistory{department} to Department,
JobHistory{employee} to Employee
}

// Set pagination options
paginate JobHistory, Employee with infinite-scroll
paginate Job with pagination

// Use Data Transfert Objects (DTO)
// dto * with mapstruct

// Set service options to all except few
//service all with serviceImpl except Employee, Job

// Set an angular suffix
// angularSuffix * with mySuffix`


And cmd showing



DEBUG!  importState exportedEntities: 0
DEBUG! importState exportedApplications: 1
DEBUG! importState exportedDeployments: 0
INFO! No change in entity configurations, no entities were updated.


When I am not mentioning application > config details, it is giving error as



Error: The JDL object and the database type are both mandatory.        
ERROR! Error while parsing applications and entities from the JDL Error: The JDL object and the database type are both mandatory.


Can anyone tell me what I am doing wrong ?










share|improve this question
















I have used jhipster import-jdl my_file.jdl
Jhipster version V5.7.0



And content of that jdl file is(below(IDK application?config is not showing in code editor in stack overflow))



application {
config {
prodDatabaseType mysql
buildTool maven
}
}

entity Region {
regionName String
}

entity Country {
countryName String
}

// an ignored comment
/** not an ignored comment */
entity Location {
streetAddress String,
postalCode String,
city String,
stateProvince String
}

entity Department {
departmentName String required
}

entity Task {
title String,
description String
}

entity Employee {
firstName String,
lastName String,
email String,
phoneNumber String,
hireDate Instant,
salary Long,
commissionPct Long
}

entity Job {
jobTitle String,
minSalary Long,
maxSalary Long
}

entity JobHistory {
startDate Instant,
endDate Instant,
language Language
}

enum Language {
FRENCH, ENGLISH, SPANISH
}

relationship OneToOne {
Country{region} to Region
}

relationship OneToOne {
Location{country} to Country
}

relationship OneToOne {
Department{location} to Location
}

relationship ManyToMany {
Job{task(title)} to Task{job}
}

relationship OneToMany {
Employee{job} to Job,
Department{employee} to Employee
}

relationship ManyToOne {
Employee{manager} to Employee
}

relationship OneToOne {
JobHistory{job} to Job,
JobHistory{department} to Department,
JobHistory{employee} to Employee
}

// Set pagination options
paginate JobHistory, Employee with infinite-scroll
paginate Job with pagination

// Use Data Transfert Objects (DTO)
// dto * with mapstruct

// Set service options to all except few
//service all with serviceImpl except Employee, Job

// Set an angular suffix
// angularSuffix * with mySuffix`


And cmd showing



DEBUG!  importState exportedEntities: 0
DEBUG! importState exportedApplications: 1
DEBUG! importState exportedDeployments: 0
INFO! No change in entity configurations, no entities were updated.


When I am not mentioning application > config details, it is giving error as



Error: The JDL object and the database type are both mandatory.        
ERROR! Error while parsing applications and entities from the JDL Error: The JDL object and the database type are both mandatory.


Can anyone tell me what I am doing wrong ?







java jhipster jdl






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 7 '18 at 18:39









Spara

3,09721441




3,09721441










asked Nov 22 '18 at 12:04









P Satish PatroP Satish Patro

6110




6110













  • Is it complusory to give application > config ?

    – P Satish Patro
    Nov 22 '18 at 12:05













  • And why it is not creating entity in java code ?

    – P Satish Patro
    Nov 22 '18 at 12:05











  • I tried to add it in code editor, but I can't able to, and that 4 space in first is to show it in diff line, otherwise it was taking everything in 1 line

    – P Satish Patro
    Nov 29 '18 at 6:04



















  • Is it complusory to give application > config ?

    – P Satish Patro
    Nov 22 '18 at 12:05













  • And why it is not creating entity in java code ?

    – P Satish Patro
    Nov 22 '18 at 12:05











  • I tried to add it in code editor, but I can't able to, and that 4 space in first is to show it in diff line, otherwise it was taking everything in 1 line

    – P Satish Patro
    Nov 29 '18 at 6:04

















Is it complusory to give application > config ?

– P Satish Patro
Nov 22 '18 at 12:05







Is it complusory to give application > config ?

– P Satish Patro
Nov 22 '18 at 12:05















And why it is not creating entity in java code ?

– P Satish Patro
Nov 22 '18 at 12:05





And why it is not creating entity in java code ?

– P Satish Patro
Nov 22 '18 at 12:05













I tried to add it in code editor, but I can't able to, and that 4 space in first is to show it in diff line, otherwise it was taking everything in 1 line

– P Satish Patro
Nov 29 '18 at 6:04





I tried to add it in code editor, but I can't able to, and that 4 space in first is to show it in diff line, otherwise it was taking everything in 1 line

– P Satish Patro
Nov 29 '18 at 6:04












2 Answers
2






active

oldest

votes


















2














You need to assign the entities to the application, using entities * in the app config:



application {
config {
prodDatabaseType mysql
buildTool maven
}
entities *
}
// your entities here





share|improve this answer


























  • But, then how come it will create Language, Job, Employee etc table.

    – P Satish Patro
    Nov 29 '18 at 5:30











  • According to your file will it create only predefined table like user, authority, Changelog entity. Right?

    – P Satish Patro
    Nov 29 '18 at 5:31











  • You should include your entities in the JDL, I didn't so the answer would not be super long. Updated the answer to show that.

    – Jon Ruddell
    Nov 29 '18 at 18:03











  • Got it. I missed the last line in hurry. Thank you so much

    – P Satish Patro
    Dec 6 '18 at 9:01



















0














Got the answer.



When I gave according to question, it created only according to application>config like mysql db, maven build tool and when I run it, it didn't ask any other options like basename, port, marketplace, instead of those 2 fields(db, buildtool), it took everything default value.



And for entity, it wrote not overriding entity/extra entity not found



Solution



1.First run only "jhipster" and choose options



>jhipster


2.import jdl fine with out application>config properties



>jhipster import-jdl jdlfilename.jdl


jdlfilename can be in jdl or jh format and if it is outside of directory give exact path






share|improve this answer























    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53430632%2fjhipster-not-creating-entities-which-i-have-imported-at-the-time-of-jhipster-com%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    2














    You need to assign the entities to the application, using entities * in the app config:



    application {
    config {
    prodDatabaseType mysql
    buildTool maven
    }
    entities *
    }
    // your entities here





    share|improve this answer


























    • But, then how come it will create Language, Job, Employee etc table.

      – P Satish Patro
      Nov 29 '18 at 5:30











    • According to your file will it create only predefined table like user, authority, Changelog entity. Right?

      – P Satish Patro
      Nov 29 '18 at 5:31











    • You should include your entities in the JDL, I didn't so the answer would not be super long. Updated the answer to show that.

      – Jon Ruddell
      Nov 29 '18 at 18:03











    • Got it. I missed the last line in hurry. Thank you so much

      – P Satish Patro
      Dec 6 '18 at 9:01
















    2














    You need to assign the entities to the application, using entities * in the app config:



    application {
    config {
    prodDatabaseType mysql
    buildTool maven
    }
    entities *
    }
    // your entities here





    share|improve this answer


























    • But, then how come it will create Language, Job, Employee etc table.

      – P Satish Patro
      Nov 29 '18 at 5:30











    • According to your file will it create only predefined table like user, authority, Changelog entity. Right?

      – P Satish Patro
      Nov 29 '18 at 5:31











    • You should include your entities in the JDL, I didn't so the answer would not be super long. Updated the answer to show that.

      – Jon Ruddell
      Nov 29 '18 at 18:03











    • Got it. I missed the last line in hurry. Thank you so much

      – P Satish Patro
      Dec 6 '18 at 9:01














    2












    2








    2







    You need to assign the entities to the application, using entities * in the app config:



    application {
    config {
    prodDatabaseType mysql
    buildTool maven
    }
    entities *
    }
    // your entities here





    share|improve this answer















    You need to assign the entities to the application, using entities * in the app config:



    application {
    config {
    prodDatabaseType mysql
    buildTool maven
    }
    entities *
    }
    // your entities here






    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Nov 29 '18 at 18:03

























    answered Nov 27 '18 at 18:49









    Jon RuddellJon Ruddell

    4,05911229




    4,05911229













    • But, then how come it will create Language, Job, Employee etc table.

      – P Satish Patro
      Nov 29 '18 at 5:30











    • According to your file will it create only predefined table like user, authority, Changelog entity. Right?

      – P Satish Patro
      Nov 29 '18 at 5:31











    • You should include your entities in the JDL, I didn't so the answer would not be super long. Updated the answer to show that.

      – Jon Ruddell
      Nov 29 '18 at 18:03











    • Got it. I missed the last line in hurry. Thank you so much

      – P Satish Patro
      Dec 6 '18 at 9:01



















    • But, then how come it will create Language, Job, Employee etc table.

      – P Satish Patro
      Nov 29 '18 at 5:30











    • According to your file will it create only predefined table like user, authority, Changelog entity. Right?

      – P Satish Patro
      Nov 29 '18 at 5:31











    • You should include your entities in the JDL, I didn't so the answer would not be super long. Updated the answer to show that.

      – Jon Ruddell
      Nov 29 '18 at 18:03











    • Got it. I missed the last line in hurry. Thank you so much

      – P Satish Patro
      Dec 6 '18 at 9:01

















    But, then how come it will create Language, Job, Employee etc table.

    – P Satish Patro
    Nov 29 '18 at 5:30





    But, then how come it will create Language, Job, Employee etc table.

    – P Satish Patro
    Nov 29 '18 at 5:30













    According to your file will it create only predefined table like user, authority, Changelog entity. Right?

    – P Satish Patro
    Nov 29 '18 at 5:31





    According to your file will it create only predefined table like user, authority, Changelog entity. Right?

    – P Satish Patro
    Nov 29 '18 at 5:31













    You should include your entities in the JDL, I didn't so the answer would not be super long. Updated the answer to show that.

    – Jon Ruddell
    Nov 29 '18 at 18:03





    You should include your entities in the JDL, I didn't so the answer would not be super long. Updated the answer to show that.

    – Jon Ruddell
    Nov 29 '18 at 18:03













    Got it. I missed the last line in hurry. Thank you so much

    – P Satish Patro
    Dec 6 '18 at 9:01





    Got it. I missed the last line in hurry. Thank you so much

    – P Satish Patro
    Dec 6 '18 at 9:01













    0














    Got the answer.



    When I gave according to question, it created only according to application>config like mysql db, maven build tool and when I run it, it didn't ask any other options like basename, port, marketplace, instead of those 2 fields(db, buildtool), it took everything default value.



    And for entity, it wrote not overriding entity/extra entity not found



    Solution



    1.First run only "jhipster" and choose options



    >jhipster


    2.import jdl fine with out application>config properties



    >jhipster import-jdl jdlfilename.jdl


    jdlfilename can be in jdl or jh format and if it is outside of directory give exact path






    share|improve this answer




























      0














      Got the answer.



      When I gave according to question, it created only according to application>config like mysql db, maven build tool and when I run it, it didn't ask any other options like basename, port, marketplace, instead of those 2 fields(db, buildtool), it took everything default value.



      And for entity, it wrote not overriding entity/extra entity not found



      Solution



      1.First run only "jhipster" and choose options



      >jhipster


      2.import jdl fine with out application>config properties



      >jhipster import-jdl jdlfilename.jdl


      jdlfilename can be in jdl or jh format and if it is outside of directory give exact path






      share|improve this answer


























        0












        0








        0







        Got the answer.



        When I gave according to question, it created only according to application>config like mysql db, maven build tool and when I run it, it didn't ask any other options like basename, port, marketplace, instead of those 2 fields(db, buildtool), it took everything default value.



        And for entity, it wrote not overriding entity/extra entity not found



        Solution



        1.First run only "jhipster" and choose options



        >jhipster


        2.import jdl fine with out application>config properties



        >jhipster import-jdl jdlfilename.jdl


        jdlfilename can be in jdl or jh format and if it is outside of directory give exact path






        share|improve this answer













        Got the answer.



        When I gave according to question, it created only according to application>config like mysql db, maven build tool and when I run it, it didn't ask any other options like basename, port, marketplace, instead of those 2 fields(db, buildtool), it took everything default value.



        And for entity, it wrote not overriding entity/extra entity not found



        Solution



        1.First run only "jhipster" and choose options



        >jhipster


        2.import jdl fine with out application>config properties



        >jhipster import-jdl jdlfilename.jdl


        jdlfilename can be in jdl or jh format and if it is outside of directory give exact path







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 29 '18 at 5:38









        P Satish PatroP Satish Patro

        6110




        6110






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53430632%2fjhipster-not-creating-entities-which-i-have-imported-at-the-time-of-jhipster-com%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            If I really need a card on my start hand, how many mulligans make sense? [duplicate]

            Alcedinidae

            Can an atomic nucleus contain both particles and antiparticles? [duplicate]