-
Notifications
You must be signed in to change notification settings - Fork 41.1k
java.lang.IllegalArgumentException: name org.springframework.boot.loader.LaunchedURLClassLoader.findResource #19098
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
We can try to figure it out, but we'll need some more information to be able to do so. Can you please create a minimal sample that reproduces the problem and share it with us by zipping it up and attaching it to this issue? Given that this works for you on macOS but fails on CentOS, there's a chance that the problem is operating system- or environment-specific so any information about your macOS environment and your CentOS environment and the differences between them would also be useful. |
Thanks a lot for your reply, there's another information, Thread.currentThread().getContextClassLoader() is Launcher$AppClassLoader when I run in IDEA, but LaunchedURLClassLoader in test environment(centOS). |
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed. |
Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue. |
Hi, I'm in a large application and am trying to isolate it in a repeatable test. Linux works fine... windows fails - only when using the fat jar. Boot 2.2.4. Java 1.8 cheers, |
pretty easy to duplicate - https://github.com/woodforda/issue-classloader See readme for details. |
Thanks for the reproducer, @woodforda. We'll take a look. |
I suspect this is not an issue. It's due to the MalformedURl (which is from rubbish CXF code). If I force usage of the URLClassLoader it too has the same issue. It's just that it's not normally the class loader you get when running another way... (i.e. not fat jar). I have to work around the CXF defaults - currently just setting |
Thanks, @woodforda. The differences in behaviour between the system class loader and a URL class loader are unfortunate. In the past, we've considered trying to work around them but decided not to do so (see #1744 and #2057 for example). I still think that was the right decision so I'm going to close this one again. Thanks for sharing your findings. Hopefully they'll help others in the future. |
please see below exception:
When we run java -jar xxx-server-1.0.0-SNAPSHOT.jar in local macbook, it's ok,
we run it in our test env, we get those exception. (centos 6.8)
below code triggered above exception:
file is String, and we try to use "classpath:config/app.properties", "classpath*:app.properties", "config/app.properties", we all get above exception.
jdk:1.8
springboot:2.2.1
spring: 5.2.1
Can you please figure it out? Thanks a lot.
The text was updated successfully, but these errors were encountered: