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

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

Closed
spring-projects-issues opened this issue Sep 26, 2016 · 1 comment
Assignees
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

@spring-projects-issues spring-projects-issues commented Sep 26, 2016

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

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Sep 26, 2016

Juergen Hoeller commented

Good point: We're explicitly extracting the jar file URL there now (if we happen to receive a jar entry).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants