-
Notifications
You must be signed in to change notification settings - Fork 41.2k
Package JPA with orm.xml fails with odd error: "cannot be resolved to URL because it does not exist" in Spring-Boot 1.4.0.M2 #5842
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
Comments
@wilkinsona Looks like 87fe0b2 removed that hack. We could put it back I guess but I wonder if there's a better way? |
I think there's a bit more to this one.
|
The same problem occurs with a shaded jar so I don't think that |
Tomcat produces a URL for the root of the classpath even when the host is configured with |
The problem only happens when Boot's
The above outputs:
For consistency with a standard |
Given that this affects shaded jars (where the class loader is out of Boot's control) I've opened https://jira.spring.io/browse/SPR-14246 to see if a more general purpose fix is possible. |
SPR-14246 won't be fixed in time for M3. Moving back to RC1. |
SPR-14246 has been fixed and the sample app works when configured to use Spring Framework 4.3.0.BUILD-SNAPSHOT. Boot's already building against those snapshots so there's nothing more to do to address this issue. |
I have the same issue with the current 1.4.0.BUILD-SNAPSHOT. it has to do with having the starter application class not in the root package. with 1.3.5 it works but with the latest build it does not |
@masrawi This issue's closed. Can you please open a new one? |
@masrawi your project is broken in both 1.3 and 1.4 for me. And I don't think it has anything to do with this issue. |
@snicoll I know it is redundant. it is just there to demonstrate that both are not working. I never needed to use @EntityScan and it worked in all the projects with 1.3. for me 1.4 is broken as the same setting working with 1.3 is not working anymore |
Since we updated from spring-boot 1.3.3 to 1.4.M2 we receive a odd exception if we start our application by packing it into a execuatable jar (or war). This problem only occurs if you don't scan for any entities in your classpath but rather define the mapping in a orm.xml. The Bug seems to be similar to an already fixed one: #420
Everything works if we start the Application with the Application.java main method or if we deploy the (execuatable) war file to tomcat. The problem does not occur if there has been at least one Entity defined/scanned by using the javax.persistence annotations
Tested Versions
Spring Boot Version 1.4.0.M2
Spring Boot Version 1.3.3 (works)
Exception:
Example Project:
https://github.com/pavax/sample-spring-boot-app
Howto
alternatively: change the packaging of the sample-spring-boot-web to war and active the profile executable-war.
The text was updated successfully, but these errors were encountered: