mybatis sqlmap问题

等花的牛粪 发布于 2014/05/01 16:54
阅读 1K+
收藏 0
<select id="selectByAppCode" resultMap="BaseResultMap" parameterType="java.lang.String" >
    select
    <include refid="Base_Column_List" />
    from BTUPAYPROD.T_KEY_PAS
    where APP_CODE = #{appCode,jdbcType=VARCHAR}
  </select>

mybatis的这一段sqlmap有问题么

执行这个sql的时候报异常

2014-05-01 15:16:19,507 ERROR [Thread-5] c.b.n.s.HttpServerDisPatcher [HttpServerDisPatcher.java:132] failed to org.apache.ibatis.builder.IncompleteElementException: Could not find result map java.lang.String
        at org.apache.ibatis.builder.MapperBuilderAssistant.setStatementResultMap(MapperBuilderAssistant.java:354)
        at org.apache.ibatis.builder.MapperBuilderAssistant.addMappedStatement(MapperBuilderAssistant.java:292)
        at org.apache.ibatis.builder.xml.XMLStatementBuilder.parseStatementNode(XMLStatementBuilder.java:113)
        at org.apache.ibatis.session.Configuration.buildAllStatements(Configuration.java:579)
        at org.apache.ibatis.session.Configuration.getMappedStatement(Configuration.java:505)
        at org.apache.ibatis.session.Configuration.getMappedStatement(Configuration.java:500)
        at org.apache.ibatis.binding.MapperMethod.setupCommandType(MapperMethod.java:240)
        at org.apache.ibatis.binding.MapperMethod.<init>(MapperMethod.java:71)
        at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:39)
        at com.sun.proxy.$Proxy22.selectByAppCode(Unknown Source)
        at com.bestpay.neverstop.service.helper.DaoHepler.getTKeyPasByAppCode(DaoHepler.java:127)
        at com.bestpay.neverstop.service.helper.DaoHepler$$FastClassByCGLIB$$2f73bde8.invoke(<generated>)
        at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
        at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:627)
        at com.bestpay.neverstop.service.helper.BussHelper$$EnhancerByCGLIB$$c671c7dc.getTKeyPasByAppCode(<generated>)
        at com.bestpay.neverstop.server.HttpServerDisPatcher.handle(HttpServerDisPatcher.java:83)
        at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:77)
        at sun.net.httpserver.AuthFilter.doFilter(AuthFilter.java:83)
        at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:80)
        at sun.net.httpserver.ServerImpl$Exchange$LinkHandler.handle(ServerImpl.java:677)
        at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:77)
        at com.bestpay.neverstop.server.ParameterFilter.doFilter(ParameterFilter.java:42)
        at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:80)
        at sun.net.httpserver.ServerImpl$Exchange.run(ServerImpl.java:649)
        at sun.net.httpserver.ServerImpl$DefaultExecutor.execute(ServerImpl.java:158)
        at sun.net.httpserver.ServerImpl$Dispatcher.handle(ServerImpl.java:433)
        at sun.net.httpserver.ServerImpl$Dispatcher.run(ServerImpl.java:398)
        at java.lang.Thread.run(Thread.java:744)
Caused by: java.lang.IllegalArgumentException: Result Maps collection does not contain value for java.lang.String
        at org.apache.ibatis.session.Configuration$StrictMap.get(Configuration.java:672)
        at org.apache.ibatis.session.Configuration.getResultMap(Configuration.java:434)
        at org.apache.ibatis.builder.MapperBuilderAssistant.setStatementResultMap(MapperBuilderAssistant.java:352)
        ... 27 more

加载中
0
CloudArchitect
CloudArchitect

1、日志不全

2、多看文档:)

0
牛牛牛牛
牛牛牛牛

1对多关系吧?

http://cczakai.iteye.com/blog/1275093

0
lxhuang0903
lxhuang0903

 resultMap="BaseResultMap"

这个贴下代码

OSCHINA
登录后可查看更多优质内容
返回顶部
顶部