4

I am working on Geo Fencing So I am using Google Dependencies "android-maps-utils" and "geopackage-android-map"

I installed these jar in my system and using them in pom.xml file

its working fine in eclipse IDE but when i built the project and run project jar separately, that time it's throwing Expecetion given below :

Thanks in advance for helping.

Exception in thread "main" java.time.DateTimeException: Invalid value for MonthOfYear (valid values 1 - 12): 0
        at java.time.temporal.ValueRange.checkValidValue(Unknown Source)
        at java.time.temporal.ChronoField.checkValidValue(Unknown Source)
        at java.time.LocalDate.of(Unknown Source)
        at java.time.LocalDateTime.of(Unknown Source)
        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.ExecutableArchiveLauncher.getClassPathArchives(ExecutableArchiveLauncher.java:69)
        at org.springframework.boot.loader.Launcher.launch(Launcher.java:50)
        at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:52)
Jitendra
  • 41
  • 1
  • 2
  • 3
    the error is pretty self explanatory: the valid values are within the range 1-12, and you pass 0. – Stultuske Mar 02 '20 at 10:31
  • we can't change google map jar and i am not passing month year any where this exception is coming when i am running the jar. – Jitendra Mar 02 '20 at 11:29
  • that is still what is happening. you'll need to figure out where it is called, and change the code if need be. – Stultuske Mar 02 '20 at 11:30
  • this is not code issue this exception is occurring only when i am using google map jar in my project. And we can't make change in that google map jar – Jitendra Mar 03 '20 at 05:30
  • yes. and the issue is that a 0 is passed where that is not a valid value. Not much more we can say about that. – Stultuske Mar 03 '20 at 06:57

2 Answers2

1

Looks like it was fixed in spring-boot 2.1.12 https://github.com/spring-projects/spring-boot/pull/19595

rgolcz
  • 61
  • 1
  • 3
-1

This Api takes mont number in format 1-12. You need add one +1 when you are going from place that uses 0-11 for counting months.

Scalway
  • 1,633
  • 10
  • 18