You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
java.nio.file.ProviderNotFoundException: null
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
at java.base/java.util.concurrent.ForkJoinTask.getThrowableException(ForkJoinTask.java:603)
at java.base/java.util.concurrent.ForkJoinTask.reportException(ForkJoinTask.java:678)
at java.base/java.util.concurrent.ForkJoinTask.join(ForkJoinTask.java:722)
at io.micronaut.core.io.service.SoftServiceLoader$DefaultServiceCollector.collect(SoftServiceLoader.java:536)
at io.micronaut.core.io.service.SoftServiceLoader.collectDynamicServices(SoftServiceLoader.java:199)
at io.micronaut.core.io.service.SoftServiceLoader.collectAll(SoftServiceLoader.java:175)
at io.micronaut.context.DefaultBeanContext.resolveBeanDefinitionReferences(DefaultBeanContext.java:1732)
at io.micronaut.context.DefaultApplicationContext.isBootstrapPropertySourceLocatorPresent(DefaultApplicationContext.java:153)
at io.micronaut.context.DefaultApplicationContext.isBootstrapEnabled(DefaultApplicationContext.java:149)
at io.micronaut.context.DefaultApplicationContext.createEnvironment(DefaultApplicationContext.java:137)
at io.micronaut.context.DefaultApplicationContext.getEnvironment(DefaultApplicationContext.java:181)
at grails.boot.GrailsApp.createApplicationContext(GrailsApp.groovy:181)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:305)
at grails.boot.GrailsApp.run(GrailsApp.groovy:99)
at grails.boot.GrailsApp.run(GrailsApp.groovy:485)
at grails.boot.GrailsApp.run(GrailsApp.groovy:472)
at gr52.mn.bug.Application.main(Application.groovy:11)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:108)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:58)
at org.springframework.boot.loader.WarLauncher.main(WarLauncher.java:59)
Caused by: java.nio.file.ProviderNotFoundException: Provider not found
at java.base/java.nio.file.FileSystems.newFileSystem(FileSystems.java:423)
at io.micronaut.core.io.IOUtils.loadNestedJarUri(IOUtils.java:153)
at io.micronaut.core.io.IOUtils.eachFile(IOUtils.java:99)
at io.micronaut.core.io.service.SoftServiceLoader.computeServiceTypeNames(SoftServiceLoader.java:277)
at io.micronaut.core.io.service.SoftServiceLoader.access$1100(SoftServiceLoader.java:68)
at io.micronaut.core.io.service.SoftServiceLoader$MicronautMetaServicesLoader.compute(SoftServiceLoader.java:565)
at java.base/java.util.concurrent.RecursiveAction.exec(RecursiveAction.java:189)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
Spring boot's LaunchedURLClassLoader creates weird urls that have directories that look like jars. This patch makes IOUtils handle such URLs.
Fixesgrails/grails-core#12625
I worked with @yawkat today and it seems the problem is with Spring Boot LaunchedUrlClassLoader where it tried to load resource as following: jar:file:/private/tmp/testmn/build/libs/testmn-0.1.jar!/BOOT-INF/classes!/META-INF/micronaut/io.micronaut.inject.BeanDefinitionReference
Please note the extra ! after classes which seems weird but I am not sure whether it is intentional or NOT, we are handling this special case in the Micronaut IOUtils class.
yawkat
added a commit
to micronaut-projects/micronaut-core
that referenced
this issue
Jul 20, 2022
Spring boot's LaunchedURLClassLoader creates weird urls that have directories that look like jars. This patch makes IOUtils handle such URLs.
Fixesgrails/grails-core#12625
Expected Behavior
The application should start
Actual Behaviour
The application fails with:
Steps To Reproduce
./gradlew bootWar
java -jar build/libs/gr52-mn-bug-0.1.war
./gradlew clean bootWar
java -jar build/libs/gr52-mn-bug-0.1.war
Environment Information
Example Application
https://github.com/JasonTypesCodes/gr52-mn-bug
Version
5.2.1
The text was updated successfully, but these errors were encountered: