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. map-reduce 优化

    map阶段优化 参数:io.sort.mb(default 100) 当map task开始运算,并产生中间数据时,其产生的中间结果并非直接就简单的写入磁盘. 而是会利用到了内存buffer来进行已经 ...

  2. Android指南 - 主题

      译者注:theme(主题)和style(样式)是专用术语,下面对这两个词汇不在使用中文词汇.   theme 是安卓的一种机制,用于为应用程序和activity提供一致的样式(style).样式s ...

  3. Altium Designer 正反面布元器件

    1.统一设置PCB中注释字体的大小:在PCB编辑状态,鼠标指向任一需要修改的丝印字符,右键选择find similar object,这时会弹出的对话框中将代表元件字符的选项右边对应选项改为same, ...

  4. 在C++中调用DLL中的函数(3)

    1.dll的优点 代码复用是提高软件开发效率的重要途径.一般而言,只要某部分代码具有通用性,就可将它构造成相对独立的功能模块并在之后的项目中重复使用.比较常见的例子是各种应用程序框架,ATL.MFC等 ...

  5. python 搜索引擎Whoosh中文文档和代码 以及jieba的使用

    注意, 数据库的表最好别有下划线 中文文档链接: https://mr-zhao.gitbooks.io/whoosh/content/%E5%A6%82%E4%BD%95%E7%B4%A2%E5%B ...

  6. (笔记)Linux下查看CPU使用率的命令

    1.top 使用权限:所有使用者 使用方式:top [-] [d delay] [q] [c] [S] [s] [i] [n] [b] 说明:即时显示process的动态 d :改变显示的更新速度,或 ...

  7. Spring JDBC SimpleJdbcCall类示例

    org.springframework.jdbc.core.SimpleJdbcCall类是表示对存储过程或存储函数的调用的多线程,可重用的对象. 它提供元数据处理以简化访问基本存储过程/函数所需的代 ...

  8. c# 生成随机时间

    Random random = new Random((int)(DateTime.Now.Ticks)); ; ) { , ); , ); , ); string tempStr = string. ...

  9. Git -- 新增分支添加新功能

    软件开发中,总有无穷无尽的新的功能要不断添加进来. 添加一个新功能时,你肯定不希望因为一些实验性质的代码,把主分支搞乱了,所以,每添加一个新功能,最好新建一个feature分支,在上面开发,完成后,合 ...

  10. CI框架 -- 核心文件 之 Lang.php(加载语言包)

    <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); class CI_Lang { var $l ...