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

Unable to load lazysodium with spring boot 3 and nested jars #133

Open
ahazeltonNF opened this issue Mar 15, 2024 · 1 comment
Open

Unable to load lazysodium with spring boot 3 and nested jars #133

ahazeltonNF opened this issue Mar 15, 2024 · 1 comment

Comments

@ahazeltonNF
Copy link

ahazeltonNF commented Mar 15, 2024

Getting this exception during initialization:

2024-03-15T20:25:01.146920010Z Caused by: java.lang.IllegalArgumentException: URI is not hierarchical
2024-03-15T20:25:01.146931299Z     at java.base/java.io.File.<init>(File.java:420)
2024-03-15T20:25:01.146933670Z     at com.goterl.resourceloader.ResourceLoader.urlToFile(ResourceLoader.java:588)
2024-03-15T20:25:01.146937295Z     at com.goterl.resourceloader.ResourceLoader.urlToFile(ResourceLoader.java:567)
2024-03-15T20:25:01.146948902Z     at com.goterl.resourceloader.ResourceLoader.extractFilesOrFoldersFromJar(ResourceLoader.java:227)
2024-03-15T20:25:01.146958719Z     at com.goterl.resourceloader.ResourceLoader.nestedExtract(ResourceLoader.java:174)
2024-03-15T20:25:01.147022290Z     at com.goterl.resourceloader.ResourceLoader.extractFromWithinAJarFile(ResourceLoader.java:98)
2024-03-15T20:25:01.147025093Z     at com.goterl.resourceloader.ResourceLoader.copyToTempDirectory(ResourceLoader.java:80)
2024-03-15T20:25:01.147026963Z     at com.goterl.resourceloader.SharedLibraryLoader.load(SharedLibraryLoader.java:53)
2024-03-15T20:25:01.147030026Z     at com.goterl.lazysodium.utils.LibraryLoader.loadBundledLibrary(LibraryLoader.java:134)
2024-03-15T20:25:01.147032942Z     at com.goterl.lazysodium.utils.LibraryLoader.loadLibrary(LibraryLoader.java:107)
2024-03-15T20:25:01.147037118Z     at com.goterl.lazysodium.SodiumJava.<init>(SodiumJava.java:34)

Worked correctly in SpringBoot 3.1.5 / Java 17
Debugged and the path is set to file:nested:/app/myapp-0.0.1-SNAPSHOT.jar. The “nested:” comes from the new https://docs.spring.io/spring-boot/docs/current/reference/html/executable-jar.html format and is not compatible with your implementation. Any recommendations?

@ahazeltonNF ahazeltonNF changed the title Unable to load lazysodium with spring boot 3.2.2 Unable to load lazysodium with Java 21 Mar 16, 2024
@ahazeltonNF ahazeltonNF changed the title Unable to load lazysodium with Java 21 Unable to load lazysodium with spring boot 3 and nested jars Mar 16, 2024
@sean-codevasp
Copy link

sean-codevasp commented Mar 20, 2024

+1 here. Any suggestion? or solution for this?

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

No branches or pull requests

2 participants