-
Notifications
You must be signed in to change notification settings - Fork 41.2k
"unable be resolved to persistence unit root url" in Spring Boot 2.0.4 #14279
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
Only when I start the jar file in bash, it works. |
Can you please provide a minimal sample that reproduces the problem? |
Yes, I can.
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
</dependency>
|
Important! When started by |
Thanks for the sample. The built JavaFX app doesn't use Boot's launcher (the jar isn't fat) which is why it behaves differently. When there are only jars on the classpath, the JVM's app class loader is unable to resolve the root of the classpath. On the other hand, our launcher and its custom jar handling will return When resolving multiple resources, Spring Framework contains some logic to cope with the app class loader being unable to resolve the root of the classpath when there are only jars (no directories) on the class path. However, this logic is not used when resolving a single resource and I wonder if it should be. What do you think, @jhoeller? |
For the default persistence unit case, we have no The key question is: Which root URL should we expose to the persistence provider instead? The first of the packages to scan? The first mapping file in the list (if any)? Note that we're already deriving the root URL from a |
Thank you, @jhoeller. Perhaps the URL of the first resource that would be returned when resolving multiple resources could be used? @jliu666 It looks like Framework, if anywhere, is going to be the right place to make a change for this. So that it's not forgotten, can you please open a JIRA providing as much information as possible and referencing this issue. |
Uh oh!
There was an error while loading. Please reload this page.
My project pom is:
I just use
@SpringBootApplication
annotation on my start class.maven jfx:native
to package app on my mac os.java -jar Develop-Tools.jar
to start the app in bash, It works.The text was updated successfully, but these errors were encountered: