jhipster-kotlin icon indicating copy to clipboard operation
jhipster-kotlin copied to clipboard

Error about missing EntityCallback.kt when importing JDL

Open hubertgrzeskowiak opened this issue 3 years ago • 0 comments

Overview of the issue

❯ khipster jdl --incremental-changelog --reproducible --skip-git --dto-suffix Dto --pk-type uuid jhipster-model.jdl
INFO! Using KHipster version installed locally in current project's node_modules
INFO! No custom sharedOptions found within blueprint: generator-jhipster-kotlin at /Users/hgrzeskowiak/personalfinance/node_modules/generator-jhipster-kotlin
INFO! No custom commands found within blueprint: generator-jhipster-kotlin at /Users/hgrzeskowiak/personalfinance/node_modules/generator-jhipster-kotlin
(node:76591) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./cli/" in the "exports" field module resolution of the package at /Users/hgrzeskowiak/personalfinance/node_modules/generator-jhipster/package.json.
Update this package.json to use a subpath pattern like "./cli/*".
(Use `node --trace-deprecation ...` to show where the warning was created)

        ██╗ ██╗   ██╗ ████████╗ ███████╗   ██████╗ ████████╗ ████████╗ ███████╗
        ██║ ██║   ██║ ╚══██╔══╝ ██╔═══██╗ ██╔════╝ ╚══██╔══╝ ██╔═════╝ ██╔═══██╗
        ██║ ████████║    ██║    ███████╔╝ ╚█████╗     ██║    ██████╗   ███████╔╝
  ██╗   ██║ ██╔═══██║    ██║    ██╔════╝   ╚═══██╗    ██║    ██╔═══╝   ██╔══██║
  ╚██████╔╝ ██║   ██║ ████████╗ ██║       ██████╔╝    ██║    ████████╗ ██║  ╚██╗
   ╚═════╝  ╚═╝   ╚═╝ ╚═══════╝ ╚═╝       ╚═════╝     ╚═╝    ╚═══════╝ ╚═╝   ╚═╝
                            https://www.jhipster.tech
Welcome to JHipster v7.8.1

INFO! Executing import-jdl jhipster-model.jdl
INFO! The JDL is being parsed.
Blueprints are being used, the JDL validation phase is skipped.
info: The dto option is set for UserProfile, the 'serviceClass' value for the 'service' is gonna be set for this entity if no other value has been set.
info: The dto option is set for AssetAccount, the 'serviceClass' value for the 'service' is gonna be set for this entity if no other value has been set.
info: The dto option is set for AssetAccountType, the 'serviceClass' value for the 'service' is gonna be set for this entity if no other value has been set.
info: The dto option is set for Transaction, the 'serviceClass' value for the 'service' is gonna be set for this entity if no other value has been set.
info: The dto option is set for Asset, the 'serviceClass' value for the 'service' is gonna be set for this entity if no other value has been set.
info: The dto option is set for AssetType, the 'serviceClass' value for the 'service' is gonna be set for this entity if no other value has been set.
info: The dto option is set for AssetPairValue, the 'serviceClass' value for the 'service' is gonna be set for this entity if no other value has been set.
INFO! Found entities: UserProfile, AssetAccount, AssetAccountType, Transaction, Asset, AssetType, AssetPairValue.
INFO! The JDL has been successfully parsed
INFO! Generating 0 applications.
INFO! Generating 7 entities.
INFO! Generating entities for application undefined in a new parallel process
(node:76591) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./generators/" in the "exports" field module resolution of the package at /Users/hgrzeskowiak/personalfinance/node_modules/generator-jhipster/package.json.
Update this package.json to use a subpath pattern like "./generators/*".

Found the .jhipster/UserProfile.json configuration file, entity can be automatically generated!


Found the .jhipster/AssetAccount.json configuration file, entity can be automatically generated!


Found the .jhipster/AssetAccountType.json configuration file, entity can be automatically generated!


Found the .jhipster/Transaction.json configuration file, entity can be automatically generated!


Found the .jhipster/Asset.json configuration file, entity can be automatically generated!


Found the .jhipster/AssetType.json configuration file, entity can be automatically generated!


Found the .jhipster/AssetPairValue.json configuration file, entity can be automatically generated!

     info Creating changelog for entities UserProfile,AssetAccount,AssetAccountType,Transaction,Asset,AssetType,AssetPairValue
