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
[Bug] 3.2.13 Unable to instantiate factory class [org.springframework.cloud.bootstrap.RefreshBootstrapRegistryInitializer] for factory type [org.springframework.boot.BootstrapRegistryInitializer]
#14260
Closed
4 tasks done
mapleafy opened this issue
May 30, 2024
· 2 comments
I am sure that all the content I provide is in English.
Search before asking
I had searched in the issues and found no similar issues.
Apache Dubbo Component
Java SDK (apache/dubbo)
Dubbo Version
Dubbo 3.2.13 Ubuntu22.04 JDK21 Spring Boot 3.3.0 Spring Cloude Alibaba 2023.0.1.0
Steps to reproduce this issue
Exception in thread "main" java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:118)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at org.springframework.boot.loader.launch.Launcher.launch(Launcher.java:91)
at org.springframework.boot.loader.launch.Launcher.launch(Launcher.java:53)
at org.springframework.boot.loader.launch.PropertiesLauncher.main(PropertiesLauncher.java:574)
Caused by: java.lang.IllegalArgumentException: Unable to instantiate factory class [org.springframework.cloud.bootstrap.RefreshBootstrapRegistryInitializer] for factory type [org.springframework.boot.BootstrapRegistryInitializer]
at org.springframework.core.io.support.SpringFactoriesLoader$FailureHandler.lambda$throwing$0(SpringFactoriesLoader.java:647)
at org.springframework.core.io.support.SpringFactoriesLoader$FailureHandler.lambda$handleMessage$3(SpringFactoriesLoader.java:671)
at org.springframework.core.io.support.SpringFactoriesLoader.instantiateFactory(SpringFactoriesLoader.java:231)
at org.springframework.core.io.support.SpringFactoriesLoader.load(SpringFactoriesLoader.java:206)
at org.springframework.core.io.support.SpringFactoriesLoader.load(SpringFactoriesLoader.java:160)
at org.springframework.boot.SpringApplication.getSpringFactoriesInstances(SpringApplication.java:483)
at org.springframework.boot.SpringApplication.getSpringFactoriesInstances(SpringApplication.java:479)
at org.springframework.boot.SpringApplication.(SpringApplication.java:294)
at org.springframework.boot.SpringApplication.(SpringApplication.java:274)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1363)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1352)
at cn.shengkaiweilai.academic.AcademicApplication.main(AcademicApplication.java:16)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
... 4 more
Caused by: java.lang.ExceptionInInitializerError
at org.springframework.core.io.support.SpringFactoriesLoader$FactoryInstantiator.isKotlinType(SpringFactoriesLoader.java:420)
at org.springframework.core.io.support.SpringFactoriesLoader$FactoryInstantiator.findPrimaryKotlinConstructor(SpringFactoriesLoader.java:415)
at org.springframework.core.io.support.SpringFactoriesLoader$FactoryInstantiator.findConstructor(SpringFactoriesLoader.java:403)
at org.springframework.core.io.support.SpringFactoriesLoader$FactoryInstantiator.forClass(SpringFactoriesLoader.java:394)
at org.springframework.core.io.support.SpringFactoriesLoader.instantiateFactory(SpringFactoriesLoader.java:227)
... 14 more
Caused by: java.lang.StringIndexOutOfBoundsException: Range [18, -1) out of bounds for length 43
at java.base/jdk.internal.util.Preconditions$1.apply(Preconditions.java:55)
at java.base/jdk.internal.util.Preconditions$1.apply(Preconditions.java:52)
at java.base/jdk.internal.util.Preconditions$4.apply(Preconditions.java:213)
at java.base/jdk.internal.util.Preconditions$4.apply(Preconditions.java:210)
at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:98)
at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckFromToIndex(Preconditions.java:112)
at java.base/jdk.internal.util.Preconditions.checkFromToIndex(Preconditions.java:349)
at java.base/java.lang.String.checkBoundsBeginEnd(String.java:4865)
at java.base/java.lang.String.substring(String.java:2834)
at org.springframework.boot.loader.jar.MetaInfVersionsInfo.get(MetaInfVersionsInfo.java:85)
at org.springframework.boot.loader.jar.MetaInfVersionsInfo.get(MetaInfVersionsInfo.java:69)
at org.springframework.boot.loader.zip.ZipContent.lambda$getInfo$0(ZipContent.java:326)
at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1708)
at org.springframework.boot.loader.zip.ZipContent.getInfo(ZipContent.java:324)
at org.springframework.boot.loader.jar.NestedJarFile.getMetaInfVersionsInfo(NestedJarFile.java:337)
at org.springframework.boot.loader.jar.NestedJarFile.getVersionedContentEntry(NestedJarFile.java:279)
at org.springframework.boot.loader.jar.NestedJarFile.hasEntry(NestedJarFile.java:247)
at org.springframework.boot.loader.net.protocol.jar.JarUrlClassLoader.hasEntry(JarUrlClassLoader.java:170)
at org.springframework.boot.loader.net.protocol.jar.JarUrlClassLoader.definePackage(JarUrlClassLoader.java:144)
at org.springframework.boot.loader.net.protocol.jar.JarUrlClassLoader.definePackageIfNecessary(JarUrlClassLoader.java:125)
at org.springframework.boot.loader.net.protocol.jar.JarUrlClassLoader.loadClass(JarUrlClassLoader.java:98)
at org.springframework.boot.loader.launch.LaunchedClassLoader.loadClass(LaunchedClassLoader.java:91)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:534)
at java.base/java.lang.Class.forName(Class.java:513)
at org.springframework.util.ClassUtils.forName(ClassUtils.java:304)
at org.springframework.core.KotlinDetector.(KotlinDetector.java:51)
... 19 more
What you expected to happen
Exception in thread "main" java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:118)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at org.springframework.boot.loader.launch.Launcher.launch(Launcher.java:91)
at org.springframework.boot.loader.launch.Launcher.launch(Launcher.java:53)
at org.springframework.boot.loader.launch.PropertiesLauncher.main(PropertiesLauncher.java:574)
Caused by: java.lang.IllegalArgumentException: Unable to instantiate factory class [org.springframework.cloud.bootstrap.RefreshBootstrapRegistryInitializer] for factory type [org.springframework.boot.BootstrapRegistryInitializer]
at org.springframework.core.io.support.SpringFactoriesLoader$FailureHandler.lambda$throwing$0(SpringFactoriesLoader.java:647)
at org.springframework.core.io.support.SpringFactoriesLoader$FailureHandler.lambda$handleMessage$3(SpringFactoriesLoader.java:671)
at org.springframework.core.io.support.SpringFactoriesLoader.instantiateFactory(SpringFactoriesLoader.java:231)
at org.springframework.core.io.support.SpringFactoriesLoader.load(SpringFactoriesLoader.java:206)
at org.springframework.core.io.support.SpringFactoriesLoader.load(SpringFactoriesLoader.java:160)
at org.springframework.boot.SpringApplication.getSpringFactoriesInstances(SpringApplication.java:483)
at org.springframework.boot.SpringApplication.getSpringFactoriesInstances(SpringApplication.java:479)
at org.springframework.boot.SpringApplication.(SpringApplication.java:294)
at org.springframework.boot.SpringApplication.(SpringApplication.java:274)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1363)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1352)
at cn.shengkaiweilai.academic.AcademicApplication.main(AcademicApplication.java:16)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
... 4 more
Caused by: java.lang.ExceptionInInitializerError
at org.springframework.core.io.support.SpringFactoriesLoader$FactoryInstantiator.isKotlinType(SpringFactoriesLoader.java:420)
at org.springframework.core.io.support.SpringFactoriesLoader$FactoryInstantiator.findPrimaryKotlinConstructor(SpringFactoriesLoader.java:415)
at org.springframework.core.io.support.SpringFactoriesLoader$FactoryInstantiator.findConstructor(SpringFactoriesLoader.java:403)
at org.springframework.core.io.support.SpringFactoriesLoader$FactoryInstantiator.forClass(SpringFactoriesLoader.java:394)
at org.springframework.core.io.support.SpringFactoriesLoader.instantiateFactory(SpringFactoriesLoader.java:227)
... 14 more
Caused by: java.lang.StringIndexOutOfBoundsException: Range [18, -1) out of bounds for length 43
at java.base/jdk.internal.util.Preconditions$1.apply(Preconditions.java:55)
at java.base/jdk.internal.util.Preconditions$1.apply(Preconditions.java:52)
at java.base/jdk.internal.util.Preconditions$4.apply(Preconditions.java:213)
at java.base/jdk.internal.util.Preconditions$4.apply(Preconditions.java:210)
at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:98)
at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckFromToIndex(Preconditions.java:112)
at java.base/jdk.internal.util.Preconditions.checkFromToIndex(Preconditions.java:349)
at java.base/java.lang.String.checkBoundsBeginEnd(String.java:4865)
at java.base/java.lang.String.substring(String.java:2834)
at org.springframework.boot.loader.jar.MetaInfVersionsInfo.get(MetaInfVersionsInfo.java:85)
at org.springframework.boot.loader.jar.MetaInfVersionsInfo.get(MetaInfVersionsInfo.java:69)
at org.springframework.boot.loader.zip.ZipContent.lambda$getInfo$0(ZipContent.java:326)
at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1708)
at org.springframework.boot.loader.zip.ZipContent.getInfo(ZipContent.java:324)
at org.springframework.boot.loader.jar.NestedJarFile.getMetaInfVersionsInfo(NestedJarFile.java:337)
at org.springframework.boot.loader.jar.NestedJarFile.getVersionedContentEntry(NestedJarFile.java:279)
at org.springframework.boot.loader.jar.NestedJarFile.hasEntry(NestedJarFile.java:247)
at org.springframework.boot.loader.net.protocol.jar.JarUrlClassLoader.hasEntry(JarUrlClassLoader.java:170)
at org.springframework.boot.loader.net.protocol.jar.JarUrlClassLoader.definePackage(JarUrlClassLoader.java:144)
at org.springframework.boot.loader.net.protocol.jar.JarUrlClassLoader.definePackageIfNecessary(JarUrlClassLoader.java:125)
at org.springframework.boot.loader.net.protocol.jar.JarUrlClassLoader.loadClass(JarUrlClassLoader.java:98)
at org.springframework.boot.loader.launch.LaunchedClassLoader.loadClass(LaunchedClassLoader.java:91)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:534)
at java.base/java.lang.Class.forName(Class.java:513)
at org.springframework.util.ClassUtils.forName(ClassUtils.java:304)
at org.springframework.core.KotlinDetector.(KotlinDetector.java:51)
... 19 more
Anything else
No response
Are you willing to submit a pull request to fix on your own?
Yes I am willing to submit a pull request on my own!
Pre-check
Search before asking
Apache Dubbo Component
Java SDK (apache/dubbo)
Dubbo Version
Dubbo 3.2.13 Ubuntu22.04 JDK21 Spring Boot 3.3.0 Spring Cloude Alibaba 2023.0.1.0
Steps to reproduce this issue
Exception in thread "main" java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:118)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at org.springframework.boot.loader.launch.Launcher.launch(Launcher.java:91)
at org.springframework.boot.loader.launch.Launcher.launch(Launcher.java:53)
at org.springframework.boot.loader.launch.PropertiesLauncher.main(PropertiesLauncher.java:574)
Caused by: java.lang.IllegalArgumentException: Unable to instantiate factory class [org.springframework.cloud.bootstrap.RefreshBootstrapRegistryInitializer] for factory type [org.springframework.boot.BootstrapRegistryInitializer]
at org.springframework.core.io.support.SpringFactoriesLoader$FailureHandler.lambda$throwing$0(SpringFactoriesLoader.java:647)
at org.springframework.core.io.support.SpringFactoriesLoader$FailureHandler.lambda$handleMessage$3(SpringFactoriesLoader.java:671)
at org.springframework.core.io.support.SpringFactoriesLoader.instantiateFactory(SpringFactoriesLoader.java:231)
at org.springframework.core.io.support.SpringFactoriesLoader.load(SpringFactoriesLoader.java:206)
at org.springframework.core.io.support.SpringFactoriesLoader.load(SpringFactoriesLoader.java:160)
at org.springframework.boot.SpringApplication.getSpringFactoriesInstances(SpringApplication.java:483)
at org.springframework.boot.SpringApplication.getSpringFactoriesInstances(SpringApplication.java:479)
at org.springframework.boot.SpringApplication.(SpringApplication.java:294)
at org.springframework.boot.SpringApplication.(SpringApplication.java:274)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1363)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1352)
at cn.shengkaiweilai.academic.AcademicApplication.main(AcademicApplication.java:16)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
... 4 more
Caused by: java.lang.ExceptionInInitializerError
at org.springframework.core.io.support.SpringFactoriesLoader$FactoryInstantiator.isKotlinType(SpringFactoriesLoader.java:420)
at org.springframework.core.io.support.SpringFactoriesLoader$FactoryInstantiator.findPrimaryKotlinConstructor(SpringFactoriesLoader.java:415)
at org.springframework.core.io.support.SpringFactoriesLoader$FactoryInstantiator.findConstructor(SpringFactoriesLoader.java:403)
at org.springframework.core.io.support.SpringFactoriesLoader$FactoryInstantiator.forClass(SpringFactoriesLoader.java:394)
at org.springframework.core.io.support.SpringFactoriesLoader.instantiateFactory(SpringFactoriesLoader.java:227)
... 14 more
Caused by: java.lang.StringIndexOutOfBoundsException: Range [18, -1) out of bounds for length 43
at java.base/jdk.internal.util.Preconditions$1.apply(Preconditions.java:55)
at java.base/jdk.internal.util.Preconditions$1.apply(Preconditions.java:52)
at java.base/jdk.internal.util.Preconditions$4.apply(Preconditions.java:213)
at java.base/jdk.internal.util.Preconditions$4.apply(Preconditions.java:210)
at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:98)
at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckFromToIndex(Preconditions.java:112)
at java.base/jdk.internal.util.Preconditions.checkFromToIndex(Preconditions.java:349)
at java.base/java.lang.String.checkBoundsBeginEnd(String.java:4865)
at java.base/java.lang.String.substring(String.java:2834)
at org.springframework.boot.loader.jar.MetaInfVersionsInfo.get(MetaInfVersionsInfo.java:85)
at org.springframework.boot.loader.jar.MetaInfVersionsInfo.get(MetaInfVersionsInfo.java:69)
at org.springframework.boot.loader.zip.ZipContent.lambda$getInfo$0(ZipContent.java:326)
at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1708)
at org.springframework.boot.loader.zip.ZipContent.getInfo(ZipContent.java:324)
at org.springframework.boot.loader.jar.NestedJarFile.getMetaInfVersionsInfo(NestedJarFile.java:337)
at org.springframework.boot.loader.jar.NestedJarFile.getVersionedContentEntry(NestedJarFile.java:279)
at org.springframework.boot.loader.jar.NestedJarFile.hasEntry(NestedJarFile.java:247)
at org.springframework.boot.loader.net.protocol.jar.JarUrlClassLoader.hasEntry(JarUrlClassLoader.java:170)
at org.springframework.boot.loader.net.protocol.jar.JarUrlClassLoader.definePackage(JarUrlClassLoader.java:144)
at org.springframework.boot.loader.net.protocol.jar.JarUrlClassLoader.definePackageIfNecessary(JarUrlClassLoader.java:125)
at org.springframework.boot.loader.net.protocol.jar.JarUrlClassLoader.loadClass(JarUrlClassLoader.java:98)
at org.springframework.boot.loader.launch.LaunchedClassLoader.loadClass(LaunchedClassLoader.java:91)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:534)
at java.base/java.lang.Class.forName(Class.java:513)
at org.springframework.util.ClassUtils.forName(ClassUtils.java:304)
at org.springframework.core.KotlinDetector.(KotlinDetector.java:51)
... 19 more
What you expected to happen
Exception in thread "main" java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:118)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at org.springframework.boot.loader.launch.Launcher.launch(Launcher.java:91)
at org.springframework.boot.loader.launch.Launcher.launch(Launcher.java:53)
at org.springframework.boot.loader.launch.PropertiesLauncher.main(PropertiesLauncher.java:574)
Caused by: java.lang.IllegalArgumentException: Unable to instantiate factory class [org.springframework.cloud.bootstrap.RefreshBootstrapRegistryInitializer] for factory type [org.springframework.boot.BootstrapRegistryInitializer]
at org.springframework.core.io.support.SpringFactoriesLoader$FailureHandler.lambda$throwing$0(SpringFactoriesLoader.java:647)
at org.springframework.core.io.support.SpringFactoriesLoader$FailureHandler.lambda$handleMessage$3(SpringFactoriesLoader.java:671)
at org.springframework.core.io.support.SpringFactoriesLoader.instantiateFactory(SpringFactoriesLoader.java:231)
at org.springframework.core.io.support.SpringFactoriesLoader.load(SpringFactoriesLoader.java:206)
at org.springframework.core.io.support.SpringFactoriesLoader.load(SpringFactoriesLoader.java:160)
at org.springframework.boot.SpringApplication.getSpringFactoriesInstances(SpringApplication.java:483)
at org.springframework.boot.SpringApplication.getSpringFactoriesInstances(SpringApplication.java:479)
at org.springframework.boot.SpringApplication.(SpringApplication.java:294)
at org.springframework.boot.SpringApplication.(SpringApplication.java:274)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1363)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1352)
at cn.shengkaiweilai.academic.AcademicApplication.main(AcademicApplication.java:16)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
... 4 more
Caused by: java.lang.ExceptionInInitializerError
at org.springframework.core.io.support.SpringFactoriesLoader$FactoryInstantiator.isKotlinType(SpringFactoriesLoader.java:420)
at org.springframework.core.io.support.SpringFactoriesLoader$FactoryInstantiator.findPrimaryKotlinConstructor(SpringFactoriesLoader.java:415)
at org.springframework.core.io.support.SpringFactoriesLoader$FactoryInstantiator.findConstructor(SpringFactoriesLoader.java:403)
at org.springframework.core.io.support.SpringFactoriesLoader$FactoryInstantiator.forClass(SpringFactoriesLoader.java:394)
at org.springframework.core.io.support.SpringFactoriesLoader.instantiateFactory(SpringFactoriesLoader.java:227)
... 14 more
Caused by: java.lang.StringIndexOutOfBoundsException: Range [18, -1) out of bounds for length 43
at java.base/jdk.internal.util.Preconditions$1.apply(Preconditions.java:55)
at java.base/jdk.internal.util.Preconditions$1.apply(Preconditions.java:52)
at java.base/jdk.internal.util.Preconditions$4.apply(Preconditions.java:213)
at java.base/jdk.internal.util.Preconditions$4.apply(Preconditions.java:210)
at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:98)
at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckFromToIndex(Preconditions.java:112)
at java.base/jdk.internal.util.Preconditions.checkFromToIndex(Preconditions.java:349)
at java.base/java.lang.String.checkBoundsBeginEnd(String.java:4865)
at java.base/java.lang.String.substring(String.java:2834)
at org.springframework.boot.loader.jar.MetaInfVersionsInfo.get(MetaInfVersionsInfo.java:85)
at org.springframework.boot.loader.jar.MetaInfVersionsInfo.get(MetaInfVersionsInfo.java:69)
at org.springframework.boot.loader.zip.ZipContent.lambda$getInfo$0(ZipContent.java:326)
at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1708)
at org.springframework.boot.loader.zip.ZipContent.getInfo(ZipContent.java:324)
at org.springframework.boot.loader.jar.NestedJarFile.getMetaInfVersionsInfo(NestedJarFile.java:337)
at org.springframework.boot.loader.jar.NestedJarFile.getVersionedContentEntry(NestedJarFile.java:279)
at org.springframework.boot.loader.jar.NestedJarFile.hasEntry(NestedJarFile.java:247)
at org.springframework.boot.loader.net.protocol.jar.JarUrlClassLoader.hasEntry(JarUrlClassLoader.java:170)
at org.springframework.boot.loader.net.protocol.jar.JarUrlClassLoader.definePackage(JarUrlClassLoader.java:144)
at org.springframework.boot.loader.net.protocol.jar.JarUrlClassLoader.definePackageIfNecessary(JarUrlClassLoader.java:125)
at org.springframework.boot.loader.net.protocol.jar.JarUrlClassLoader.loadClass(JarUrlClassLoader.java:98)
at org.springframework.boot.loader.launch.LaunchedClassLoader.loadClass(LaunchedClassLoader.java:91)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:534)
at java.base/java.lang.Class.forName(Class.java:513)
at org.springframework.util.ClassUtils.forName(ClassUtils.java:304)
at org.springframework.core.KotlinDetector.(KotlinDetector.java:51)
... 19 more
Anything else
No response
Are you willing to submit a pull request to fix on your own?
Code of Conduct
The text was updated successfully, but these errors were encountered: