-
Notifications
You must be signed in to change notification settings - Fork 41.2k
JarLauncher fails to load large jar files #42012
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
@KaurKadakWise the size of the jar could be the problem, but it could also be due to the content of one of the nested jar files. Unfortunately, to get to the bottom of this one, I think it's likely that we'll need to be able to reproduce the problem. Could you perhaps try to create a jar that fails in the same way? It need not be the actual jar for your application, but a "synthetic" approximation of that jar that has the required structure/size to reproduce the problem. Alternatively, if you're happy to do so, perhaps you could share the actual jar file with us privately? |
Can't share the actual jar, company policy. I tried to recreate a similar jar on my local computer by adding some large resources, but my local computer can't build it, or I didn't figure out how to get the jar size up, was using gradle. If you have some advice with how could I create a large artifical jar, I'm open to suggestions! The original jar is a layered jar and most of the size comes from a 3rd party dependency that we are running on-prem. |
@KaurKadakWise You might be able to use Does your 2.6GB jar contain lots of small files, or does it contain one or more large files? |
It's one large file, and the usual Spring stuff. I cloned Spring Boot project and placed my failing JAR into it and it looks like the Zip file handling is what is failing. My guess is that the large (~2.5GB) file has the same byte signature at some point as |
https://en.wikipedia.org/wiki/ZIP_(file_format) is pretty useful. You can also try |
@KaurKadakWise I've managed to reproduce the issue. See https://github.com/philwebb/spring-boot-gh-42012 |
I have an issue when updating to SB 3.2 and trying to use the new Jar launcher.
I changed my JarLauncher reference address from
org.springframework.boot.loader.JarLauncher
toorg.springframework.boot.loader.launch.JarLauncher
after SB 3.2 upgrade, as per instructions, and started getting this error when trying build an image from my dockerfile.
I am suspicious that the reasoning here is my large jar size (~2.6GB), because other services that I've upgraded have not faced this issue.
The error happens on the
RUN java ...
commandWhen switching back to the CLASSIC launcher, like this:
It started working again, so the jar itself is not corrupt from what I've observed.
The text was updated successfully, but these errors were encountered: