Skip to main content
expanded abbreviation of UGC for clarity
Source Link
GenerationLost
  • 561
  • 1
  • 5
  • 19

Quick background information for context: I'm writing a relatively small tool for a small gaming community to download and manage UGCuser generated content. It's a modular Java 24 + JavaFX Project done with Maven and IntelliJ.

I store data on a SQLite DB. So far I've used bare-metal JDBC and wrote queries myself. As the tool grows, I would like to simplify DB access. At work we use Hibernate ORM in a Jakarta EE environment with Jakarta Contexts and Dependency Injection (CDI) etc., but I've read you can use Hibernate without relying on dependency injection.

So I've tried Hibernate for my tool and it does work well in my dev environment. Problems arise when trying to package a build via jlink, specifically using the javafx-maven-plugin to make things a lot easier for me.

The downside is that Hibernate does not seem to be modularized. Meaning I cannot easily package it with jlink. Running mvn javafx:jlink reports the "automatic module cannot be used with jlink".

I've then tried EclipseLink as an alternative Jakarta Persistence (JPA) implementation, had no issues with automatic modules but other resources apparently not being properly packaged with jlink. Specifically some locale resources appeared to be missing when trying to launch the packaged app, so they got left out the final package.

The last resort would be trying some SQL-first libraries like jOOQ to at least make it more bearable than plain JDBC. But I'd really prefer a Jakarta Persistence/ORM approach to keep database handling as easy and painless as possible.

Does anyone have a working approach I can use for my case? Or share your setup that actually works for you? Or find a way to get any Jakarta Persistence implementation to work well with the module system and Maven/JLink? The reason I'm using these is that packaging really is as simple as invoking a single Maven goal and for the most part that worked really well. Especially because of that I'm hesitant to get into any other packaging method, like the other jlink Maven plugin or something like jpackage, which seem to be very tedious to configure and get working.

Quick background information for context: I'm writing a relatively small tool for a small gaming community to download and manage UGC. It's a modular Java 24 + JavaFX Project done with Maven and IntelliJ.

I store data on a SQLite DB. So far I've used bare-metal JDBC and wrote queries myself. As the tool grows, I would like to simplify DB access. At work we use Hibernate ORM in a Jakarta EE environment with Jakarta Contexts and Dependency Injection (CDI) etc., but I've read you can use Hibernate without relying on dependency injection.

So I've tried Hibernate for my tool and it does work well in my dev environment. Problems arise when trying to package a build via jlink, specifically using the javafx-maven-plugin to make things a lot easier for me.

The downside is that Hibernate does not seem to be modularized. Meaning I cannot easily package it with jlink. Running mvn javafx:jlink reports the "automatic module cannot be used with jlink".

I've then tried EclipseLink as an alternative Jakarta Persistence (JPA) implementation, had no issues with automatic modules but other resources apparently not being properly packaged with jlink. Specifically some locale resources appeared to be missing when trying to launch the packaged app, so they got left out the final package.

The last resort would be trying some SQL-first libraries like jOOQ to at least make it more bearable than plain JDBC. But I'd really prefer a Jakarta Persistence/ORM approach to keep database handling as easy and painless as possible.

Does anyone have a working approach I can use for my case? Or share your setup that actually works for you? Or find a way to get any Jakarta Persistence implementation to work well with the module system and Maven/JLink? The reason I'm using these is that packaging really is as simple as invoking a single Maven goal and for the most part that worked really well. Especially because of that I'm hesitant to get into any other packaging method, like the other jlink Maven plugin or something like jpackage, which seem to be very tedious to configure and get working.

Quick background information for context: I'm writing a relatively small tool for a small gaming community to download and manage user generated content. It's a modular Java 24 + JavaFX Project done with Maven and IntelliJ.

I store data on a SQLite DB. So far I've used bare-metal JDBC and wrote queries myself. As the tool grows, I would like to simplify DB access. At work we use Hibernate ORM in a Jakarta EE environment with Jakarta Contexts and Dependency Injection (CDI) etc., but I've read you can use Hibernate without relying on dependency injection.

So I've tried Hibernate for my tool and it does work well in my dev environment. Problems arise when trying to package a build via jlink, specifically using the javafx-maven-plugin to make things a lot easier for me.

The downside is that Hibernate does not seem to be modularized. Meaning I cannot easily package it with jlink. Running mvn javafx:jlink reports the "automatic module cannot be used with jlink".

I've then tried EclipseLink as an alternative Jakarta Persistence (JPA) implementation, had no issues with automatic modules but other resources apparently not being properly packaged with jlink. Specifically some locale resources appeared to be missing when trying to launch the packaged app, so they got left out the final package.

The last resort would be trying some SQL-first libraries like jOOQ to at least make it more bearable than plain JDBC. But I'd really prefer a Jakarta Persistence/ORM approach to keep database handling as easy and painless as possible.

Does anyone have a working approach I can use for my case? Or share your setup that actually works for you? Or find a way to get any Jakarta Persistence implementation to work well with the module system and Maven/JLink? The reason I'm using these is that packaging really is as simple as invoking a single Maven goal and for the most part that worked really well. Especially because of that I'm hesitant to get into any other packaging method, like the other jlink Maven plugin or something like jpackage, which seem to be very tedious to configure and get working.

edited title
Source Link
Basil Bourque
  • 346.7k
  • 130
  • 950
  • 1.3k

Quick background information for context: I'm writing a relatively small tool for a small gaming community to download and manage UGC. It's a modular Java 24 + JavaFX Project done with Maven and IntelliJ.

I store data on a SQLite DB. So far I've used bare-metal JDBC and wrote queries myself. As the tool grows, I would like to simplify DB access. At work we use Hibernate ORM in a Jakarta EE environment with Jakarta Contexts and Dependency Injection (CDI) etc., but I've read you can use Hibernate without relying on dependency injection.

