Error Log
2021-12-16 15:41:24.527 ERROR 7 -- [pollingConfigurationSource] com.netflix.config.AbstractPollingScheduler : Error getting result from polling source
==>
java.lang.IndexOutOfBoundsException: null
at org.springframework.boot.loader.data.RandomAccessDataFile.getSubsection(RandomAccessDataFile.java:83)
at org.springframework.boot.loader.jar.JarFileEntries.getEntryData(JarFileEntries.java:245)
at org.springframework.boot.loader.jar.JarFileEntries.getInputStream(JarFileEntries.java:222)
at org.springframework.boot.loader.jar.JarFile.getInputStream(JarFile.java:265)
at org.springframework.boot.loader.jar.JarFileWrapper.getInputStream(JarFileWrapper.java:95)
at org.springframework.boot.loader.jar.JarURLConnection.getInputStream(JarURLConnection.java:164)
at java.net.URL.openStream(URL.java:1045)
at com.netflix.config.sources.URLConfigurationSource.poll(URLConfigurationSource.java:187)
at com.netflix.config.AbstractPollingScheduler$1.run(AbstractPollingScheduler.java:166)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
<==
Environment
- java version: 1.8
- spring-boot version: 2.3.12.RELEASE
- spring-cloud version: Hoxton.SR12
Comment From: snicoll
@wangliang181230 Spring Boot 2.3.x is out of OSS support so please upgrade to a supported version first (at least 2.5.x). If you're still can reproduce the problem, we'd need a small sample as a stacktrace isn't enough to track down where that could come from.
Comment From: wangliang181230
An empty classpath:config.properties
in my project.
Then the exception is triggered.
Comment From: snicoll
@wangliang181230 thanks but we can't look at this until you've upgraded to a supported version as the issue may have been fixed in the meantime. Please upgrade and let us know if the problem persists.
Comment From: wangliang181230
I removed the config.properties
, and then the exception was not thrown out again.