You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@plc4x.apache.org by "liuqiang (Jira)" <ji...@apache.org> on 2021/10/13 06:24:00 UTC

[jira] [Commented] (PLC4X-317) MY SOURCE CODE CAN RUN,BUT JAR CAN'T

    [ https://issues.apache.org/jira/browse/PLC4X-317?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17428033#comment-17428033 ] 

liuqiang commented on PLC4X-317:
--------------------------------

Hi,[~cdutz]. I am back again.  I meet a problem, i am not sure it is cause by plc4j or not.
after I update source dependency to  plc4j 0.9.0, I can not run my project jar file. error infomation as above picture and below text.
I GOOGLE the reason. someone said that cause by springboot version, but I change other version of springboot, the problem not fixed.
someone said that cause by open jdk version.
-------------------------------------------------------
now, my project source code can run, but after build, the jar can not run,
can you give me some suggest?
thank you very much.




{color:red}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:130)
        at org.springframework.boot.loader.jar.CentralDirectoryFileHeader.getTime(CentralDirectoryFileHeader.java:119)
        at org.springframework.boot.loader.jar.JarEntry.<init>(JarEntry.java:55)
        at org.springframework.boot.loader.jar.JarFileEntries.getEntry(JarFileEntries.java:328)
        at org.springframework.boot.loader.jar.JarFileEntries.access$400(JarFileEntries.java:48)
        at org.springframework.boot.loader.jar.JarFileEntries$EntryIterator.next(JarFileEntries.java:379)
        at org.springframework.boot.loader.jar.JarFileEntries$EntryIterator.next(JarFileEntries.java:363)
        at org.springframework.boot.loader.jar.JarFile$2.nextElement(JarFile.java:198)
        at org.springframework.boot.loader.jar.JarFile$2.nextElement(JarFile.java:189)
        at org.springframework.boot.loader.archive.JarFileArchive$EntryIterator.next(JarFileArchive.java:186)
        at org.springframework.boot.loader.archive.JarFileArchive$EntryIterator.next(JarFileArchive.java:171)
        at org.springframework.boot.loader.archive.JarFileArchive.getNestedArchives(JarFileArchive.java:84)
        at org.springframework.boot.loader.ExecutableArchiveLauncher.getClassPathArchives(ExecutableArchiveLauncher.java:70)
        at org.springframework.boot.loader.Launcher.launch(Launcher.java:49)
        at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51){color}


> MY SOURCE CODE CAN RUN,BUT JAR  CAN'T
> -------------------------------------
>
>                 Key: PLC4X-317
>                 URL: https://issues.apache.org/jira/browse/PLC4X-317
>             Project: Apache PLC4X
>          Issue Type: Bug
>    Affects Versions: 0.9.0
>         Environment: JAVA1.8
>            Reporter: liuqiang
>            Priority: Major
>         Attachments: image-2021-10-13-14-16-30-683.png
>
>
>  !image-2021-10-13-14-16-30-683.png! 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)