org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'fundId' in 'class java.lang.Integer'

Struts Problem Report

Struts has detected an unhandled exception:

Messages:

  1. There is no getter for property named ‘fundId‘ in ‘class java.lang.Integer‘
  2. nested exception is org.apache.ibatis.reflection.ReflectionException: There is no getter for property named ‘fundId‘ in ‘class java.lang.Integer‘

Stacktraces

org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.reflection.ReflectionException: There is no getter for property named ‘fundId‘ in ‘class java.lang.Integer‘

改错:

在mybatis     mapper.java中,正常来说,单个参数或者实体传入,不需要加:@Param("fundId")

但如果   mapper.xml中有

     <if test=" fundId!=0">
        and i.fundId = #{fundId}
     </if>

这样的判断的话,就必须要在mapper.java中参数传入时加上:@Param("fundId")。

估计是因为 mapper.xml的配置信息必须要用注解的方式进行注入。

org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'fundId' in 'class java.lang.Integer'

时间: 2024-10-13 14:34:40

org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'fundId' in 'class java.lang.Integer'的相关文章

org.apache.ibatis.reflection.ReflectionException: There is no getter for property named &#39;parentId&#39; in &#39;class java.lang.String&#39;

Caused by: org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'parentId' in 'class java.lang.String' at org.apache.ibatis.reflection.Reflector.getGetInvoker(Reflector.java:333) at org.apache.ibatis.reflection.Meta

Caused by: org.apache.ibatis.reflection.ReflectionException: There is no getter for property named &#39;zoneId&#39; in &#39;class java.lang.String&#39;

本文为博主原创,未经允许不得而转载: 异常展示: dao层定义的接口为: public int getClientTotal(); 在mybatis中的sql为: <select id="getClientTotal" parameterType="String" resultType="Integer"> SELECT COUNT(*) AS oldNum FROM tbl__client_info <where> &l

mybatis之org.apache.ibatis.reflection.ReflectionException: There is no getter for property named &#39;time&#39; in &#39;class java.lang.String&#39;

mybatis接口 List<String> getUsedCate(String time); 配置文件 <select id="getUsedCate" parameterType="java.lang.String" resultType="java.lang.String"> select distinct(cate.cate_name) from account as acc left join conCateg

Error querying database. Cause: org.apache.ibatis.reflection.ReflectionException: There is no getter for property named &#39;ItemsCustom&#39; in &#39;class com.pojo.OrderDetailCustom

再用 junit 测试MyBatis时发现的错误: org.apache.ibatis.exceptions.PersistenceException: ### Error querying database.  Cause: org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'ItemsCustom' in 'class com.pojo.OrderDetailCust

SpringMvc错误:HTTP Status 500 - Request processing failed; nested exception is org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.reflection.ReflectionException: There is n

HTTP Status 500 - Request processing failed; nested exception is org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'ItemsCustom' in 'class com.mybati

Mybatis报错 Error querying database. Cause: org.apache.ibatis.reflection.ReflectionException: Error instantiating class com.me.mybatis.pojo.Orders with invalid types () or values ().

在学mybaits的时候遇到了这个错误,而且卡住了我三个小时也找不到,最后分析出来不能初始化类,然后就结合着之前自己以前的一点经验发现只有有参构造没有无参构造,因此只需要添加上无参构造就可以了. 错误源码 org.apache.ibatis.exceptions.PersistenceException: ### Error querying database.  Cause: org.apache.ibatis.reflection.ReflectionException: Error ins

mybatis Caused by: org.apache.ibatis.reflection.ReflectionException: Error instantiating class .. with invalid types () or values (). Cause: java.lang.NoSuchMethodException: ...&lt;init&gt;()

此类错误需要在无参构造器中调用父类 public Test(){ super(); }

org.apache.ibatis.binding.BindingException: Parameter &#39;start&#39; not found. Available parameters are [1, 0, param1, param2]

DEBUG 2018-05-30 08:43:26,091 org.springframework.jdbc.datasource.DataSourceTransactionManager: Rolling back JDBC transaction on Connection [[email protected]]DEBUG 2018-05-30 08:43:26,091 org.mybatis.spring.SqlSessionUtils$SqlSessionSynchronization:

Exception:HTTP Status 500 - org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)

主要错误信息如下: HTTP Status 500 - org.apache.ibatis.binding.BindingException: Invalid bound statement (not found) description The server encountered an internal error that prevented it from fulfilling this request. exception java.lang.RuntimeException: org