同一个sql不定时出现### The error may involve defaultParameterMap 5C

前提:我有个接口是根据不同的账号登录后,关联自己账号下的数据。
遇到个诡异的问题,有个语句线上运行了几个月了,
今天老大突然登录了一个有大批量数据的账号,然后这个语句就开始报错,当然日志里面有报具体是哪个语句。我拿出来这个语句在mysql里面执行没问题,然后字段对着实体类一个个的瞅,然后后面干脆重新一个个复制过去。还是报这个错误。
然后和同事讨论了一会儿也没想出来哪里会还有问题
首先只有登录这个账户查询的数据量比较大才会报这个错误。其它账号一直很正常,由于这个账号用户每次只是调另外一个数据接口看数据从未直接登录上来看,所以这个报错的接口用户是不知道的,但是现在后期正规起来,万一有的客户上来看系统还报错是不行的。现在情况是只有线上报错。线下复现不出来,线上的数据库没有权限看。
语句里每个字段和实体类字段完全一致,是复制过去的,creator = #{creator,jdbcType=VARCHAR}传参都是这种方式传的,类型也都传了

        [2018-10-08 10:14:12]10.28.47.229

content: ### The error may involve defaultParameterMap
[2018-10-08 10:14:12]10.28.47.229
content: ### The error occurred while setting parameters
[2018-10-08 10:14:12]10.28.47.229
content: ### Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
[2018-10-08 10:14:12]10.28.47.229
content: The last packet successfully received from the server was 5,006 milliseconds ago. The last packet sent successfully to the server was 5,005 milliseconds ago.
[2018-10-08 10:14:12]10.28.47.229
content: ; SQL []; Communications link failure

2个回答

你的参数是用map传递的? 你看下你传进去的参数是什么,错误里说与数据库链接失败Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

u012558695
wmy102125 @Param("creator") String creator 我的参数都是这样每个按顺序传入进去的
一年多之前 回复

只有一个账号登陆的时候有问题的话,可以查一下登陆的条件查询出来的是不是一个,会不会出现了多个,导致查询赋值出错

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
Python+OpenCV计算机视觉

Python+OpenCV计算机视觉

快来大神 求解答.................

HTTP Status 500 - Request processing failed; nested exception is org.springframework.dao.DataIntegrityViolationException: type Exception report message Request processing failed; nested exception is org.springframework.dao.DataIntegrityViolationException: description The server encountered an internal error that prevented it from fulfilling this request. exception org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.springframework.dao.DataIntegrityViolationException: ### Error updating database. Cause: java.sql.SQLException: Field 'links' doesn't have a default value ### The error may involve com.doje.limiguo.news.dao.newsMapper.insertSelective-Inline ### The error occurred while setting parameters ### SQL: insert into t_news ( title, content, imgPath, types ) values ( ?, ?, ?, ? ) ### Cause: java.sql.SQLException: Field 'links' doesn't have a default value ; SQL []; Field 'links' doesn't have a default value; nested exception is java.sql.SQLException: Field 'links' doesn't have a default value org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:973) org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:863) javax.servlet.http.HttpServlet.service(HttpServlet.java:650) org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837) javax.servlet.http.HttpServlet.service(HttpServlet.java:731) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:108)

在本地的Tomcat服务器跑没问题;以下是发布到云服务器上的tomcat执行报的错

This application has no explicit mapping for /error, so you are seeing this as a fallback. Thu Apr 04 12:14:56 CST 2019 There was an unexpected error (type=Internal Server Error, status=500). ### Error querying database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: #42000 ### The error may exist in com/hunca/mapper/UserDeviceMapper.xml ### The error may involve defaultParameterMap ### The error occurred while setting parameters ### SQL: SELECT count(*) FROM (SELECT ca.cityName, ca.cityDevNum, d.devType, COUNT(1) AS deviceNum FROM (SELECT DISTINCT c.cityCode, c.cityName, COUNT(1) AS cityDevNum FROM userdevice u JOIN city c ON u.cityCode = c.cityCode WHERE 1 = 1 GROUP BY c.areaCode) AS ca JOIN userdevice d ON ca.cityCode = d.cityCode GROUP BY d.cityCode, d.devType) table_count ### Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: #42000 ; bad SQL grammar []; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: #42000

