Skip to content

maven直接打包生成jar文件,执行时PinyinToneReverse会报错 #19

@hnjerryluo

Description

@hnjerryluo

猜测是否为生成JAR包后读取不到/pinyin_dict_char.txt文件,后改为lib分离打包的形式后解决
Exception in thread "mainTimerThread" java.lang.ExceptionInInitializerError
at com.github.houbb.pinyin.bs.PinyinBs.(PinyinBs.java:76)
at com.github.houbb.pinyin.bs.PinyinBs.newInstance(PinyinBs.java:90)
at com.github.houbb.pinyin.util.PinyinHelper.(PinyinHelper.java:32)
at com.txht.service.ForecastService.getWeather(ForecastService.java:85)
at com.txht.service.ForecastService.doGrab(ForecastService.java:61)
at com.txht.task.MyTimerTask$workTimerTask.run(MyTimerTask.java:32)
at java.util.TimerThread.mainLoop(Timer.java:555)
at java.util.TimerThread.run(Timer.java:505)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 1
at com.github.houbb.pinyin.support.tone.PinyinToneReverse.(PinyinToneReverse.java:52)
... 8 more

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions