当前位置: 首页 > 知识库问答 >
问题:

解析导入jdl时jhipster给出错误

锺离卓
2023-03-14

我用“http://www.jhipster.tech/jdl-studio/”创建了一个jdl文件,但当我在jhipster项目中启动import时,我出现了以下错误:

我在jdl Studio中没有错误

Using JHipster version installed locally in current project's node_modules
Executing jhipster:import-jdl jhipster-jdl.jh
Options: 
The jdl is being parsed.
events.js:160
  throw er; // Unhandled 'error' event
  ^

Error: ERROR!
Error while parsing entities from JDL

at Environment.error (D:\workspace\yvidya\node_modules\yeoman-environment\lib\environment.js:157:40)
at error (D:\workspace\yvidya\node_modules\generator-jhipster\generators\generator-base.js:1676:18)
at parseJDL (D:\workspace\yvidya\node_modules\generator-jhipster\generators\import-jdl\index.js:105:26)
at Object.<anonymous> (D:\workspace\yvidya\node_modules\yeoman-generator\lib\index.js:399:25)
at D:\workspace\yvidya\node_modules\run-async\index.js:25:25
at D:\workspace\yvidya\node_modules\run-async\index.js:24:19
at self.env.runLoop.add.completed (D:\workspace\yvidya\node_modules\yeoman-generator\lib\index.js:400:11)
at runCallback (timers.js:672:20)
at tryOnImmediate (timers.js:645:5)
at processImmediate [as _immediateCallback] (timers.js:617:5)

这是我的jdl文件

entity Entite {
    nom String required maxlength(100),
    numeroLicence String maxlength(30),
    siret String maxlength(15),
    adresse String maxlength(100),
    adresseComplement String maxlength(100),
    codePostal String maxlength(10),
    ville String maxlength(50)
}

entity TypeEntity {
    nom String required maxlength(30)
}

entity WebService {
    nom String required maxlength(30),
    methode String required maxlength(10)
}

entity Profil {
    nom String required maxlength(20)
}

entity UserFonc {
    nom String required maxlength(30)
}

entity TypeBon {
    nom String required maxlength(15)
}

entity NatureBon {
    nom String required maxlength(15)
}

entity Permission {
}

entity BonSav {
    uuid String required maxlength(40),
    logicielId String required maxlength(40),
    codeMagasin String maxlength(10),
    numeroFournisseur String maxlength(40),
    codeReparation String required maxlength(10),
    libelleReparation Text required,
    dateDepot ZonedDateTime required,
    dateRetrait ZonedDateTime required,
    codeClient String required maxlength(10),
    nomClient String required maxlength(30),
    prenomClient String required maxlength(20),
    emailClient String maxlength(50),
    telephoneClient String maxlength(20),
    photo Blob,
    dateCreation ZonedDateTime required,
    dateModification ZonedDateTime required
}

entity Memo {
    titre String required maxlength(200),
    commentaire Text,
    flagTraiter Boolean,
    dateCreation ZonedDateTime required,
    dateModification ZonedDateTime required
}

relationship ManyToMany {
    Profil{WebService(nom)} to WebService{profil}
}

relationship ManyToMany {
    WebService{TypeEntity(nom)} to TypeEntity{webService}
}

relationship ManyToOne {
    Entite{typeEntity(nom)} to TypeEntity
}

relationship ManyToMany {
    Permission{entite(nom)} to Entite{permission}
}

relationship ManyToOne {
    Permission{profil(nom)} to Profil
}

relationship ManyToOne {
    Permission{UserFonc(nom)} to UserFonc
}

relationship ManyToOne {
    BonSav{entite(nom)} to Entite
}

relationship ManyToOne {
    BonSav{nature(nom)} to NatureBon
}

relationship ManyToOne {
    BonSav{type(nom)} to TypeBon
}

relationship ManyToOne {
    BonSav{destinataire(nom)} to Entite
}

relationship ManyToOne {
    Entite{entiteMere(nom)} to Entite
}

relationship ManyToOne {
    Memo{bonSav} to BonSav
}

relationship ManyToOne {
    Memo{createur(nom)} to UserFonc
}

relationship ManyToOne {
    Memo{modificateur(nom)} to UserFonc
}

relationship ManyToOne {
    BonSav{createur(nom)} to UserFonc
}

relationship ManyToOne {
    BonSav{modificateur(nom)} to UserFonc
}

// Set pagination options
paginate WebService, Profil, NatureBon, TypeBon with infinite-scroll
paginate Entite, TypeEntity, BonSav, Memo, UserFonc, Permission with pagination

dto * with mapstruct

// Set service options to all except few
service all with serviceImpl

你能给我错误解析吗?我不明白...

我正在使用JHIPSTER4.9.0并使用函数import-jdl

文斯

共有1个答案

姬英耀
2023-03-14

您的两个实体(memobonsav)使用text数据类型。这不是有效的JDL数据类型。使用stringtextblob

 类似资料:
  • 我在Jhipster是新来的。安装后,上一个版本7在尝试导入jdl:error时出现了这个错误!找不到模块'ajv/dist/compile/context'尝试降级到版本6,但出现相同错误。 错误!找不到模块'ajv/dist/compile/context'需要堆栈: /users/rafa/desarrollo/personal/jhipster/myapp/node_modules/ajv

  • 在执行“jhipster import-jdl your-jdl-file.jh”生成实体之后,如果我发现缺少一些东西(即实体中的关系、实体或字段),我可以重做jh文件并再次运行命令以进行更改吗?感谢你的帮助!

  • 我正在使用、、、(Apple Git-128)和 我已经用bellow命令安装了Jhipster,并且已经成功安装了。 但是现在,当我键入命令在新的项目文件夹中生成应用程序时,我得到了以下错误。我不知道哪里出了问题,如何解决这个问题。有谁能帮我做这件事吗。

  • 本文向大家介绍mysql导入导出命令解析,包括了mysql导入导出命令解析的使用技巧和注意事项,需要的朋友参考一下 mysqldump是mysql用于转存储数据库的实用程序。它主要产生一个SQL脚本,其中包含从头重新创建数据库所必需的命令CREATE TABLE INSERT等。下面就让我们一起学习吧! 一、mysqldump:数据库备份程序  有3种方式来调用mysqldump: 如果没有指定任

  • 导入SBT项目时出错: ... 关于如何解决这个问题的任何建议。导入在另一台机器上运行良好。我看到了.ivy2文件夹中的jar文件。