WARNING! Error generating fake data for field id
WARNING! Error generating fake data for field id
(node:76591) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./jdl/" in the "exports" field module resolution of the package at /Users/hgrzeskowiak/personalfinance/node_modules/generator-jhipster/package.json.
Update this package.json to use a subpath pattern like "./jdl/*".
     info Using blueprint generator-jhipster-kotlin for entity-server subgenerator
     info Using blueprint generator-jhipster-kotlin for entity-server subgenerator
     info Using blueprint generator-jhipster-kotlin for entity-server subgenerator
     info Using blueprint generator-jhipster-kotlin for entity-server subgenerator
     info Using blueprint generator-jhipster-kotlin for entity-server subgenerator
     info Using blueprint generator-jhipster-kotlin for entity-server subgenerator
     info Using blueprint generator-jhipster-kotlin for entity-server subgenerator
Error running generator entities: Error: Template file src/main/kotlin/package/domain/EntityCallback.kt was not found at /Users/hgrzeskowiak/personalfinance/node_modules/generator-jhipster-kotlin/generators/entity-server/templates/reactive,/Users/hgrzeskowiak/personalfinance/node_modules/generator-jhipster-kotlin/generators/entity-server/templates,/Users/hgrzeskowiak/personalfinance/node_modules/generator-jhipster/generators/entity-server/templates/reactive,/Users/hgrzeskowiak/personalfinance/node_modules/generator-jhipster/generators/entity-server/templates
Error: Template file src/main/kotlin/package/domain/EntityCallback.kt was not found at /Users/hgrzeskowiak/personalfinance/node_modules/generator-jhipster-kotlin/generators/entity-server/templates/reactive,/Users/hgrzeskowiak/personalfinance/node_modules/generator-jhipster-kotlin/generators/entity-server/templates,/Users/hgrzeskowiak/personalfinance/node_modules/generator-jhipster/generators/entity-server/templates/reactive,/Users/hgrzeskowiak/personalfinance/node_modules/generator-jhipster/generators/entity-server/templates
    at /Users/hgrzeskowiak/personalfinance/node_modules/generator-jhipster/generators/generator-base.js:2307:25
    at Array.map (<anonymous>)
    at /Users/hgrzeskowiak/personalfinance/node_modules/generator-jhipster/generators/generator-base.js:2237:42
    at Array.map (<anonymous>)
    at /Users/hgrzeskowiak/personalfinance/node_modules/generator-jhipster/generators/generator-base.js:2234:29
    at Array.map (<anonymous>)
    at module.exports.writeFilesToDisk (/Users/hgrzeskowiak/personalfinance/node_modules/generator-jhipster/generators/generator-base.js:2233:45)
    at module.exports.writeServerFiles (/Users/hgrzeskowiak/personalfinance/node_modules/generator-jhipster-kotlin/generators/entity-server/files.js:416:29)
    at Object.<anonymous> (/Users/hgrzeskowiak/personalfinance/node_modules/yeoman-generator/lib/index.js:1097:23)
    at /Users/hgrzeskowiak/personalfinance/node_modules/run-async/index.js:49:25
    at new Promise (<anonymous>)
    at /Users/hgrzeskowiak/personalfinance/node_modules/run-async/index.js:26:19
    at /Users/hgrzeskowiak/personalfinance/node_modules/yeoman-generator/lib/index.js:1098:9
    at new Promise (<anonymous>)
    at module.exports.executeTask (/Users/hgrzeskowiak/personalfinance/node_modules/yeoman-generator/lib/index.js:1069:12)
    at runLoop.add.once (/Users/hgrzeskowiak/personalfinance/node_modules/yeoman-generator/lib/index.js:1049:14)
