I have not noticed this problem before, and I never set the Jdbctype with Ibatis. Ibatis also does not appear to be the problem. Study the
——————————————————————————————————————————————
Reprinted from: http://makemyownlife.iteye.com/blog/1610021
Encountered a problem the day before yesterday the exception appears as follows: reference
Exception in thread ' main ' org.springframework.jdbc.UncategorizedSQLException:Error setting null for parameter #6 with Jd Bctype other. Try setting a different jdbctype for this parameter or a different jdbctypefornull the configuration property. Cause:java.sql.SQLException: Invalid column type: 1111
; Uncategorized SQLException for SQL []; SQL state [99999]; Error code [17004]; Invalid column type: 1111; Nested exception is java.sql.SQLException: Invalid column type: 1111
The corresponding sqlmap are as follows:
XML code <insert id= "Insertcustomerlog" parametertype= "map" > insert into customer_log ( ID, customer_ service_user_name, user_name, CONTENT, LOG_FIRST_TYPE, STATUS, LINKED_ID, FEE, account_first_type, ACCOUNT_SECOND_TYPE, ACCOUNT_THIRD_TYPE, LOG_SECOND_TYPE, log_ip, MEMO ) values ( seq_customer_ log.nextval , #{ customerserviceusername} , #{username}, #{ content}, #{logfirsttype}, #{status}, #{linkedId}, #{fee}, #{accountFirstType}, #{accountSecondType}, #{accountThirdType}, #{logSecondType}, #{logIp}, #{memo} ) </insert>
Some information has been queried to say:
Reference
MyBatis you want to insert a null value, you need to specify Jdbctype
MyBatis insert NULL returns an empty value exception, but PL/SQL does not prompt for errors, mainly because MyBatis cannot be converted.
So change the XML to:
XML code <insert id= "InsertCustomerLog1" parametertype= " Com.diyicai.customer.domain.CustomerLog "> insert into customer_log ( ID, CUSTOMER_SERVICE_USER_NAME, user_name , CONTENT, LOG_FIRST_TYPE, status, LINKED_ID, FEE, ACCOUNT_FIRST_TYPE, ACCOUNT_SECOND_TYPE, ACCOUNT_THIRD_TYPE, LOG_SECOND_TYPE, LOG_IP, MEMO ) values ( seq_customer_log.nextval , #{customerServiceUserName,jdbcType=VARCHAR} , #{username, jdbctype=varchar}, #{content,jdbcType=VARCHAR}, #{logFirstType,jdbcType=NUMERIC}, #{status,jdbctype=numeric}, #{linkedId,jdbcType=VARCHAR}, #{fee,jdbctype= numeric}, #{accountFirstType,jdbcType=NUMERIC}, #{accountSecondType,jdbcType=NUMERIC}, #{accountThirdType,jdbcType=NUMERIC}, #{ logsecondtype,jdbctype=numeric}, &NBSP;&NBSP;&NBSP;&NBSP;#{LOGIP,jdbctype=varchar},