You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Larry Meadors <la...@gmail.com> on 2022/04/05 14:21:17 UTC

Odd times in build artifacts starting at 3.12

Yesterday I upgraded a spring boot project I am working on that deploys as
an uber jar to use camel 3.16.0 and it crashes on startup with this stack:

Apr  5 13:46:45: Exception in thread "main" java.time.DateTimeException:
Invalid value for MonthOfYear (valid values 1 - 12): 0
Apr  5 13:46:45: #011at
java.base/java.time.temporal.ValueRange.checkValidValue(ValueRange.java:311)
Apr  5 13:46:45: #011at
java.base/java.time.temporal.ChronoField.checkValidValue(ChronoField.java:717)
Apr  5 13:46:45: #011at java.base/java.time.LocalDate.of(LocalDate.java:269)
Apr  5 13:46:45: #011at
java.base/java.time.LocalDateTime.of(LocalDateTime.java:336)
Apr  5 13:46:45: #011at
org.springframework.boot.loader.jar.CentralDirectoryFileHeader.decodeMsDosFormatDateTime(CentralDirectoryFileHeader.java:130)
Apr  5 13:46:45: #011at
org.springframework.boot.loader.jar.CentralDirectoryFileHeader.getTime(CentralDirectoryFileHeader.java:119)
Apr  5 13:46:45: #011at
org.springframework.boot.loader.jar.JarEntry.<init>(JarEntry.java:55)
Apr  5 13:46:45: #011at
org.springframework.boot.loader.jar.JarFileEntries.getEntry(JarFileEntries.java:328)
Apr  5 13:46:45: #011at
org.springframework.boot.loader.jar.JarFileEntries.access$400(JarFileEntries.java:48)
Apr  5 13:46:45: #011at
org.springframework.boot.loader.jar.JarFileEntries$EntryIterator.next(JarFileEntries.java:379)
Apr  5 13:46:45: #011at
org.springframework.boot.loader.jar.JarFileEntries$EntryIterator.next(JarFileEntries.java:363)
Apr  5 13:46:45: #011at
org.springframework.boot.loader.jar.JarFile$2.nextElement(JarFile.java:198)
Apr  5 13:46:45: #011at
org.springframework.boot.loader.jar.JarFile$2.nextElement(JarFile.java:189)
Apr  5 13:46:45: #011at
org.springframework.boot.loader.archive.JarFileArchive$EntryIterator.next(JarFileArchive.java:186)
Apr  5 13:46:45: #011at
org.springframework.boot.loader.archive.JarFileArchive$EntryIterator.next(JarFileArchive.java:171)
Apr  5 13:46:45: #011at
org.springframework.boot.loader.archive.JarFileArchive.getNestedArchives(JarFileArchive.java:84)
Apr  5 13:46:45: #011at
org.springframework.boot.loader.ExecutableArchiveLauncher.getClassPathArchives(ExecutableArchiveLauncher.java:70)
Apr  5 13:46:45: #011at
org.springframework.boot.loader.Launcher.launch(Launcher.java:49)
Apr  5 13:46:45: #011at
org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51)

Yes - I am aware that there is no camel code in that stack, but looking
into it, it appears to be related to the dates in the contained jar files.

When I download the artifacts from maven, I am seeing this:

-> % jar tvf camel-core-xml-3.11.0.jar| head
  2894 Wed Jan 22 15:10:16 MST 2020 META-INF/MANIFEST.MF
     0 Wed Jan 22 15:10:16 MST 2020 META-INF/
     0 Wed Jan 22 15:10:16 MST 2020 org/
     0 Wed Jan 22 15:10:16 MST 2020 org/apache/
     0 Wed Jan 22 15:10:16 MST 2020 org/apache/camel/
     0 Wed Jan 22 15:10:16 MST 2020 org/apache/camel/core/
     0 Wed Jan 22 15:10:16 MST 2020 org/apache/camel/core/xml/
     0 Wed Jan 22 15:10:16 MST 2020 org/apache/camel/core/xml/util/
     0 Wed Jan 22 15:10:16 MST 2020 org/apache/camel/core/xml/util/jsse/
     0 Wed Jan 22 15:10:16 MST 2020 META-INF/maven/

-> % jar tvf camel-core-xml-3.12.0.jar| head
  2894 Fri Nov 30 04:08:00 MST 1979 META-INF/MANIFEST.MF
     0 Fri Nov 30 04:08:00 MST 1979 META-INF/
     0 Fri Nov 30 04:08:00 MST 1979 org/
     0 Fri Nov 30 04:08:00 MST 1979 org/apache/
     0 Fri Nov 30 04:08:00 MST 1979 org/apache/camel/
     0 Fri Nov 30 04:08:00 MST 1979 org/apache/camel/core/
     0 Fri Nov 30 04:08:00 MST 1979 org/apache/camel/core/xml/
     0 Fri Nov 30 04:08:00 MST 1979 org/apache/camel/core/xml/util/
     0 Fri Nov 30 04:08:00 MST 1979 org/apache/camel/core/xml/util/jsse/
     0 Fri Nov 30 04:08:00 MST 1979 META-INF/maven/

Any jar after 3.11 has the same dates - is this something known that I have
missed somehow, or unexpected?

I am trying to find a way to get my app to start, but no luck yet - will
follow up if I learn more, but would appreciate any feedback.

Larry

Re: Odd times in build artifacts starting at 3.12

Posted by Larry Meadors <la...@gmail.com>.
Apparently, I am a joker - I had the
wrong <artifactId>spring-boot-maven-plugin</artifactId> version in my pom -
that was getting a janky version of the loader classes from spring boot and
they were choking on the jar dates - after setting that to match my spring
boot version (and I think I could have just removed it and let spring boot
set it), everything is working now.

Apologies for the noise.

Larry


On Tue, Apr 5, 2022 at 8:21 AM Larry Meadors <la...@gmail.com>
wrote:

> Yesterday I upgraded a spring boot project I am working on that deploys as
> an uber jar to use camel 3.16.0 and it crashes on startup with this stack:
>
> Apr  5 13:46:45: Exception in thread "main" java.time.DateTimeException:
> Invalid value for MonthOfYear (valid values 1 - 12): 0
> Apr  5 13:46:45: #011at
> java.base/java.time.temporal.ValueRange.checkValidValue(ValueRange.java:311)
> Apr  5 13:46:45: #011at
> java.base/java.time.temporal.ChronoField.checkValidValue(ChronoField.java:717)
> Apr  5 13:46:45: #011at
> java.base/java.time.LocalDate.of(LocalDate.java:269)
> Apr  5 13:46:45: #011at
> java.base/java.time.LocalDateTime.of(LocalDateTime.java:336)
> Apr  5 13:46:45: #011at
> org.springframework.boot.loader.jar.CentralDirectoryFileHeader.decodeMsDosFormatDateTime(CentralDirectoryFileHeader.java:130)
> Apr  5 13:46:45: #011at
> org.springframework.boot.loader.jar.CentralDirectoryFileHeader.getTime(CentralDirectoryFileHeader.java:119)
> Apr  5 13:46:45: #011at
> org.springframework.boot.loader.jar.JarEntry.<init>(JarEntry.java:55)
> Apr  5 13:46:45: #011at
> org.springframework.boot.loader.jar.JarFileEntries.getEntry(JarFileEntries.java:328)
> Apr  5 13:46:45: #011at
> org.springframework.boot.loader.jar.JarFileEntries.access$400(JarFileEntries.java:48)
> Apr  5 13:46:45: #011at
> org.springframework.boot.loader.jar.JarFileEntries$EntryIterator.next(JarFileEntries.java:379)
> Apr  5 13:46:45: #011at
> org.springframework.boot.loader.jar.JarFileEntries$EntryIterator.next(JarFileEntries.java:363)
> Apr  5 13:46:45: #011at
> org.springframework.boot.loader.jar.JarFile$2.nextElement(JarFile.java:198)
> Apr  5 13:46:45: #011at
> org.springframework.boot.loader.jar.JarFile$2.nextElement(JarFile.java:189)
> Apr  5 13:46:45: #011at
> org.springframework.boot.loader.archive.JarFileArchive$EntryIterator.next(JarFileArchive.java:186)
> Apr  5 13:46:45: #011at
> org.springframework.boot.loader.archive.JarFileArchive$EntryIterator.next(JarFileArchive.java:171)
> Apr  5 13:46:45: #011at
> org.springframework.boot.loader.archive.JarFileArchive.getNestedArchives(JarFileArchive.java:84)
> Apr  5 13:46:45: #011at
> org.springframework.boot.loader.ExecutableArchiveLauncher.getClassPathArchives(ExecutableArchiveLauncher.java:70)
> Apr  5 13:46:45: #011at
> org.springframework.boot.loader.Launcher.launch(Launcher.java:49)
> Apr  5 13:46:45: #011at
> org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51)
>
> Yes - I am aware that there is no camel code in that stack, but looking
> into it, it appears to be related to the dates in the contained jar files.
>
> When I download the artifacts from maven, I am seeing this:
>
> -> % jar tvf camel-core-xml-3.11.0.jar| head
>   2894 Wed Jan 22 15:10:16 MST 2020 META-INF/MANIFEST.MF
>      0 Wed Jan 22 15:10:16 MST 2020 META-INF/
>      0 Wed Jan 22 15:10:16 MST 2020 org/
>      0 Wed Jan 22 15:10:16 MST 2020 org/apache/
>      0 Wed Jan 22 15:10:16 MST 2020 org/apache/camel/
>      0 Wed Jan 22 15:10:16 MST 2020 org/apache/camel/core/
>      0 Wed Jan 22 15:10:16 MST 2020 org/apache/camel/core/xml/
>      0 Wed Jan 22 15:10:16 MST 2020 org/apache/camel/core/xml/util/
>      0 Wed Jan 22 15:10:16 MST 2020 org/apache/camel/core/xml/util/jsse/
>      0 Wed Jan 22 15:10:16 MST 2020 META-INF/maven/
>
> -> % jar tvf camel-core-xml-3.12.0.jar| head
>   2894 Fri Nov 30 04:08:00 MST 1979 META-INF/MANIFEST.MF
>      0 Fri Nov 30 04:08:00 MST 1979 META-INF/
>      0 Fri Nov 30 04:08:00 MST 1979 org/
>      0 Fri Nov 30 04:08:00 MST 1979 org/apache/
>      0 Fri Nov 30 04:08:00 MST 1979 org/apache/camel/
>      0 Fri Nov 30 04:08:00 MST 1979 org/apache/camel/core/
>      0 Fri Nov 30 04:08:00 MST 1979 org/apache/camel/core/xml/
>      0 Fri Nov 30 04:08:00 MST 1979 org/apache/camel/core/xml/util/
>      0 Fri Nov 30 04:08:00 MST 1979 org/apache/camel/core/xml/util/jsse/
>      0 Fri Nov 30 04:08:00 MST 1979 META-INF/maven/
>
> Any jar after 3.11 has the same dates - is this something known that I
> have missed somehow, or unexpected?
>
> I am trying to find a way to get my app to start, but no luck yet - will
> follow up if I learn more, but would appreciate any feedback.
>
> Larry
>
>