Skip to content

META-INF entries are duplicated under BOOT-INF/classes causing "Conflicting persistence unit definitions" error #38862

Closed
@rmatec

Description

@rmatec

Hi,

We recently upgraded to Spring Boot 3.2.0 and we are seeing the following error when the service starts up.

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [com/config/EclipseLinkJpaConfiguration.class]: Conflicting persistence unit definitions for name 'persistence-config': nested:/opt/application/service.jar/!BOOT-INF/classes/, file:/opt/application/service.jar

We have the persistence configuration in src/main/resources/META-INF/persistence.xml

Am I right to think this is because of the new Nested Jar Support? It appears the jar file is twice in the error message above, one with nested:... and one without.

If we fallback to the classic loader the service starts up ok.

Metadata

Metadata

Assignees

Labels

type: regressionA regression from a previous release

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions