• (Ljava/lang/String;)Ljava/lang/Integer; @65: areturn


    IDEA中启动tomcat报错如下,导致项目启动失败:

    2022-10-30 17:06:31 ERROR [RMI TCP Connection(3)-127.0.0.1] xxx:(251) - 根据文件xxx]扩展点定义[xxx],创建扩展点实例时出错
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'kmReviewQuartzImpl' defined in ServletContext resource xxx/spring.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate xxx.KmReviewQuartzImpl]: No default constructor found; nested exception is java.lang.VerifyError: Bad type on operand stack
    Exception Details:
      Location:
        xxx.method(Ljava/lang/String;)Ljava/lang/Integer; @65: areturn
      Reason:
        Type integer (current frame, stack[0]) is not assignable to reference type
      Current Frame:
        bci: @65
        flags: { }
        locals: { 'java/lang/String', '[Ljava/lang/String;', integer }
        stack: { integer }
      Bytecode:
        0x0000000: 1007 bd00 f159 0312 f653 5904 12f8 5359
        0x0000010: 0512 fa53 5906 12fc 5359 0712 fe53 5908
        0x0000020: 1301 0053 5910 0613 0102 534c 033d a700
        0x0000030: 1c2a 2b1c 32b6 0115 9900 0f1c 9a00 0610
        0x0000040: 07b0 1cb8 0172 b084 0201 1c2b bea1 ffe4
        0x0000050: 03b8 0172 b0                           
      Stackmap Table:
        append_frame(@49,Object[#313],Integer)
        same_frame(@66)
        same_frame(@71)
        same_frame(@74)

    根据(Ljava/lang/String;)Ljava/lang/Integer; @65: areturn排查报错原因

    类型引用有问题

    1. public static Integer getIndex(String week){
    2. String[] weekDays = { "周日", "周一", "周二", "周三", "周四", "周五", "周六" };//格式
    3. Integer index = 0;
    4. for(int i = 0 ;i
    5. if(week.equals(weekDays[i])){
    6. if(i == 0){//周日
    7. return index = 7;
    8. }
    9. return index = i;
    10. }
    11. }
    12. return 0;
    13. }

    把Integet改为int就可以了

    1. public static int getIndex(String week){
    2. String[] weekDays = { "周日", "周一", "周二", "周三", "周四", "周五", "周六" };//格式
    3. int index = 0;
    4. for(int i = 0 ;i
    5. if(week.equals(weekDays[i])){
    6. if(i == 0){//周日
    7. return index = 7;
    8. }
    9. return index = i;
    10. }
    11. }
    12. return 0;
    13. }

  • 相关阅读:
    智能化水库监控,水库雨情在线监控系统解决方案
    MyBatis
    不是冤家不碰头:贝索斯和马斯克入选福布斯“全球最抠门亿万富豪”榜单
    MySQL数据库————数据库语言(DDL与DML)
    HashMap面试原理梳理-简单一看就懂
    Golang Xorm更新Mysql数据库 结构体内的0值数据未更新
    面试题--基础篇
    UE5 中 LiveLink 的开发全流程教程
    Vue自定义事件与组件使用原生事件
    Web自动化测试详解(含文档+视频讲解)
  • 原文地址:https://blog.csdn.net/cxws110/article/details/127601925