jhipster / generator-jhipster-quarkus

Quarkus blueprint for JHipster
https://www.jhipster.tech/blueprints/quarkus/
Apache License 2.0
141 stars 55 forks source link

Unable to run native image after building #251

Closed mraible closed 2 years ago

mraible commented 2 years ago

I was able to successfully build a native image with GraalVM CE 22.2.0 using mvn package -Pnative,prod. However, when I try to start it with target/*runner, there's an error:

'quarkus.oidc.client-id' property must be configured

If I change application.properties from:

%dev.quarkus.oidc.client-id=web_app
%dev.quarkus.oidc.credentials.secret=web_app

To:

quarkus.oidc.client-id=web_app
quarkus.oidc.credentials.secret=web_app

... it works!

However, the app doesn't start because it can't connect to MySQL and there's no Docker Compose file created for MySQL.

Here's the .yo-rc.json I'm using to test:

{
  "generator-jhipster": {
    "applicationType": "monolith",
    "authenticationType": "oauth2",
    "baseName": "jhipster",
    "blueprints": [
      {
        "name": "generator-jhipster-quarkus",
        "version": "2.0.0-beta.1"
      }
    ],
    "buildTool": "maven",
    "cacheProvider": "caffeine",
    "clientFramework": "angularX",
    "clientPackageManager": "npm",
    "clientTheme": "none",
    "clientThemeVariant": "",
    "creationTimestamp": 1665600995874,
    "cypressAudit": true,
    "cypressCoverage": true,
    "databaseType": "sql",
    "devDatabaseType": "h2Disk",
    "devServerPort": 4200,
    "dtoSuffix": "DTO",
    "enableGradleEnterprise": false,
    "enableHibernateCache": true,
    "enableTranslation": true,
    "entitySuffix": "",
    "jhiPrefix": "jhi",
    "jhipsterVersion": "7.9.3",
    "languages": ["en", "nl"],
    "nativeLanguage": "en",
    "otherModules": [
      {
        "name": "generator-jhipster-quarkus",
        "version": "2.0.0-beta.1"
      }
    ],
    "packageName": "com.company.myapp",
    "pages": [],
    "prodDatabaseType": "mysql",
    "reactive": false,
    "searchEngine": false,
    "serverPort": "8080",
    "serviceDiscoveryType": false,
    "skipCheckLengthOfIdentifier": false,
    "skipClient": false,
    "skipFakeData": false,
    "skipUserManagement": true,
    "testFrameworks": ["cypress"],
    "websocket": false,
    "withAdminUi": true
  }
}
mraible commented 2 years ago

@mshima Do you know how to modify this blueprint to include the database files from the main generator in src/main/docker? I think something needs to change at https://github.com/jhipster/generator-jhipster-quarkus/blob/main/generators/server/files.js#L643.

mshima commented 2 years ago

@mraible indeed. We need a new generator-jhipster release with https://github.com/jhipster/generator-jhipster/pull/20069.

mraible commented 2 years ago

@mshima I created https://github.com/jhipster/generator-jhipster-quarkus/pull/253 as a workaround until the next JHipster release.

mshima commented 2 years ago

@mraible updated the PR so we don’t need to copy the templates and wait for new release.

mraible commented 2 years ago

@mshima Thanks! Please merge #252 at your convenience.

mshima commented 2 years ago

I don't have permission on this repo

mraible commented 2 years ago

It doesn't look like I can give them to you either. Please collect the bounty for solving this problem!

mshima commented 2 years ago

No problem.

mshima commented 1 year ago

@DanielFran bug bounty claimed https://opencollective.com/generator-jhipster/expenses/120311

DanielFran commented 1 year ago

@mshima approved