[求助]关于一个SqlMap中Mysql语句的一个问题_MySQL, Oracle及数据库讨论区_Weblogic技术|Tuxedo技术|中间件技术|Oracle论坛|JAVA论坛|Linux/Unix技术|hadoop论坛_联动北方技术论坛  
网站首页 | 关于我们 | 服务中心 | 经验交流 | 公司荣誉 | 成功案例 | 合作伙伴 | 联系我们 |
联动北方-国内领先的云技术服务提供商
»  游客             当前位置:  论坛首页 »  自由讨论区 »  MySQL, Oracle及数据库讨论区 »
总帖数
1
每页帖数
101/1页1
返回列表
0
发起投票  发起投票 发新帖子
查看: 1915 | 回复: 0   主题: [求助]关于一个SqlMap中Mysql语句的一个问题        下一篇 
ab19890824
注册用户
等级:少尉
经验:351
发帖:92
精华:0
注册:2011-11-21
状态:离线
发送短消息息给ab19890824 加好友    发送短消息息给ab19890824 发消息
发表于: IP:您无权察看 2014-12-8 16:36:54 | [全部帖] [楼主帖] 楼主

SQL code
<select id="getU" parameterClass="U" resultClass="U">
SELECT
A.usr_id as usrId
FROM
U A
WHERE
A.login_name=#loginName#
AND A.login_pwd=#loginPwd#
AND A.del_flg!=1
AND A.ban_time IS NULL
</select>


我直接执行这条Mysql语句是成功的

然后程序跑的时候报错:

Java code
com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred in sqlmap/U.xml.
--- The error occurred while applying a parameter map.
--- Check the getUserInfo-InlineParameterMap.
--- Check the statement (query failed).
--- Cause: java.sql.SQLException: Unknown type '16 in column 10 of 11 in binary-encoded result set.
Caused by: java.sql.SQLException: Unknown type '16 in column 10 of 11 in binary-encoded result set.
at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryWithCallback(GeneralStatement.java:185)
at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryForList(GeneralStatement.java:123)
at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:610)
at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:584)
at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForList(SqlMapSessionImpl.java:101)
at com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.queryForList(SqlMapClientImpl.java:78)
at com.miraclecastle.common.dao.CommonBaseDao.getList(CommonBaseDao.java:83)
at com.miraclecastle.common.dao.service.UserInfoService.login(UserInfoService.java:65)
at com.miraclecastle.servlet.UsrLoginServlet.service(UsrLoginServlet.java:105)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.sql.SQLException: Unknown type '16 in column 10 of 11 in binary-encoded result set.
at com.mysql.jdbc.MysqlIO.unpackNativeEncodedColumn(MysqlIO.java:4149)
at com.mysql.jdbc.MysqlIO.unpackBinaryResultSetRow(MysqlIO.java:3672)
at com.mysql.jdbc.MysqlIO.nextRow(MysqlIO.java:1335)
at com.mysql.jdbc.MysqlIO.readSingleRowSet(MysqlIO.java:2253)
at com.mysql.jdbc.MysqlIO.getResultSet(MysqlIO.java:434)
at com.mysql.jdbc.MysqlIO.readResultsForQueryOrUpdate(MysqlIO.java:1952)
at com.mysql.jdbc.MysqlIO.readAllResults(MysqlIO.java:1400)
at com.mysql.jdbc.Connection.serverExecute(Connection.java:4793)
at com.mysql.jdbc.ServerPreparedStatement.serverExecute(ServerPreparedStatement.java:1251)
at com.mysql.jdbc.ServerPreparedStatement.executeInternal(ServerPreparedStatement.java:993)
at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:1448)
at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:172)
at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:172)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.ibatis.common.jdbc.logging.PreparedStatementLogProxy.invoke(PreparedStatementLogProxy.java:62)
at $Proxy1.execute(Unknown Source)
at com.ibatis.sqlmap.engine.execution.SqlExecutor.executeQuery(SqlExecutor.java:180)
at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.sqlExecuteQuery(GeneralStatement.java:205)
at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryWithCallback(GeneralStatement.java:173)
... 21 more


请大神帮帮忙,谢谢~!




赞(0)    操作        顶端 
总帖数
1
每页帖数
101/1页1
返回列表
发新帖子
请输入验证码: 点击刷新验证码
您需要登录后才可以回帖 登录 | 注册
技术讨论