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

Module java.persistence not found, required by com.blazebit.persistence.core.parser #1939

Closed
dgyg opened this issue Oct 5, 2024 · 3 comments
Assignees
Labels
component: core kind: bug worth: high Implementing this has a high worth
Milestone

Comments

@dgyg
Copy link

dgyg commented Oct 5, 2024

Description

The module-info.java in blaze-persistence-core-api-jakarta-1.6.12.jar declares a dependency on java.persistence

When using jakarta.persistence no dependency on java.persistence should exist anymore.

The error message is:

Module java.persistence not found, required by com.blazebit.persistence.core.parser

Expected behavior

No dependency on java.persistence

Actual behavior

There is a dependency declared:

//  (version 9 : 53.0, no super bit)
 module com.blazebit.persistence.core  {
  // Version: 1.6.12

  requires transitive java.sql;
  requires transitive java.persistence;
  requires java.base;

  exports com.blazebit.persistence;
  exports com.blazebit.persistence.spi;
  exports com.blazebit.persistence.internal;

  uses com.blazebit.persistence.spi.CriteriaBuilderConfigurationProvider

}

Steps to reproduce

pom.xml with

<dependency>
    <groupId>com.blazebit</groupId>
    <artifactId>blaze-persistence-core-api-jakarta</artifactId>
    <version>1.6.12</version>
    <scope>compile</scope>
</dependency>
<dependency>
    <groupId>com.blazebit</groupId>
    <artifactId>blaze-persistence-core-impl-jakarta</artifactId>
    <version>1.6.12</version>
    <scope>runtime</scope>
</dependency>
<dependency>
    <groupId>com.blazebit</groupId>
    <artifactId>blaze-persistence-integration-hibernate-6.2</artifactId>
    <version>1.6.12</version>
    <scope>runtime</scope>
</dependency>

Environment

Version: 1.6.12
JPA-Provider: Hibernate 6.5.3.Final

@beikov beikov added kind: bug component: core worth: high Implementing this has a high worth labels Oct 7, 2024
@beikov
Copy link
Member

beikov commented Oct 7, 2024

Indeed, this is a problem of the jakarta modules since the module-info.java files are not rewritten by the Eclipse Transformer plugin.

@jwgmeligmeyling
Copy link
Collaborator

Is JPMS even useful in Hibernate projects? In my last attempts Hibernate still had so many dependencies in the auto module that I couldn't get jlink to work, and while the idea of reduced binary size in containerised environments seemed promising to me, there really seems no other reason to me to use JPMS?

(Addressing the label worth: high here)

@beikov
Copy link
Member

beikov commented Dec 13, 2024

Fyi, I switched to Java 11 for 2.0 and also reworked all the module-info files, so these issues should be gone in 2.0.

@beikov beikov closed this as completed Dec 13, 2024
@beikov beikov added this to the 2.0.0 milestone Dec 13, 2024
@beikov beikov self-assigned this Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: core kind: bug worth: high Implementing this has a high worth
Projects
None yet
Development

No branches or pull requests

3 participants