Skip to content

DefaultPersistenceUnitManager may configure a persistence unit root URL that does not point to a file or directory [SPR-14749] #19315

@spring-projects-issues

Description

@spring-projects-issues

Andy Wilkinson opened SPR-14749 and commented

When using a custom class loader, a call to getResource("") may return a URL that points inside a JAR. This may become the case in Spring Boot, for example. This adversely affects DefaultPersistenceUnitManager.determineDefaultPersistenceUnitRootUrl() which returns a URL that Hibernate then logs a warning about.

It looks like the same ResourceUtils.isJarURL(url) and ResourceUtils.extractJarFileURL(url) arrangement that is in buildDefaultPersistenceUnitInfo may also be appropriate in determineDefaultPersistenceUnitRootUrl().


Affects: 4.3.3

Referenced from: commits bb7d207, acdf139

Metadata

Metadata

Assignees

Labels

in: dataIssues in data modules (jdbc, orm, oxm, tx)type: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions