Skip to content
This repository has been archived by the owner on Feb 23, 2023. It is now read-only.

Refine and optimize JPA/Hibernate support #144

Closed
sdeleuze opened this issue May 26, 2020 · 4 comments
Closed

Refine and optimize JPA/Hibernate support #144

sdeleuze opened this issue May 26, 2020 · 4 comments
Assignees
Labels
type: compatibility Native image compatibility issue
Milestone

Comments

@sdeleuze
Copy link
Contributor

sdeleuze commented May 26, 2020

  • Check if hibernate-graalvm is usable : my guess is that it is not because static config is not efficient enough in term of footprint but worth to check and we could maybe use its config to improve our compatibility
  • Configure hibernate.bytecode.provider=none automatically
  • Document usage of hibernate-enhance-maven-plugin
  • Document limitations
  • Fix martin-lizner repro
@sdeleuze sdeleuze added the type: compatibility Native image compatibility issue label May 26, 2020
@sdeleuze sdeleuze added this to the v0.7.1 milestone May 26, 2020
@sdeleuze sdeleuze modified the milestones: v0.7.1, v0.8.0 Jun 3, 2020
@sdeleuze sdeleuze modified the milestones: v0.8.0, v0.9.0 Jul 21, 2020
@sdeleuze sdeleuze modified the milestones: v0.9.0, v0.8.2 Aug 30, 2020
@sdeleuze sdeleuze changed the title Leverage hibernate-graalvm Refine and optimize Hibernate support Aug 31, 2020
@martin-lizner
Copy link

Upvoting this. Im unable to compile https://github.com/Evolveum/midpoint project due to hibernate error. Using 0.8.0 spring-graalvm and java11-20.2.0/bin/native-image on Linux. Thanks.

could not find target method: private void org.hibernate.jpa.boot.internal.Target_EntityManagerFactoryBuilderImpl.processHibernateConfigXmlResources(org.hibernate.boot.registry.StandardServiceRegistryBuilder,org.hibernate.jpa.boot.internal.Target_EntityManagerFactoryBuilderImpl$Target_MergedSettings,java.lang.String)
at com.oracle.svm.core.util.UserError.abort(UserError.java:68)
at com.oracle.svm.hosted.substitute.AnnotationSubstitutionProcessor.findOriginalMethod(AnnotationSubstitutionProcessor.java:637)
at com.oracle.svm.hosted.substitute.AnnotationSubstitutionProcessor.handleMethodInAliasClass(AnnotationSubstitutionProcessor.java:330)

@sdeleuze sdeleuze changed the title Refine and optimize Hibernate support Refine and optimize JPA support Dec 1, 2020
@sdeleuze sdeleuze changed the title Refine and optimize JPA support Refine and optimize JPA/Hibernate support Dec 1, 2020
@sdeleuze
Copy link
Contributor Author

sdeleuze commented Feb 9, 2021

@martin-lizner Could you please provide a minimal repro for the issue you mentioned?

@sdeleuze sdeleuze assigned sdeleuze and unassigned christophstrobl Feb 9, 2021
@sdeleuze
Copy link
Contributor Author

As discussed with @schauder I will focus on reviewing the substitutions and him on the hints.

sdeleuze added a commit that referenced this issue Feb 16, 2021
On Java 11 the footprint gains are negligible

See gh-144
@sdeleuze
Copy link
Contributor Author

@martin-lizner My recent commit should fix your issue.

schauder added a commit that referenced this issue Feb 16, 2021
Reduced registrations for reflection for:
- Loggers
- Tuplizer
- Persister
- Nodes
- Eventlisteners
- Dialects
- IdGenerators

Also grouped the native hints by type of class registered since similar classes often need similar treatment.
schauder added a commit that referenced this issue Feb 16, 2021
Code formatting.
sdeleuze pushed a commit that referenced this issue Feb 16, 2021
Reduced registrations for reflection for:
- Loggers
- Tuplizer
- Persister
- Nodes
- Eventlisteners
- Dialects
- IdGenerators

Also grouped the native hints by type of class registered since similar classes often need similar treatment.
sdeleuze pushed a commit that referenced this issue Feb 16, 2021
Code formatting.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: compatibility Native image compatibility issue
Development

No branches or pull requests

4 participants