Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LazyInitializationException for authorities with Elasticsearch #25763

Closed
mraible opened this issue Apr 5, 2024 · 4 comments
Closed

LazyInitializationException for authorities with Elasticsearch #25763

mraible opened this issue Apr 5, 2024 · 4 comments

Comments

@mraible
Copy link
Contributor

mraible commented Apr 5, 2024

Overview of the issue

When upgrading my 21-Points Health app to JHipster 8.2.1, I noticed an error when running Cypress e2e tests.

Screenshot 2024-04-04 at 9 47 07 PM
Motivation for or Use Case

These e2e tests seem to confirm that authorities is not loaded correctly when indexing an entity that references the built-in User entity.

Reproduce the error

See https://github.com/mraible/21-points/actions/runs/8564606589/job/23471398435

Related issues

mraible/21-points#249

Suggest a Fix
JHipster Version(s)
[email protected] /Users/mraible/dev/21-points
├─┬ [email protected]
│ └── [email protected] deduped
└── [email protected]
JHipster configuration, a .yo-rc.json file generated in the root folder
.yo-rc.json file
{
  "generator-jhipster": {
    "applicationType": "monolith",
    "authenticationType": "jwt",
    "baseName": "TwentyOnePoints",
    "blueprints": [],
    "buildTool": "gradle",
    "cacheProvider": "ehcache",
    "clientFramework": "angular",
    "clientPackageManager": "npm",
    "clientTheme": "none",
    "clientThemeVariant": "",
    "creationTimestamp": 1662997089611,
    "cypressAudit": false,
    "cypressCoverage": false,
    "databaseType": "sql",
    "devDatabaseType": "h2Disk",
    "devServerPort": 4200,
    "dtoSuffix": "DTO",
    "enableGradleEnterprise": false,
    "enableHibernateCache": true,
    "enableSwaggerCodegen": false,
    "enableTranslation": true,
    "entities": [
      "Points",
      "Weight",
      "BloodPressure",
      "Preferences"
    ],
    "entitySuffix": "",
    "herokuAppName": "health-by-points",
    "herokuDeployType": "git",
    "herokuJavaVersion": "11",
    "jhiPrefix": "jhi",
    "jhipsterVersion": "8.2.1",
    "languages": [
      "en",
      "fr"
    ],
    "lastLiquibaseTimestamp": 1667866821000,
    "messageBroker": false,
    "microfrontend": false,
    "microfrontends": [],
    "nativeLanguage": "en",
    "otherModules": [],
    "packageName": "org.jhipster.health",
    "pages": [],
    "prodDatabaseType": "postgresql",
    "reactive": false,
    "searchEngine": "elasticsearch",
    "serverPort": "8080",
    "serverSideOptions": [
      "searchEngine:elasticsearch"
    ],
    "serviceDiscoveryType": "no",
    "skipCheckLengthOfIdentifier": false,
    "skipClient": false,
    "skipFakeData": false,
    "skipUserManagement": false,
    "testFrameworks": [
      "cypress"
    ],
    "websocket": false,
    "withAdminUi": true
  }
}
Environment and Tools

openjdk version "21.0.2" 2024-01-16
OpenJDK Runtime Environment GraalVM CE 21.0.2+13.1 (build 21.0.2+13-jvmci-23.1-b30)
OpenJDK 64-Bit Server VM GraalVM CE 21.0.2+13.1 (build 21.0.2+13-jvmci-23.1-b30, mixed mode, sharing)

git version 2.39.3 (Apple Git-146)

node: v20.12.1
npm: 10.5.0

Docker version 25.0.3, build 4debf41

JDL for the Entity configuration(s) entityName.json files generated in the .jhipster directory
JDL entity definitions
@ChangelogDate("20221108000520")
entity Points {
  date LocalDate required
  exercise Integer
  meals Integer
  alcohol Integer
  notes String maxlength(140)
}
@ChangelogDate("20221108001452")
entity Weight {
  timestamp ZonedDateTime required
  weight Double required
}
@ChangelogDate("20221108001642")
entity BloodPressure {
  timestamp ZonedDateTime required
  systolic Integer required
  diastolic Integer required
}
@ChangelogDate("20221108002021")
entity Preferences {
  weeklyGoal Integer required min(10) max(21)
  weightUnits Units required
}
enum Units {
  KG,
  LB
}


paginate Points with pagination
paginate Weight, BloodPressure with infinite-scroll

Copy link
Contributor

github-actions bot commented Apr 11, 2024

JHipster has completed the sample check
.yo-rc.json: valid
Entities JDL: valid
Application: successfully generated
Frontend check: success
Backend check: success
E2E check: success

This check uses jhipster info output from the issue description to generate the sample.
Bug report that does not contain this information will be marked as invalid.

@mshima
Copy link
Member

mshima commented Apr 14, 2024

Is this fixed in 8.3.0?
The stack trace is not there.

@mraible
Copy link
Contributor Author

mraible commented Apr 25, 2024

I'll check with 8.4.0 and add a comment with the results after I'm done. It might take a week or two.

@mraible
Copy link
Contributor Author

mraible commented May 9, 2024

This seems to be fixed in 8.4.0, so I'm closing it. CI is passing in mraible/21-points#258.

@mraible mraible closed this as completed May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants