• (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. }

  • 相关阅读:
    设计模式-代理模式-笔记
    【Python百宝箱】图解未来:数据可视化引领智慧决策时代
    Elasticsearch8.X与java调用
    ardupilot开发 --- 通信链路 篇
    云原生架构如何助力大数据和AI技术在软件开发中的深度整合
    c# 扩展类,扩展方法
    为了7K ,离开字节,值得吗....
    浅谈分布式系统
    Java IO简介说明
    【附源码】Python计算机毕业设计商场会员管理系统
  • 原文地址:https://blog.csdn.net/cxws110/article/details/127601925