1111; nested exception is java.sql.SQLException: 無效的列型別: 1111
引用 MyBatis 插入空值時,需要指定JdbcType
mybatis insert空值報空值異常,但是在pl/sql不會提示錯誤,主要原因是mybatis無法進行轉換,之後已檢視程式碼發現,果然自己的欄位有空值,
然後在每個欄位後面加上jdbcType,要指定插入型別#{item.deviceId,jdbcType=DECIMAL}, #{item.yuntaiType,jdbcType=DECIMAL},#{item.pixel,jdbcType=DECIMAL}, #{item.carmarType,jdbcType=DECIMAL},#{item.deviceFactoryType,jdbcType=DECIMAL}
jdbcType=DECIMAL
可以看出,是因為你傳入的引數的欄位為null物件無法獲取對應的jdbcType型別,而報的錯誤。你只要在insert語句中insert的物件加上jdbcType就可以了,修改如下:
#{menuTitle,jdbcType=VARCHAR}
這樣就可以解決以上錯誤了。
參考:http://blog.csdn.net/woniu4500/article/details/45568169
相關推薦
1111; nested exception is java.sql.SQLException: 無效的列型別: 1111
查詢了一下 一些資料說是: 引用 MyBatis 插入空值時,需要指定JdbcType mybatis insert空值報空值異常,但是在pl/sql不會提示錯誤,主要原因是mybatis無法進行轉換,之後已檢視程式碼發現,果然自己的欄位有空值, #{item.device
nested exception is java sql SQLException IO 錯誤
ror erro nested view bject all clas roo conn 1、錯誤描述 (mx.messaging.messages::ErrorMessage)#0 body = (null) clientId = "18CE3B03-970
; bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: ORA-00907: 缺失右括號
SELECT P.*, ROWNUM AS rowno FROM (SELECT * FROM "equipment_info","equipment_status","user","parking_lot" WHERE "equipment_info"."parking_id"="parkin
java.sql.SQLException: 無效的列類型: 1111
tin bug ted 映射 arc mark bsp iba 使用 在使用Mybaits Plus更新數據時報錯: 2018-09-05 10:55:40.712 DEBUG 15828 --- [nio-8110-exec-1] c.c.x.s.m.A.updateA
原因及解決:java.sql.SQLException: 無效的列型別: 1111
Mybatis中出現java.sql.SQLException: 無效的列型別: 1111 原因1:where 佔位符被傳遞了 NULL 在其他的部落格和一些論壇中有人說還有這個原因:where 後欄位既有String又有Integer造成型別衝突(經測試,不存在這個原因) &n
Cause: java.sql.SQLException: 無效的列型別: 1111解決
在頁面提交資料時,出現如下錯誤資訊: Error setting null for parameter #7 with JdbcType OTHER . Try setting a different JdbcType for this parameter or a dif
mybatis報錯:java.sql.SQLException: 無效的列型別: 1111
java.sql.SQLException: 無效的列型別: 1111 at oracle.jdbc.driver.OracleStatement.getInternalType(OracleStatement.java:3900) at oracle.jdbc.
mybatis向oracle新增資料報:java.sql.SQLException: 無效的列型別: 1111
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.type.TypeException: Could not set parameters for mapping
異常:Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentException
leg not 出現 resolve auto -s 啟動 文件名 書寫 這個異常是出現在註入配置文件中配置好的屬性時報錯的: Injection of autowired dependencies failed; nested exception is java.lan
error:org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.NullPointerException
poi return spring use fail err process sin mapping 問題:調用的方法在一個接口類中,但我並沒有註入那個被調用的類 解決:在UserEntity前加上@Autowired @Controller public class
Spring Boo報錯Unable to start embedded container; nested exception is java.lang.NoSuchMethodError: org
轉載地址:https://www.cnblogs.com/wushuai2014/p/7497206.html 問題描述:通過Spring Boot官方提供的方式,寫出如下HelloWorld程式碼。 org.springframework.context.ApplicationContex
Failed to instantiate No default constructor found; nested exception is java.lang.NoSuchMethodExcept
從網頁接受引數,引數多的情況下一般會定義一個類,來裝這些引數,比如UserParam這個類就是裝網頁裡面轉過來的 id、username、telephone等資訊。但是會發現在修改的時候會報如下錯誤。 報錯資訊如下: org.springframework.beans.BeanInsta
異常記錄 之 nested exception is java.lang.NoClassDefFoundError: com/lowagie/text/pdf/PdfContentByte
nested exception is java.lang.NoClassDefFoundError: com/lowagie/text/pdf/PdfContentByte 在MVC 整合jasperreport 的時候.遇到一個問題,老是報 java.lang.NoClassDefFound
Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is java.lang.Nu
java.lang.NullPointerException: null at com.book.app.web.UserController.findPageWith(UserController.java:50) ~[classes/:na] &
org.springframework.web.multipart.MultipartException: Failed to parse multipart servlet request; nested exception is java.io.IOException: The temporar
一、異常資訊 ROOT] is not valid at org.springframework.web.multipart.support.StandardMultipartHttpServletRequest.handleParseFailure(StandardMultipartHttpServlet
nested exception is java.io.FileNotFoundException: Could not open ServletContext resource [/jdbc.pro
問題所在: Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanInitializationExcept
spring關於nested exception is java.lang.NoClassDefFoundError: com/fasterxml/jackson/databind/exc/Inval
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.mvc.method.annotation.Re
SpringBoot之Filter攔截器的使用 — 獲取requestBody解決nested exception is java.io.IOException: Stream closed
直接問題處理過程 ; 異常如下: 異常摘要:I/O error while reading input message; nested exception is java.io.IOException: Stream closed org.springframework.http.
Spring與MyBatis整合錯誤:nested exception is java.lang.NoClassDefFoundError
最近在學習整合Spring與MyBatis時,出現了以下異常: Error creating bean with name 'sqlSessionFactoryBean' defined in class path resource [application-mybatis
Factory method 'redisConnectionFactory' threw exception; nested exception is java.lang.NoClassDefFou
springBoot 專案使用redis快取,專案啟動報錯: org.springframework.beans.factory.UnsatisfiedDependencyException: Erro