mybatis出现了很奇怪的问题

``` ### Error querying database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'card_id' in 'field list' ### The error may exist in com/ershou/mapper/UserMapper.xml ### The error may involve com.ershou.mapper.UserMapper.selectByExample-Inline ### The error occurred while setting parameters ### SQL: select card_id, password, college, grade, sex, status, trueName, image from user WHERE ( card_id = ? and password = ? ) ### Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'card_id' in 'field list' ; bad SQL grammar []; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'card_id' in 'field list'] with root cause com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'card_id' in 'field list' ``` 提示我的card_id 数据库不认识,但是我的数据库就是这样定义的啊 我用的也是generator自动生成的代码 CREATE TABLE `user` ( `card_id` varchar(20) NOT NULL, `password` varchar(20) DEFAULT NULL, `college` varchar(200) DEFAULT NULL, `grade` varchar(200) DEFAULT NULL, `sex` int(2) DEFAULT '1', `status` int(2) DEFAULT '1', `trueName` varchar(20) DEFAULT NULL, `image` varchar(50) DEFAULT NULL, PRIMARY KEY (`card_id`) ) 看一下mybatis的XXXMapper.xml文件 <resultMap id="BaseResultMap" type="com.ershou.entity.User" > <id column="card_id" property="cardId" jdbcType="VARCHAR" /> <result column="password" property="password" jdbcType="VARCHAR" /> <result column="college" property="college" jdbcType="VARCHAR" /> <result column="grade" property="grade" jdbcType="VARCHAR" /> <result column="sex" property="sex" jdbcType="INTEGER" /> <result column="status" property="status" jdbcType="INTEGER" /> <result column="trueName" property="truename" jdbcType="VARCHAR" /> <result column="image" property="image" jdbcType="VARCHAR" /> </resultMap> <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.ershou.entity.UserExample" > select <if test="distinct" > distinct </if> <include refid="Base_Column_List" /> from user <if test="_parameter != null" > <include refid="Example_Where_Clause" /> </if> <if test="orderByClause != null" > order by ${orderByClause} </if> </select> 哪里出错了 见鬼了 求大神

SpringBoot+MyBaits+MySQL连接数据库出错,求大神指点配置

报错如下: 2017-11-19 15:13:40.009 ERROR 15152 --- [nio-8090-exec-2] e.n.y.o.service.LoginModuleService : checkUserInfo: Error message is org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException: ### Error querying database. Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES) ### The error may exist in file [D:\Spring\JavaWeb\OnlineBookstore\target\classes\mybatis\mapper\UserInfoMapper.xml] ### The error may involve edu.javaee.onlinebookstore.mapper.UserInfoMapper.isNameExist ### The error occurred while executing a query ### Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES) application.properties配置如下: server.port = 8090 spring.mvc.view.prefix = /WEB-INF/jsp/ spring.mvc.view.suffix = .jsp spring.datasource.driverClassName = com.mysql.jdbc.Driver spring.datasource.url = jdbc:mysql://localhost:3306/onlinebookstore?useUnicode=true&characterEncoding=utf8&useSSL=false spring.datasource.username = root spring.datasource.password = root mybatis.typeAliasesPackage = edu.javaee.onlinebookstore.domain mybatis.config-location = classpath:mybatis/mybatis-config.xml mybatis.mapper-locations = classpath:mybatis/mapper/*Mapper.xml logging.file = log/service.log 检查过数据库密码正确,可以通过Navicat访问。

在eclpse这是什么问题,求大神解

