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

Cannot find DefaultPersistenceUnitManager #1500

Closed
filiphr opened this issue Feb 16, 2022 · 1 comment
Closed

Cannot find DefaultPersistenceUnitManager #1500

filiphr opened this issue Feb 16, 2022 · 1 comment
Assignees
Labels
type: bug A general bug
Milestone

Comments

@filiphr
Copy link

filiphr commented Feb 16, 2022

While trying out Spring Native with @joshlong for Flowable we hit a problem when we had a dependency on spring-orm. We were bringing that dependency, but we don't need it during runtime, so we could proceed with our try out by excluding it.

In any case, I wanted to create this issue to shine light on the problem.
Perhaps this is not a Spring Native problem, but rather a GraalVM one.

I have created https://github.com/filiphr/spring-native-spring-orm-problem that can be run to see the problem.
The error outputted during the creation of the native image is:

========================================================================================================================
GraalVM Native Image: Generating 'demo'...
========================================================================================================================
[1/7] Initializing...
                                                                                    (3.8s @ 0.07GB)
Error: Cannot find org.springframework.orm.jpa.persistenceunit.DefaultPersistenceUnitManager.determineDefaultPersistenceUnitRootUrl, org.springframework.orm.jpa.persistenceunit.DefaultPersistenceUnitManager can not be loaded, due to javax/persistence/spi/PersistenceUnitInfo not being available in the classpath. Are you missing a dependency in your classpath?
Error: Use -H:+ReportExceptionStackTraces to print stacktrace of underlying exception
------------------------------------------------------------------------------------------------------------------------
                         0.2s (4.5% of total time) in 8 GCs | Peak RSS: 0.58GB | CPU load: 6.13
------------------------------------------------------------------------------------------------------------------------
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Feb 16, 2022
@sdeleuze sdeleuze added type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Feb 17, 2022
@sdeleuze sdeleuze added this to the 0.11.3 milestone Feb 17, 2022
@sdeleuze sdeleuze self-assigned this Feb 17, 2022
@sdeleuze
Copy link
Contributor

sdeleuze commented Feb 17, 2022

Fixed, thanks for reporting it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug A general bug
Development

No branches or pull requests

3 participants