今天在使用反射的时候,出现了java.lang.IllegalArgumentException: object is not an instance of declaring class错误…具体是invoke()调用的时候

   String returnFlag = (String) m.invoke(t, request, response);

第一个参数应该是调用该方法的对象,而我粗心直接把Class对象给过去了…..实际上第一个参数应该是Object

java.lang.IllegalArgumentException: object is not an instance of declaring class的更多相关文章

  1. 报错:java.lang.IllegalArgumentException: object is not an instance of declaring class

    反射的报错信息如下: java.lang.IllegalArgumentException: object is not an instance of declaring class at sun.r ...

  2. java.lang.IllegalArgumentException: object is not an instance of declaring class新发现

    文章目录 背景 报错 解决 引申 背景 因为要将方法缓存起来提高性能 报错 java.lang.IllegalArgumentException: object is not an instance ...

  3. 由Resin引发的java.lang.IllegalArgumentException: object is not an instance of declaring class(反射中使用)思考

    文章目录 背景 原因 解决办法 背景 在java agent中抓取Resin的 某些方法,在invoke的时候出现错误 java.lang.IllegalArgumentException: obje ...

  4. Android java.lang.IllegalArgumentException: Object returned from onCreateLoader must not be a non-static inn

    AsyncTaskLoader: http://developer.Android.com/intl/zh-CN/reference/android/content/AsyncTaskLoader.h ...

  5. 【IllegalArgumentException】: object is not an instance of declaring class

    java.lang.IllegalArgumentException: object is not an instance of declaring class 日前在调试动态代理的例子中,出现以上报 ...

  6. [Android] View.setTag(key,Object) (java.lang.IllegalArgumentException: The key must be an application-specific resource id.)

    转自: http://blog.csdn.net/brokge/article/details/8536906 setTag是android的view类中很有用的一个方法,可以用它来给空间附加一些信息 ...

  7. Caused by: java.lang.IllegalArgumentException: DefaultSerializer requires a Serializable payload but received an object of type [VCodeModel]

    2019-08-20 17:53:24,054 [ERROR] [http-nio-8047-exec-1] [HttpResult.java : 143] 系统异常 org.springframew ...

  8. IDEA报错: Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'spring.datasource.url' in value "${spring.datasource.url}"

    运行审核流模块: 在ActivitiServiceApplication模块日志报错: Error starting ApplicationContext. To display the auto-c ...

  9. Caused by: java.lang.IllegalArgumentException: Could not resolve placeholder 'jdbc.username' in string value "${jdbc.username}"

    1.启动dubbo的引用dubbo服务时候报下面这个错误,这是由于去找dubbo的发布服务未找到报的错误,所以先启动dubbo的发布服务即可. [INFO] Scanning for projects ...

随机推荐

  1. mysql为什么范围查询(>,<,between,%like,like%)之后的索引无效

    因为使用了范围索引,所以会使用满足范围的所有的值,也就是说存储引擎在这个时候会提取出满足之后条件的所有值,并遍历获取满足之后条件的值. http://www.itpub.net/thread-1901 ...

  2. 【Linux SELinux】提升系统安全(一)

    本文重点:了解SELinux并能够熟练地启动关闭selinux(就像精通windows系统开关机一样) 背景:在centos5.x之后,selinux 非常完备地成为了系统内核模块,centos5.x ...

  3. BotVS开发基础—2.5 状态信息显示表格

    代码 import json def main(): #part 1 bol = True num = 10; # str = "ABC"; # 字符串 list = [1, 2, ...

  4. Andrew Ng机器学习课程笔记--week9(下)(推荐系统&协同过滤)

    本周内容较多,故分为上下两篇文章. 本文为下篇. 一.内容概要 1. Anomaly Detection Density Estimation Problem Motivation Gaussian ...

  5. org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML.问题思路

    15:36:34,549 WARN DefaultListableBeanFactory:1416 - Bean creation exception on FactoryBean type chec ...

  6. Java基础---集合

    第一讲    集合框架 先看下面的图: 这就是集合框架的构成.由于数据结构的不同,有不同的集合,也叫容器.下面是集合类的简单介绍. 一.为什么出现集合类? 面向对象语言对事物的体现都是以对象的形式,所 ...

  7. split添加limit参数

    String str = "I love you"; /**这里被分割为I 和love you**/ String[] spiltStr = str.spit(" &qu ...

  8. exjs上传图片异常:com.jspsmart.upload.SmartUploadException: File can't be saved (1120).

    错误: 文件名格式不对:未命??.jpg SmartUpload mySmartUpload = new SmartUpload(); com.jspsmart.upload.File myFile ...

  9. jmeter 非gui 模式跑jmx

    D:\study\apache-jmeter-3.0\bin>jmeter -n -t D:\study\apache-jmeter-3.0\基金排行.jmx -l D:\study\apach ...

  10. 根据本周本月本日来查询数据 C#winform数据查询

    这个我是在winform的页面上做的 1. 首先是在页面上添加3个lable   第一次点击lable会有相应的数据被查询出来  第二次点击同一个lable会刷新所有的数据 2.点击不同的label会 ...