### Error updating database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'employee_job' in 'field list' ### The error may involve com.lin.dao.EmployeeDao.insertEmployee-Inline ### The error occurred while setting parameters ### SQL: INSERT INTO t_employee(employee_name,employee_code,employee_dept,employee_leader,employee_job,employee_mentor,employee_salary) VALUES(?,?,?,?,?,?,?)

The error SQL: select * from ACT_GE_PROPERTY where NAME_ = ? Cause: java.lang.NullPointerException

Caused by: org.springframework.beans.factory.BeanCreationException: Could not au towire field: private com.jeeplus.system.equips.service.lift.LiftAdminAuditServi ce com.jeeplus.system.equips.service.lift.LiftService.liftAdminAuditService; nes ted exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'liftAdminAuditService': Injection of autowired dependen cies failed; nested exception is org.springframework.beans.factory.BeanCreationE xception: Could not autowire field: org.activiti.engine.TaskService com.jeeplus. system.equips.service.lift.LiftAdminAuditService.taskService; nested exception i s org.springframework.beans.factory.BeanCreationException: Error creating bean w ith name 'processEngine': FactoryBean threw exception on object creation; nested exception is org.apache.ibatis.exceptions.PersistenceException: ### Error querying database. Cause: java.lang.NullPointerException ### The error may exist in org/activiti/db/mapping/entity/Property.xml ### The error may involve org.activiti.engine.impl.persistence.entity.PropertyEn tity.selectProperty ### The error occurred while handling results ### SQL: select * from ACT_GE_PROPERTY where NAME_ = ? ### Cause: java.lang.NullPointerException 老是报这个错,怎么办哦?有人遇到过吗,求解。 对应的SQLserver表 ![图片说明](https://img-ask.csdn.net/upload/201906/18/1560824853_650090.png) 注意:其他同伴的电脑可以正常运行的

Error querying database

### Error querying database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'evaluation_additional_status' in 'field list' ### The error may involve com.leimingtech.service.module.trade.dao.mapper.OrderMapper.findOrderList-Inline ### The error occurred while setting parameters ### Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'evaluation_additional_status' in 'field list' ; bad SQL grammar []; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'evaluation_additional_status' in 'field list' org.springframework.jdbc.BadSqlGrammarException: ### Error querying database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'evaluation_additional_status' in 'field list' ### The error may involve com.leimingtech.service.module.trade.dao.mapper.OrderMapper.findOrderList-Inline ### The error occurred while setting parameters ### Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'evaluation_additional_status' in 'field list' ; bad SQL grammar []; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'evaluation_additional_status' in 'field list' %09at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:231) ~[spring-jdbc-4.1.4.RELEASE.jar:4.1.4.RELEASE] %09at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:73) ~[spring-jdbc-4.1.4.RELEASE.jar:4.1.4.RELEASE] %09at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:73) ~[mybatis-spring-1.2.2.jar:1.2.2] %09at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:371) ~[mybatis-spring-1.2.2.jar:1.2.2] %09at com.sun.proxy.$Proxy40.selectList(Unknown Source) ~[?:?] %09at org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:198) ~[mybatis-spring-1.2.2

tomcat项目运行一段时间后无法连接sql server2008数据库,重启tomat又好了

具体报错: org.apache.ibatis.exceptions.PersistenceException: ### Error querying database. Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool error Timeout waiting for idle object ### The error may exist in /com/dayainfo/ssp/sqlMapper/sqlMapper-basicDataExpertSearch.xml ### The error may involve .selectBasicDataExpertSearchByKey ### The error occurred while executing a query ### Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool error Timeout waiting for idle object] with root cause java.util.NoSuchElementException: Timeout waiting for idle object tomcat版本:是tomcat7 sql server版本:sql server 2008 R2 tomcat和sql server不在同一个服务器

关于Mybatis中SQL语句报错的问题