ERROR! Template file src/main/kotlin/package/domain/EntityCallback.kt was not found at /Users/hgrzeskowiak/personalfinance/node_modules/generator-jhipster-kotlin/generators/entity-server/templates/reactive,/Users/hgrzeskowiak/personalfinance/node_modules/generator-jhipster-kotlin/generators/entity-server/templates,/Users/hgrzeskowiak/personalfinance/node_modules/generator-jhipster/generators/entity-server/templates/reactive,/Users/hgrzeskowiak/personalfinance/node_modules/generator-jhipster/generators/entity-server/templates
Error: Template file src/main/kotlin/package/domain/EntityCallback.kt was not found at /Users/hgrzeskowiak/personalfinance/node_modules/generator-jhipster-kotlin/generators/entity-server/templates/reactive,/Users/hgrzeskowiak/personalfinance/node_modules/generator-jhipster-kotlin/generators/entity-server/templates,/Users/hgrzeskowiak/personalfinance/node_modules/generator-jhipster/generators/entity-server/templates/reactive,/Users/hgrzeskowiak/personalfinance/node_modules/generator-jhipster/generators/entity-server/templates
    at /Users/hgrzeskowiak/personalfinance/node_modules/generator-jhipster/generators/generator-base.js:2307:25
    at Array.map (<anonymous>)
    at /Users/hgrzeskowiak/personalfinance/node_modules/generator-jhipster/generators/generator-base.js:2237:42
    at Array.map (<anonymous>)
    at /Users/hgrzeskowiak/personalfinance/node_modules/generator-jhipster/generators/generator-base.js:2234:29
    at Array.map (<anonymous>)
    at module.exports.writeFilesToDisk (/Users/hgrzeskowiak/personalfinance/node_modules/generator-jhipster/generators/generator-base.js:2233:45)
    at module.exports.writeServerFiles (/Users/hgrzeskowiak/personalfinance/node_modules/generator-jhipster-kotlin/generators/entity-server/files.js:416:29)
    at Object.<anonymous> (/Users/hgrzeskowiak/personalfinance/node_modules/yeoman-generator/lib/index.js:1097:23)
    at /Users/hgrzeskowiak/personalfinance/node_modules/run-async/index.js:49:25
    at new Promise (<anonymous>)
    at /Users/hgrzeskowiak/personalfinance/node_modules/run-async/index.js:26:19
    at /Users/hgrzeskowiak/personalfinance/node_modules/yeoman-generator/lib/index.js:1098:9
    at new Promise (<anonymous>)
    at module.exports.executeTask (/Users/hgrzeskowiak/personalfinance/node_modules/yeoman-generator/lib/index.js:1069:12)
    at runLoop.add.once (/Users/hgrzeskowiak/personalfinance/node_modules/yeoman-generator/lib/index.js:1049:14)

.yo-rc.json:

{
  "generator-jhipster": {
    "applicationType": "monolith",
    "authenticationType": "jwt",
    "baseName": "personalfinance",
    "blueprints": [
      {
        "name": "generator-jhipster-kotlin",
        "version": "1.15.0"
      }
    ],
    "buildTool": "maven",
    "cacheProvider": "no",
    "clientFramework": "react",
    "clientPackageManager": "npm",
    "clientTheme": "none",
    "clientThemeVariant": "",
    "creationTimestamp": 1659252716439,
    "databaseType": "sql",
    "devDatabaseType": "h2Disk",
    "devServerPort": 9060,
    "dtoSuffix": "DTO",
    "enableGradleEnterprise": false,
    "enableHibernateCache": false,
    "enableSwaggerCodegen": false,
    "enableTranslation": true,
    "entitySuffix": "",
    "jhiPrefix": "jhi",
    "jhipsterVersion": "7.8.1",
    "jwtSecretKey": "YmE3ZjQxYjg2OWFiYmE1N2RjY2FlNjk2MmRlYjU1NzNmOGFjNjVkYjBlNWI1ZDA2NmVkY2VmMmUwY2E5NzExODUyMGZmOTIwYjIyNDkyYWM1MjgwZDhkMTE3Y2E2ODEwN2Q2OTQzZmM2ZDEzODExMDQ1ODhhZjhjMzZjZGE0ZDc=",
    "languages": [
      "en"
    ],
    "messageBroker": false,
    "nativeLanguage": "en",
    "otherModules": [
      {
        "name": "generator-jhipster-kotlin",
        "version": "1.15.0"
      }
    ],
    "packageName": "net.graphicscoder",
    "pages": [],
    "prodDatabaseType": "postgresql",
    "reactive": true,
    "searchEngine": "elasticsearch",
    "serverPort": "8080",
    "serverSideOptions": [
      "searchEngine:elasticsearch"
    ],
    "serviceDiscoveryType": "no",
    "skipCheckLengthOfIdentifier": false,
    "skipFakeData": false,
    "skipUserManagement": false,
    "testFrameworks": [
      "cypress"
    ],
    "websocket": false,
    "withAdminUi": true
  }
}

Motivation for or Use Case

Reproduce the error

Importing a JDL. I reduced the JDL to a single entity without any options and had the same result.

Related issues

Link to PR (if any)

KHipster Version(s)

7.8.1

  • [x] Checking this box is mandatory (this is just to show you read everything)

hubertgrzeskowiak avatar Aug 02 '22 04:08 hubertgrzeskowiak