So I've tried Hibernate for my tool and it does work well in my dev environment. Problems arise when trying to package a build via jlink, specifically using the javafx-maven-plugin to make things a lot easier for me.

The downside is that Hibernate does not seem to be modularized. Meaning I cannot easily package it with jlink. Running mvn javafx:jlink reports the "automatic module cannot be used with jlink".

I've then tried EclipseLink as an alternative Jakarta Persistence (JPA) implementation, had no issues with automatic modules but other resources apparently not being properly packaged with jlink. Specifically some locale resources appeared to be missing when trying to launch the packaged app, so they got left out the final package.

The last resort would be trying some SQL-first libraries like jOOQ to at least make it more bearable than plain JDBC. But I'd really prefer a JPAJakarta Persistence/ORM approach to keep database handling as easy and painless as possible.

Does anyone have a working approach I can use for my case? Or share your setup that actually works for you? Or find a way to get any JPAJakarta Persistence implementation to work well with the module system and Maven/JLink? The reason I'm using these is that packaging really is as simple as invoking a single mavenMaven goal and for the most part that worked really well. Especially because of that I'm hesitant to get into any other packaging method, like the other jlink Maven plugin or something like jpackage, which seem to be very tedious to configure and get working.

Quick background information for context: I'm writing a relatively small tool for a small gaming community to download and manage UGC. It's a modular Java 24 + JavaFX Project done with Maven and IntelliJ.

I store data on a SQLite DB. So far I've used bare-metal JDBC and wrote queries myself. As the tool grows, I would like to simplify DB access. At work we use Hibernate ORM in a Jakarta EE environment with Jakarta Contexts and Dependency Injection (CDI) etc., but I've read you can use Hibernate without relying on dependency injection.

So I've tried Hibernate for my tool and it does work well in my dev environment. Problems arise when trying to package a build via jlink, specifically using the javafx-maven-plugin to make things a lot easier for me.

The downside is that Hibernate does not seem to be modularized. Meaning I cannot easily package it with jlink. Running mvn javafx:jlink reports the "automatic module cannot be used with jlink".

I've then tried EclipseLink as an alternative Jakarta Persistence (JPA) implementation, had no issues with automatic modules but other resources apparently not being properly packaged with jlink. Specifically some locale resources appeared to be missing when trying to launch the packaged app, so they got left out the final package.

The last resort would be trying some SQL-first libraries like jOOQ to at least make it more bearable than plain JDBC. But I'd really prefer a JPA/ORM approach to keep database handling as easy and painless as possible.

Does anyone have a working approach I can use for my case? Or share your setup that actually works for you? Or find a way to get any JPA implementation to work well with the module system and Maven/JLink? The reason I'm using these is that packaging really is as simple as invoking a single maven goal and for the most part that worked really well. Especially because of that I'm hesitant to get into any other packaging method, like the other jlink Maven plugin or something like jpackage, which seem to be very tedious to configure and get working.

Quick background information for context: I'm writing a relatively small tool for a small gaming community to download and manage UGC. It's a modular Java 24 + JavaFX Project done with Maven and IntelliJ.

I store data on a SQLite DB. So far I've used bare-metal JDBC and wrote queries myself. As the tool grows, I would like to simplify DB access. At work we use Hibernate ORM in a Jakarta EE environment with Jakarta Contexts and Dependency Injection (CDI) etc., but I've read you can use Hibernate without relying on dependency injection.

So I've tried Hibernate for my tool and it does work well in my dev environment. Problems arise when trying to package a build via jlink, specifically using the javafx-maven-plugin to make things a lot easier for me.

The downside is that Hibernate does not seem to be modularized. Meaning I cannot easily package it with jlink. Running mvn javafx:jlink reports the "automatic module cannot be used with jlink".

I've then tried EclipseLink as an alternative Jakarta Persistence (JPA) implementation, had no issues with automatic modules but other resources apparently not being properly packaged with jlink. Specifically some locale resources appeared to be missing when trying to launch the packaged app, so they got left out the final package.

The last resort would be trying some SQL-first libraries like jOOQ to at least make it more bearable than plain JDBC. But I'd really prefer a Jakarta Persistence/ORM approach to keep database handling as easy and painless as possible.

Does anyone have a working approach I can use for my case? Or share your setup that actually works for you? Or find a way to get any Jakarta Persistence implementation to work well with the module system and Maven/JLink? The reason I'm using these is that packaging really is as simple as invoking a single Maven goal and for the most part that worked really well. Especially because of that I'm hesitant to get into any other packaging method, like the other jlink Maven plugin or something like jpackage, which seem to be very tedious to configure and get working.

edited title
Link
Basil Bourque
  • 346.7k
  • 130
  • 950
  • 1.3k

JPA Integrating a Jakarta Persistence implementation that works well with modular JavaFX/Maven/JLink app

added 587 characters in body
Source Link
Basil Bourque
  • 346.7k
  • 130
  • 950
  • 1.3k
Loading
Post Reopened by GenerationLost, trashgod, Slaw
Emphasized a crutial point to the initial issue. Based on a comment, I have a solution I can write up myself to answer my own quetion, as so as it can be re-opened
Source Link
GenerationLost
  • 561
  • 1
  • 5
  • 19
Loading
Slight edit to conform to guidelines...
Added to review
Source Link
GenerationLost
  • 561
  • 1
  • 5
  • 19
Loading
Post Closed as "Not suitable for this site" by Jorge Campos, DuncG, user207421
Source Link
GenerationLost
  • 561
  • 1
  • 5
  • 19
Loading