SQL java.sql.SQLException: Parameter metadata not available for the given statement
問題:java.sql.SQLException: Parameter metadata not available for the given statement
意思說:對於給定語句的引數後設資料不可用(連線資料庫時的URL需要加上後設資料型別)
generateSimpleParameterMetadata=true (生成簡單的引數後設資料)
這裡寫上generateSimpleParameterMetadata=true
就解決了。
eg:jdbc.url=jdbc:mysql://192.168.0.221:3306/demo?useUnicode=true&generateSimpleParameterMetadata=true
預設情況下是為false的,下面兩種情況是一樣的:
eg:jdbc.url=jdbc:mysql://192.168.0.221:3306/demo?useUnicode=true&generateSimpleParameterMetadata=false
eg:jdbc.url=jdbc:mysql://192.168.0.221:3306/demo?useUnicode=true
因為mysql驅動預設generateSimpleParameterMetadata=false只有設定為true metadata型別會將每一個引數反射為Varchar型別
可能參考什麼是資料庫的後設資料:
http://baike.baidu.com/link?url=F8uhezUUTC4aXBrxBQ7b2pgSaSll6xTgEZf1whRK9ycH_buh2ClqLoOoI50RPxKZhM1qR2aehM0YsHzTQmDpY_
相關文章
- java.sql.SQLException: No value specified for parameter 1 異常分析JavaSQLException
- java.sql.SQLException: Parameter index out of range (3 > number of parameters, which is 2)的解決方法JavaSQLExceptionIndex
- 解決Parameter '__frch_item_0' not found. Available parameters 問題AI
- java.sql.SQLException: Incorrect string valueJavaSQLException
- java.sql.SQLException: 數字溢位JavaSQLException
- java.sql.SQLException: Fail to convert to internal representationJavaSQLExceptionAI
- java.sql.SQLException: The server time zone value ‘???ú±ê×??±??‘ is unrecognized or represents moreJavaSQLExceptionServerZed
- java.sql.SQLException:IO 錯誤:Socket read timed out !JavaSQLException
- java.sql.SQLException: Access denied for user ‘root‘@‘localhost‘ (using password: YES)JavaSQLExceptionlocalhost
- MyBatis - java.sql.SQLException: 無效的列型別: 1111MyBatisJavaSQLException型別
- Statement
- 360 Atals:Cause: java.sql.SQLException: Proxy Warning - near “status“: syntax errorJavaSQLExceptionError
- No qualifying bean of type 'javax.sql.DataSource' available: expected at least 1BeanJavaSQLAIAST
- java.sql.SQLException: The server time zone value ‘Öйú±ê׼ʱ¼ä‘ is unrecognized...報錯解決JavaSQLExceptionServerZed
- Required parameter $xxx follows optional parameter $yyyUI
- java.sql.SQLException: ORA-00923: 未找到要求的 FROM 關鍵字JavaSQLException
- SpringBoot中yml配置java.sql.SQLException: Access denied for user ‘root‘@‘localhost‘ (using password: NOSpring BootJavaSQLExceptionlocalhost
- Caused by: java.sql.SQLException: Access denied for user 'dell-pc'@'xxxxx' (using password: YES)JavaSQLException
- Qt MetadataQT
- Caused by: java.sql.SQLException: 無法從套接字讀取更多的資料JavaSQLException
- Idea資料庫引入異常:java.sql.SQLException: The server time zone value ‘Öйú±ê׼ʱ¼ä‘ is unrecognizedIdea資料庫JavaSQLExceptionServerZed
- 資料庫報錯java.sql.SQLException: Field ‘id‘ doesn‘t have a default value資料庫JavaSQLException
- UNREFERENCED_PARAMETER
- MySQL案例04:Cause: java.sql.SQLException: Could not retrieve transaction read-only status from serverMySqlJavaExceptionServer
- 8.11.4 Metadata Locking
- 2.3.2.2.1 Metadata Links
- 解析arxiv Metadata
- hibernate配置級聯刪除時報錯:could not execute statement; SQL [n/a]; constraint [null]SQLAINull
- No instances available for XXXAI
- JS - if else and else if statementJS
- The version given was unknown or has no registered routes.
- GCC編譯遇到“a label can only be part of a statement and a declaration is not a statement”問題GC編譯
- v$parameter gv$parameter 檢視 DDL 與隱含引數
- LTSPICE parameter設定
- python parameter引數Python
- MySQL:You must reset your password using ALTER USER statement before executing this statement.MySql
- Caused by: org.apache.ibatis.binding.BindingException: Parameter 'parameter' not found.解決ApacheBATException
- 2.1.3.2 Metadata and Data Links
- @EnableAsync annotation metadata was not injected