We have an issue after upgrading version of apache camel to the latest one (3.18.1). We use 2.7.1 version of spring boot and after upgrading apache camel (starting from 3.12.0) we are not able to run a docker image of the app because of an exception:
Exception in thread "main" java.time.DateTimeException: Invalid value for MonthOfYear (valid values 1 - 12): 0
at java.base/java.time.temporal.ValueRange.checkValidValue(ValueRange.java:311)
at java.base/java.time.temporal.ChronoField.checkValidValue(ChronoField.java:717)
at java.base/java.time.LocalDate.of(LocalDate.java:269)
at java.base/java.time.LocalDateTime.of(LocalDateTime.java:336)
at org.springframework.boot.loader.jar.CentralDirectoryFileHeader.decodeMsDosFormatDateTime(CentralDirectoryFileHeader.java:127)
at org.springframework.boot.loader.jar.CentralDirectoryFileHeader.getTime(CentralDirectoryFileHeader.java:116)
at org.springframework.boot.loader.jar.JarEntry.<init>(JarEntry.java:58)
at org.springframework.boot.loader.jar.JarFileEntries.getEntry(JarFileEntries.java:316)
at org.springframework.boot.loader.jar.JarFileEntries.access$400(JarFileEntries.java:48)
at org.springframework.boot.loader.jar.JarFileEntries$EntryIterator.next(JarFileEntries.java:366)
at org.springframework.boot.loader.jar.JarFileEntries$EntryIterator.next(JarFileEntries.java:350)
at org.springframework.boot.loader.jar.JarFile$2.nextElement(JarFile.java:204)
at org.springframework.boot.loader.jar.JarFile$2.nextElement(JarFile.java:195)
at org.springframework.boot.loader.archive.JarFileArchive$EntryIterator.next(JarFileArchive.java:189)
at org.springframework.boot.loader.archive.JarFileArchive$EntryIterator.next(JarFileArchive.java:174)
at org.springframework.boot.loader.archive.JarFileArchive.getNestedArchives(JarFileArchive.java:85)
at org.springframework.boot.loader.PropertiesLauncher.addNestedEntries(PropertiesLauncher.java:560)
at org.springframework.boot.loader.PropertiesLauncher.getClassPathArchives(PropertiesLauncher.java:464)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:50)
at org.springframework.boot.loader.PropertiesLauncher.main(PropertiesLauncher.java:597)
Comment From: wilkinsona
This looks like a duplicate of https://github.com/spring-projects/spring-boot/issues/19518 that was fixed by https://github.com/spring-projects/spring-boot/pull/19595 in 2.1.12. Also, I can see from the stack trace that you're using PropertiesLauncher was implies that you aren't using the default configuration. If you would like us to spend some more time investigating, please spend some time providing a complete yet minimal sample that reproduces the problem. You can share it with us by pushing it to a separate repository on GitHub or by zipping it up and attaching it to this issue.
Comment From: SofiaVynnytska12
thanks for the answer. yes, I saw this issue, but we use newer version of Spring Boot, so it's not the case. As I've already mentioned this problem arose when we tried to run Docker image using Docker entrypoint and the stack trace comes exactly as a result of executing : -cp appName.jar org.springframework.boot.loader.PropertiesLauncher. No other configuration is used.
Comment From: wilkinsona
Unfortunately, I can't reproduce the problem. If you are using Maven, you may also want to double-check that you aren't using an old version of spring-boot-maven-plugin. Assuming that you're using spring-boot-starter-parent, the declaration of spring-boot-maven-plugin should not specify a version. As I said above, if you would like us to spend some more time investigating, please spend some time providing a complete yet minimal sample that reproduces the problem.
Comment From: SofiaVynnytska12
yes, you are right, we still use old version of spring-boot-maven-plugin; I`m very sorry for our inattention and many thanks for help!