提示是OrderMapper.XML中的insertSelective出错 报错信息: org.springframework.jdbc.BadSqlGrammarException: ## ## ### Error updating database. Cause: java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 ## ## ### The error may exist in file [E:\myProject\mall\target\classes\mapper\OrderMapper.xml] ## ### The error may involve com.example.mall.dao.OrderMapper.insertSelective-Inline ## ### The error occurred while setting parameters ## ### SQL: insert into mall_order ## ### Cause: java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 ## ; bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1**** ## OrderMapper.XML中的代码: ``` <insert id="insertSelective" parameterType="com.example.mall.pojo.Order"> insert into mall_order <trim prefix="(" suffix=")" suffixOverrides=","> <if test="id != null"> id, </if> <if test="orderNo != null"> order_no, </if> <if test="userId != null"> user_id, </if> <if test="shippingId != null"> shipping_id, </if> <if test="payment != null"> payment, </if> <if test="paymentType != null"> payment_type, </if> <if test="postage != null"> postage, </if> <if test="status != null"> status, </if> <if test="paymentTime != null"> payment_time, </if> <if test="sendTime != null"> send_time, </if> <if test="endTime != null"> end_time, </if> <if test="closeTime != null"> close_time, </if> <if test="createTime != null"> create_time, </if> <if test="updateTime != null"> update_time, </if> </trim> <trim prefix="values (" suffix=")" suffixOverrides=","> <if test="id != null"> #{id,jdbcType=INTEGER}, </if> <if test="orderNo != null"> #{orderNo,jdbcType=BIGINT}, </if> <if test="userId != null"> #{userId,jdbcType=INTEGER}, </if> <if test="shippingId != null"> #{shippingId,jdbcType=INTEGER}, </if> <if test="payment != null"> #{payment,jdbcType=DECIMAL}, </if> <if test="paymentType != null"> #{paymentType,jdbcType=INTEGER}, </if> <if test="postage != null"> #{postage,jdbcType=INTEGER}, </if> <if test="status != null"> #{status,jdbcType=INTEGER}, </if> <if test="paymentTime != null"> #{paymentTime,jdbcType=TIMESTAMP}, </if> <if test="sendTime != null"> #{sendTime,jdbcType=TIMESTAMP}, </if> <if test="endTime != null"> #{endTime,jdbcType=TIMESTAMP}, </if> <if test="closeTime != null"> #{closeTime,jdbcType=TIMESTAMP}, </if> <if test="createTime != null"> #{createTime,jdbcType=TIMESTAMP}, </if> <if test="updateTime != null"> #{updateTime,jdbcType=TIMESTAMP}, </if> </trim> </insert> ```

java Error querying database 新手求详解

### Error querying database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'evaluation_additional_status' in 'field list' ### The error may involve com.leimingtech.service.module.trade.dao.mapper.OrderMapper.findOrderList-Inline ### The error occurred while setting parameters ### Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'evaluation_additional_status' in 'field list' ; bad SQL grammar []; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'evaluation_additional_status' in 'field list' org.springframework.jdbc.BadSqlGrammarException: ### Error querying database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'evaluation_additional_status' in 'field list' ### The error may involve com.leimingtech.service.module.trade.dao.mapper.OrderMapper.findOrderList-Inline ### The error occurred while setting parameters ### Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'evaluation_additional_status' in 'field list' ; bad SQL grammar []; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'evaluation_additional_status' in 'field list' %09at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:231) ~[spring-jdbc-4.1.4.RELEASE.jar:4.1.4.RELEASE] %09at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:73) ~[spring-jdbc-4.1.4.RELEASE.jar:4.1.4.RELEASE] %09at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:73) ~[mybatis-spring-1.2.2.jar:1.2.2] %09at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:371) ~[mybatis-spring-1.2.2.jar:1.2.2] %09at com.sun.proxy.$Proxy40.selectList(Unknown Source) ~[?:?] %09at org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:198) ~[mybatis-spring-1.2.2

