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:)
at org.apache.ibatis.reflection.MetaClass.getGetInvoker(MetaClass.java:)
at org.apache.ibatis.reflection.wrapper.BeanWrapper.getBeanProperty(BeanWrapper.java:)
at org.apache.ibatis.reflection.wrapper.BeanWrapper.get(BeanWrapper.java:)
at org.apache.ibatis.reflection.MetaObject.getValue(MetaObject.java:)
at org.apache.ibatis.builder.xml.dynamic.DynamicContext$ContextMap.get(DynamicContext.java:)
at org.apache.ibatis.builder.xml.dynamic.DynamicContext$ContextAccessor.getProperty(DynamicContext.java:)
at org.apache.ibatis.ognl.OgnlRuntime.getProperty(OgnlRuntime.java:)
at org.apache.ibatis.ognl.ASTProperty.getValueBody(ASTProperty.java:)
at org.apache.ibatis.ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:)
at org.apache.ibatis.ognl.SimpleNode.getValue(SimpleNode.java:)
at org.apache.ibatis.ognl.ASTNotEq.getValueBody(ASTNotEq.java:)
at org.apache.ibatis.ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:)
at org.apache.ibatis.ognl.SimpleNode.getValue(SimpleNode.java:)
at org.apache.ibatis.ognl.Ognl.getValue(Ognl.java:)
at org.apache.ibatis.ognl.Ognl.getValue(Ognl.java:)
at org.apache.ibatis.ognl.Ognl.getValue(Ognl.java:)
at org.apache.ibatis.builder.xml.dynamic.OgnlCache.getValue(OgnlCache.java:)
at org.apache.ibatis.builder.xml.dynamic.ExpressionEvaluator.evaluateBoolean(ExpressionEvaluator.java:)
at org.apache.ibatis.builder.xml.dynamic.IfSqlNode.apply(IfSqlNode.java:)
at org.apache.ibatis.builder.xml.dynamic.MixedSqlNode.apply(MixedSqlNode.java:)
at org.apache.ibatis.builder.xml.dynamic.TrimSqlNode.apply(TrimSqlNode.java:)
at org.apache.ibatis.builder.xml.dynamic.MixedSqlNode.apply(MixedSqlNode.java:)
at org.apache.ibatis.builder.xml.dynamic.TrimSqlNode.apply(TrimSqlNode.java:)
at org.apache.ibatis.builder.xml.dynamic.MixedSqlNode.apply(MixedSqlNode.java:)
at org.apache.ibatis.builder.xml.dynamic.MixedSqlNode.apply(MixedSqlNode.java:)
at org.apache.ibatis.builder.xml.dynamic.DynamicSqlSource.getBoundSql(DynamicSqlSource.java:)
at org.apache.ibatis.mapping.MappedStatement.getBoundSql(MappedStatement.java:)
at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:)
at sun.reflect.GeneratedMethodAccessor143.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:)
at java.lang.reflect.Method.invoke(Method.java:)
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:)
... more

sql:

<![CDATA[
SELECT inn.inner_org_id, inn.org_code FROM inner_org inn, org_relation rel WHERE inn.inner_org_id=rel.relation_id and rel.parent_id = #{parentId}
]]>

解决方法1:

将参数名(上面的例子为’parentId’)替换为”_parameter”

解决方法2:

Dao层接口方法的参数声明加上@Param("parentId")

如:List<Inner> findInnerByPid(@Param("parentId") String parentId);

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

  1. Caused by: org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'zoneId' in 'class java.lang.String'

    本文为博主原创,未经允许不得而转载: 异常展示: dao层定义的接口为: public int getClientTotal(); 在mybatis中的sql为: <select id=&quo ...

  2. mybatis之org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'time' in 'class java.lang.String'

    mybatis接口 List<String> getUsedCate(String time); 配置文件 <select id="getUsedCate" pa ...

  3. Mybatis笔记四:nested exception is org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'id' in 'class java.lang.String'

    错误异常:nested exception is org.apache.ibatis.reflection.ReflectionException: There is no getter for pr ...

  4. Caused by: org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'company' in 'class java.lang.String'

    Caused by: org.apache.ibatis.reflection.ReflectionException: There is no getter for property named ' ...

  5. 【Mybatis】mybatis查询报错org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'areaName' in 'class java.lang.String'

    mybatis查询报错: Caused by: org.apache.ibatis.reflection.ReflectionException: There is no getter for pro ...

  6. 已解决: mybatis报错 org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'xxx' in 'class java.lang.String'

    最近在练习MyBatis时 进行姓名的模糊查询时候出现 org.apache.ibatis.exceptions.PersistenceException: ### Error querying da ...

  7. nested exception is org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'enterpriseId' in 'class java.lang.String'

    错误信息: nested exception is org.apache.ibatis.reflection.ReflectionException: There is no getter for p ...

  8. org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'socialCode' in 'class java.lang.String'

    异常: org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.reflection.Refl ...

  9. MyBatis映射,抛出Cause: org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'oid' in 'class java.lang.String'

    原因在于: 在MyBatis中使用动态语句的判断时,传入的参数(parameterType)为Java基本数据类型,获取的结果(resultType)为JavaBean对象,此时就会抛出该异常,此时可 ...

随机推荐

  1. 无法转换json问题 Error: Model.nodeDataArray value is not an instance of Array or NodeList or HTMLCollection

    var jsonobj=eval('('+t+')'); 使用eval 函数,讲后台json字符串转换为前台jsarray数组. 如果使用 ajax不会出现这种情况,因为会自动转换. 但是如果直接从后 ...

  2. 微信小程序——template的循环嵌套

    上一篇我们有写到 template的使用方法 .在实际运用中,需要做到template里面再嵌套一层循环.我们先看一下数据结构: 模板是用于循环list,现在的需求是在模板里面嵌套一个orderIte ...

  3. PHP经纬度 测距

    /** *求两个已知经纬度之间的距离,单位为米 *@param lng1,lng2 经度 *@param lat1,lat2 纬度 *@return float 距离,单位米 **/ function ...

  4. office 2013 快速换KEY

    在有些时候,我们总会碰到一些需要更换Office安装Key(序列号.密钥)的情形,例如购买或朋友赠了新的Key等等.网上搜索的话,有很多种更改变换Office 2010序列号办法,今天就来挨个介绍一下 ...

  5. HOW-TO GEEK SCHOOL

    This How-To Geek School class is intended for people who want to learn more about security when usin ...

  6. 使 Finder 显示 文件夹路径

    显示路径: cd ~ defaults write com.apple.finder _FXShowPosixPathInTitle -bool TRUE killall Finder 不显示路径: ...

  7. e740. 向标签中加入一个图标

    This example creates a JLabel component with an icon. // Fetch icon Icon icon = new ImageIcon(" ...

  8. Lemon OA第4篇:常用功能

    OA,Office Automation的简写,中文意思办公自动化,不同的人有不同的见解,可以简单的理解为网络化办公,高效.协同是其显著的特点,如今正在朝着智能的方向发展 平时不擅长文字,写出来几句话 ...

  9. Salt-ssh批量自动安装被控端salt-mini

    Salt-ssh是Saltstack的另外一种管理方式,无需安装minion端,可以运行salt的一切功能,管理和使用方法基本和salt一样.但是,salt-ssh并没有继承原来的ZeroMQ通讯架构 ...

  10. yii2 页面渲染方法解析

    render渲染.renderPartial渲染部分.renderContent.renderAjax.renderFile ① render显示view和layout ② renderPartial ...