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: Prepared or callable statement has more than 2000 parameter markers及解決方案JavaSQLException
- 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
- expdp, impdp ORA-39213 Metadata processing not availableAI
- ORA-39213: Metadata processing is not available 解決方案AI
- java.sql.SQLException: Scope not recognizedJavaSQLExceptionZed
- Statement (操作 SQL 語句)SQL
- 解決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
- Event 10046 - Enable SQL Statement TraceSQL
- java.sql.SQLException: Io 異常: Connection refusedJavaSQLException
- ORA-01555 caused by SQL statement belowSQL
- IMP-00032: SQL statement exceeded buffer lengthSQL
- In PL/SQL,the statement of "into variable" wasn't appeared in statspackSQLAPP
- java.sql.SQLException: The server time zone value ‘???ú±ê×??±??‘ is unrecognized or represents moreJavaSQLExceptionServerZed
- Statement Tracer For Oracle 與 SQL Monitor 的比較OracleSQL
- java.sql.SQLException:IO 錯誤:Socket read timed out !JavaSQLException
- java.sql.SQLException: Access denied for user ‘root‘@‘localhost‘ (using password: YES)JavaSQLExceptionlocalhost
- java.sql.SQLException: '@P0' 附近有語法錯誤JavaSQLException
- jdbc連線sql server 出現 java.sql.SQLException: Network error IOException: Connection refused:JDBCSQLServerJavaExceptionError
- SQLT (SQLTXPLAIN) - Tool that helps to diagnose a SQL statement [ID 215187.1]SQLAI
- How to Run Statement Level/Java trace or a SQL Trace in Self Service ApplicationJavaSQLAPP
- 從Oracle11g impdp到oracle10g報錯ORA-39213: Metadata processing is not availableOracleAI
- java.sql.SQLException: The server time zone value ‘Öйú±ê׼ʱ¼ä‘ is unrecognized...報錯解決JavaSQLExceptionServerZed
- 360 Atals:Cause: java.sql.SQLException: Proxy Warning - near “status“: syntax errorJavaSQLExceptionError
- Caused by: java.sql.SQLException: 索引中丟失 IN 或 OUT 引數:: 1JavaSQLException索引
- TextInput should be given height
- 【實驗】【SQL_TRACE】使用sql_trace功能獲得show parameter的sql語句SQL
- Initialization Parameter Files and Server Parameter Files (287)Server
- MyBatis - java.sql.SQLException: 無效的列型別: 1111MyBatisJavaSQLException型別
- java.sql.SQLException: Io 異常: The Network Adapter could not establish the connecJavaSQLExceptionAPT
- takes 0 positional arguments but 1 was given
- No qualifying bean of type 'javax.sql.DataSource' available: expected at least 1BeanJavaSQLAIAST
- ORA-01555 caused by SQL statement below (Query Duration=0 sec, SCNSQL
- EVENT: 10046 "enable SQL statement tracing (including binds/waits)"SQLAI
- Oracle RDBMS : Flushing a Single SQL Statement out of the Object Library CacheOracleSQLObject