应用程序异常,访问的页面出现异常

org.springframework.jdbc.BadSqlGrammarException: ### Error querying database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: FUNCTION fhadmin.LOANPERIOD does not exist ### The error may exist in file [D:\tomcat\apache-tomcat-7.0.57\webapps\FHADMINM\WEB-INF\classes\mybatis1\interest\InterestMapper.xml] ### The error may involve InterestMapper.datalistPage-Inline ### The error occurred while setting parameters ### Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: FUNCTION fhadmin.LOANPERIOD does not exist ; bad SQL grammar []; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: FUNCTION fhadmin.LOANPERIOD does not exist InteresMapper.xml如下: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="InterestMapper"> <!--表名 --> <sql id="tableName"> TB_INTERESTINTEREST </sql> <!-- 字段 --> <sql id="Field"> CLIENTNAME, PRODUCTNAME, GUARANTEEMETHOD, LOANPAYMENTAMOUNT, LOANPERIOD(MONTHS), ACCOUNTOPENINGDATE, DATEOFEXPIRY, LENDINGRATE, LENDINGRATE(MONTH), LOANBALANCE, WRITEOFFTHEPRINCIPAL, ARREARS, IRREVOCABLEINTEREST, ACCOUNTSTATUS, DATEOFCLASSIFICATION, CLASSIFICATIONRESULT, HANDLINGBANK, ATTN, INTEREST_ID </sql> <!-- 字段值 --> <sql id="FieldValue"> #{CLIENTNAME}, #{PRODUCTNAME}, #{GUARANTEEMETHOD}, #{LOANPAYMENTAMOUNT}, #{LOANPERIOD(MONTHS)}, #{ACCOUNTOPENINGDATE}, #{DATEOFEXPIRY}, #{LENDINGRATE}, #{LENDINGRATE(MONTH)}, #{LOANBALANCE}, #{WRITEOFFTHEPRINCIPAL}, #{ARREARS}, #{IRREVOCABLEINTEREST}, #{ACCOUNTSTATUS}, #{DATEOFCLASSIFICATION}, #{CLASSIFICATIONRESULT}, #{HANDLINGBANK}, #{ATTN}, #{INTEREST_ID} </sql> <!-- 新增--> <insert id="save" parameterType="pd"> insert into <include refid="tableName"></include> ( <include refid="Field"></include> ) values ( <include refid="FieldValue"></include> ) </insert> <!-- 删除--> <delete id="delete" parameterType="pd"> delete from <include refid="tableName"></include> where INTEREST_ID = #{INTEREST_ID} </delete> <!-- 修改 --> <update id="edit" parameterType="pd"> update <include refid="tableName"></include> set CLIENTNAME = #{CLIENTNAME}, PRODUCTNAME = #{PRODUCTNAME}, GUARANTEEMETHOD = #{GUARANTEEMETHOD}, LOANPAYMENTAMOUNT = #{LOANPAYMENTAMOUNT}, LOANPERIOD(MONTHS) = #{LOANPERIOD(MONTHS)}, ACCOUNTOPENINGDATE = #{ACCOUNTOPENINGDATE}, DATEOFEXPIRY = #{DATEOFEXPIRY}, LENDINGRATE = #{LENDINGRATE}, LENDINGRATE(MONTH) = #{LENDINGRATE(MONTH)}, LOANBALANCE = #{LOANBALANCE}, WRITEOFFTHEPRINCIPAL = #{WRITEOFFTHEPRINCIPAL}, ARREARS = #{ARREARS}, IRREVOCABLEINTEREST = #{IRREVOCABLEINTEREST}, ACCOUNTSTATUS = #{ACCOUNTSTATUS}, DATEOFCLASSIFICATION = #{DATEOFCLASSIFICATION}, CLASSIFICATIONRESULT = #{CLASSIFICATIONRESULT}, HANDLINGBANK = #{HANDLINGBANK}, ATTN = #{ATTN}, INTEREST_ID = INTEREST_ID where INTEREST_ID = #{INTEREST_ID} </update> <!-- 通过ID获取数据 --> <select id="findById" parameterType="pd" resultType="pd"> select <include refid="Field"></include> from <include refid="tableName"></include> where INTEREST_ID = #{INTEREST_ID} </select> <!-- 列表 --> <select id="datalistPage" parameterType="page" resultType="pd"> select <include refid="Field"></include> from <include refid="tableName"></include> where 1=1 <if test="pd.keywords!= null and pd.keywords != ''"><!-- 关键词检索 --> and ( <!-- 根据需求自己加检索条件 字段1 LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%') or 字段2 LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%') --> ) </if> </select> <!-- 列表(全部) --> <select id="listAll" parameterType="pd" resultType="pd"> select <include refid="Field"></include> from <include refid="tableName"></include> </select> <!-- 批量删除 --> <delete id="deleteAll" parameterType="String"> delete from <include refid="tableName"></include> where INTEREST_ID in <foreach item="item" index="index" collection="array" open="(" separator="," close=")"> #{item} </foreach> </delete> </mapper>

网页报错显示应用程序异常

org.springframework.jdbc.BadSqlGrammarException: ### Error querying database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''S NAME, PRODUCT CLASS NAME, GUARANTEE METHOD, LOAN AMOUNT, LOAN TE' at line 3 ### The error may exist in file [D:\tomcat\apache-tomcat-7.0.57\webapps\FHADMINM\WEB-INF\classes\mybatis1\information\InterestMapper.xml] ### The error may involve InterestMapper.datalistPage-Inline ### The error occurred while setting parameters ### Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''S NAME, PRODUCT CLASS NAME, GUARANTEE METHOD, LOAN AMOUNT, LOAN TE' at line 3 ; bad SQL grammar []; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''S NAME, PRODUCT CLASS NAME, GUARANTEE METHOD, LOAN AMOUNT, LOAN TE' at line 3

MYBATIS 批量update 报错的问题

批量update,很简单的sql语句,可是一直在报错。不知道为什么,求助!!! <update id="updateStudentPointLevelBatch" parameterType="java.util.List"> <foreach collection="list" item="item" index="index" open="" close="" separator=";"> update student_point_level s set s.score = #{item.score} where s.id = #{item.id} </foreach> </update> 按照打印出来的sql,贴到front里运行的也都是对的.... ### Error updating database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'update student_point_level s set s.score = 16 where s.id = 19' at line 7 ### The error may involve com.supert.st.dao.StudentPointLevelMapper.updateStudentPointLevelBatch-Inline ### The error occurred while setting parameters ### SQL: update student_point_level s set s.score = ? where s.id = ? ; update student_point_level s set s.score = ? where s.id = ? ### Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'update student_point_level s set s.score = 16 where s.id = 19' at line 7 ; bad SQL grammar []; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'update student_point_level s set s.score = 16 where s.id = 19' at line 7

activiti 添加bpmn文件报错

activiti 添加bpmn文件时报错:请教下各位 (关键是:有的bpmn文件可以正常添加,有的文件就会报如下错误:) 我的代码: InputStream inputStreamBpmn = this.getClass().getResourceAsStream("exclusiveGateway.bpmn"); Deployment deployment = processEngine.getRepositoryService() .createDeployment() .addInputStream("exclusiveGateway.bpmn", inputStreamBpmn) .deploy(); 下面是报错信息: org.apache.ibatis.exceptions.PersistenceException: ### Error updating database. Cause: java.sql.SQLException: ORA-01460: 转换请求无法实施或不合理 ### The error may involve org.activiti.engine.impl.persistence.entity.ResourceEntity.insertResource-Inline ### The error occurred while setting parameters ### SQL: insert into ACT_GE_BYTEARRAY(ID_, REV_, NAME_, BYTES_, DEPLOYMENT_ID_, GENERATED_) values (?, 1, ?, ?, ?, ?) ### Cause: java.sql.SQLException: ORA-01460: 转换请求无法实施或不合理

SpringMVC的sql语句问题

![图片说明](https://img-ask.csdn.net/upload/201606/16/1466074177_318575.png) 这个插入语句有问题吗?急求 报下面这个错 ### Error updating database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 3 ### The error may involve com.tms.util.mapper.DictMapper.insertModule-Inline ### The error occurred while setting parameters ### SQL: insert into WX_DICT_MODULE values ### Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 3 ] 18:39:34.377 [http-bio-8080-exec-6] DEBUG o.s.w.s.m.m.a.ExceptionHandlerExceptionResolver - Resolving exception from handler [public boolean com.tms.util.action.DictAction.saveModule(com.tms.util.bo.ModuleBo)]: org.springframework.jdbc.BadSqlGrammarException: ### Error updating database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 3 ### The error may involve com.tms.util.mapper.DictMapper.insertModule-Inline ### The error occurred while setting parameters ### SQL: insert into WX_DICT_MODULE values

我这sql语句怎么一直报错?

``` insert into singer(id,name,gender,age,imgurl,type,annotation) values (#{id},#{name},#{gender},#{age},#{imgurl},#{type},#{annotation}) ``` ``` org.springframework.jdbc.BadSqlGrammarException: ### Error updating database. Cause: java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'rank,telphone,annotation) values (33,'33',null,null,null,null)' at line 1 ### The error may exist in file [E:\java\develop\javacode\spring-boot\target\classes\mapper\Admin_userMapper.xml] ### The error may involve defaultParameterMap ### The error occurred while setting parameters ### SQL: insert into admin_user(id,name,gender,rank,telphone,annotation) values (?,?,?,?,?,?) ### Cause: java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'rank,telphone,annotation) values (33,'33',null,null,null,null)' at line 1 ; bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'rank,telphone,annotation) values (33,'33',null,null,null,null)' at line 1 ```

关于mybatis的sqlxml文件中mysql分页问题

当LIMIT #{startNumber},#{showNumber}这样写时会报错。 换成LIMIT 0,10 就不会报错了。什么原因?jdbc驱动jar也换了还是报错。求解。 ``` Database product name cached for DataSource [org.apache.commons.dbcp.BasicDataSource@142bec44]: name is 'MySQL' [org.springframework.jdbc.support.SQLErrorCodesFactory] - SQL error codes for 'MySQL' found [org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator] - Translating SQLException with SQL state '42000', error code '1064', message [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''1','15'' at line 4]; SQL was [] for task [ ### Error querying database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''1','15'' at line 4 ### The error may exist in file [D:\develop\java\tomcat\webapps\adream\WEB-INF\classes\com\dream\mapping\fixedassets\CommoditySQL.xml] ### The error may involve com.dream.fixedassets.dao.CommodityDao.commodityList-Inline ### The error occurred while setting parameters ### SQL: select * from l_commodity order BY p_number LIMIT ?,? ### Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''1','15'' at line 4 ] 六月 10, 2016 11:11:14 上午 org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet [SpringMVC] in context with path [/adream] threw exception [Request processing failed; nested exception is org.springframework.jdbc.BadSqlGrammarException: ### Error querying database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''1','15'' at line 4 ### The error may exist in file [D:\develop\java\tomcat\webapps\adream\WEB-INF\classes\com\dream\mapping\fixedassets\CommoditySQL.xml] ### The error may involve com.dream.fixedassets.dao.CommodityDao.commodityList-Inline ### The error occurred while setting parameters ### SQL: select * from l_commodity order BY p_number LIMIT ?,? ```

Could not get JDBC Connection

org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException: ### Error querying database. Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class 'com.microsoft.sqlserver.jdbc.SQLServerDriver' ### The error may exist in cn/drzk/wanda/cinema/dao/form/dao/TicketsFromDao.java (best guess) ### The error may involve cn.drzk.wanda.cinema.dao.form.dao.TicketsFromDao.count ### The error occurred while executing a query ### Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class 'com.microsoft.sqlserver.jdbc.SQLServerDriver'

Spring+mybatis+db2 查询sql报错

Spring+mybatis+db2(aix环境) 查询sql报错,用主键查询或者是数据查询正常。。 用字符串查询报错。代码如下。 Caused by: org.apache.ibatis.exceptions.PersistenceException: ### Error querying database. Cause: java.lang.NullPointerException ### The error may exist in com/tecsun/platform/model/Userone.xml ### The error may involve defaultParameterMap ### The error occurred while setting parameters ### SQL: select * from user where name=? ### Cause: java.lang.NullPointerException 代码如下 。 <select id="selectUsers" parameterType="name" resultType="UserOne"> select * from user where name=#{name} </select> 。。。有人知道吗? 在Windows下面查询db2数据库正常。。。。。

2019 Python开发者日-培训

2019 Python开发者日-培训

150讲轻松搞定Python网络爬虫

150讲轻松搞定Python网络爬虫

设计模式(JAVA语言实现)--20种设计模式附带源码

设计模式(JAVA语言实现)--20种设计模式附带源码

YOLOv3目标检测实战:训练自己的数据集

YOLOv3目标检测实战:训练自己的数据集

java后台+微信小程序 实现完整的点餐系统

java后台+微信小程序 实现完整的点餐系统

三个项目玩转深度学习(附1G源码)

三个项目玩转深度学习(附1G源码)

初级玩转Linux+Ubuntu(嵌入式开发基础课程)

初级玩转Linux+Ubuntu(嵌入式开发基础课程)

2019 AI开发者大会

2019 AI开发者大会

玩转Linux:常用命令实例指南

玩转Linux:常用命令实例指南

一学即懂的计算机视觉(第一季)

一学即懂的计算机视觉(第一季)

4小时玩转微信小程序——基础入门与微信支付实战

4小时玩转微信小程序——基础入门与微信支付实战

Git 实用技巧

Git 实用技巧

Python数据清洗实战入门

Python数据清洗实战入门

使用TensorFlow+keras快速构建图像分类模型

使用TensorFlow+keras快速构建图像分类模型

实用主义学Python(小白也容易上手的Python实用案例)

实用主义学Python(小白也容易上手的Python实用案例)

程序员的算法通关课:知己知彼(第一季)

程序员的算法通关课:知己知彼(第一季)

MySQL数据库从入门到实战应用

MySQL数据库从入门到实战应用

机器学习初学者必会的案例精讲

机器学习初学者必会的案例精讲

手把手实现Java图书管理系统(附源码)

手把手实现Java图书管理系统(附源码)

极简JAVA学习营第四期(报名以后加助教微信:eduxy-1)

极简JAVA学习营第四期(报名以后加助教微信:eduxy-1)

.net core快速开发框架

.net core快速开发框架

玩转Python-Python3基础入门

玩转Python-Python3基础入门

Python数据挖掘简易入门

Python数据挖掘简易入门

微信公众平台开发入门

微信公众平台开发入门

程序员的兼职技能课

程序员的兼职技能课

Windows版YOLOv4目标检测实战:训练自己的数据集

Windows版YOLOv4目标检测实战:训练自己的数据集

HoloLens2开发入门教程

HoloLens2开发入门教程

微信小程序开发实战

微信小程序开发实战

Java8零基础入门视频教程

Java8零基础入门视频教程

相关热词 c# cad插入影像 c#设计思想 c#正则表达式 转换 c#form复制 c#写web c# 柱形图 c# wcf 服务库 c#应用程序管理器 c#数组如何赋值给数组 c#序列化应用目的博客园
立即提问