Mybatis SQLException with Error code '911', Extracted SQL state class '42' from value '42000'
来源:互联网 发布:中国软件发展趋势 编辑:程序博客网 时间:2024/06/05 12:01
- 问题:
- MyBatis 查询Oracle数据库表或者视图,一直很正常,直到今天有一个需求需要查询数据库的系统表all_tab_columns,然后就报出这个错误
- 一开始我以为MyBatis不能直接查询数据库系统表,网上还搜不出MyBatis查询系统表相关问题
- 所以我后来用一个视图存储查询结果,然后MyBatis直接查询视图,发现还是这个错误,于是觉得问题不在这里
- 最后,经过一系列排查和师兄的帮助下,才发现,原来是查询语句最后多了一个’;‘,无效字符,然后报出一系列不知道什么的错误,在此记录一下。
2017-11-03 14:45:59.897 [http-bio-80-exec-26] DEBUG c.t.i.T.m.T.queryUploadFieldsDetailsColumns -ooo Using Connection [com.mchange.v2.c3p0.impl.NewProxyConnection@17c60929]2017-11-03 14:45:59.898 [http-bio-80-exec-26] DEBUG c.t.i.T.m.T.queryUploadFieldsDetailsColumns -==> Preparing: select a.COLUMN_NAME as "columnName" from IAS_UPLOAD_FIELDS_DETAILS_COL a ORDER BY a.COLUMN_ID; 2017-11-03 14:45:59.898 [http-bio-80-exec-26] DEBUG c.t.i.T.m.T.queryUploadFieldsDetailsColumns -==> Parameters: 2017-11-03 14:45:59.924 [http-bio-80-exec-26] DEBUG o.s.core.env.StandardEnvironment -Initializing new StandardEnvironment2017-11-03 14:45:59.924 [http-bio-80-exec-26] DEBUG o.s.core.env.StandardEnvironment -Adding [systemProperties] PropertySource with lowest search precedence2017-11-03 14:45:59.924 [http-bio-80-exec-26] DEBUG o.s.core.env.StandardEnvironment -Adding [systemEnvironment] PropertySource with lowest search precedence2017-11-03 14:45:59.924 [http-bio-80-exec-26] DEBUG o.s.core.env.StandardEnvironment -Initialized StandardEnvironment with PropertySources [systemProperties,systemEnvironment]2017-11-03 14:45:59.924 [http-bio-80-exec-26] INFO o.s.b.f.xml.XmlBeanDefinitionReader -Loading XML bean definitions from class path resource [org/springframework/jdbc/support/sql-error-codes.xml]2017-11-03 14:45:59.925 [http-bio-80-exec-26] DEBUG o.s.b.f.xml.DefaultDocumentLoader -Using JAXP provider [org.apache.xerces.jaxp.DocumentBuilderFactoryImpl]2017-11-03 14:45:59.926 [http-bio-80-exec-26] DEBUG o.s.b.factory.xml.BeansDtdResolver -Found beans DTD [http://www.springframework.org/dtd/spring-beans-2.0.dtd] in classpath: spring-beans-2.0.dtd2017-11-03 14:45:59.928 [http-bio-80-exec-26] DEBUG o.s.b.f.x.DefaultBeanDefinitionDocumentReader -Loading bean definitions2017-11-03 14:45:59.933 [http-bio-80-exec-26] DEBUG o.s.b.f.s.DefaultListableBeanFactory -Creating shared instance of singleton bean 'DB2'2017-11-03 14:45:59.933 [http-bio-80-exec-26] DEBUG o.s.b.f.s.DefaultListableBeanFactory -Creating instance of bean 'DB2'2017-11-03 14:45:59.933 [http-bio-80-exec-26] DEBUG o.s.b.f.s.DefaultListableBeanFactory -Eagerly caching bean 'DB2' to allow for resolving potential circular references2017-11-03 14:45:59.938 [http-bio-80-exec-26] DEBUG o.s.b.f.s.DefaultListableBeanFactory -Finished creating instance of bean 'DB2'2017-11-03 14:45:59.938 [http-bio-80-exec-26] DEBUG o.s.b.f.s.DefaultListableBeanFactory -Creating shared instance of singleton bean 'Derby'2017-11-03 14:45:59.938 [http-bio-80-exec-26] DEBUG o.s.b.f.s.DefaultListableBeanFactory -Creating instance of bean 'Derby'2017-11-03 14:45:59.938 [http-bio-80-exec-26] DEBUG o.s.b.f.s.DefaultListableBeanFactory -Eagerly caching bean 'Derby' to allow for resolving potential circular references2017-11-03 14:45:59.938 [http-bio-80-exec-26] DEBUG o.s.b.f.s.DefaultListableBeanFactory -Finished creating instance of bean 'Derby'2017-11-03 14:45:59.938 [http-bio-80-exec-26] DEBUG o.s.b.f.s.DefaultListableBeanFactory -Creating shared instance of singleton bean 'H2'2017-11-03 14:45:59.938 [http-bio-80-exec-26] DEBUG o.s.b.f.s.DefaultListableBeanFactory -Creating instance of bean 'H2'2017-11-03 14:45:59.938 [http-bio-80-exec-26] DEBUG o.s.b.f.s.DefaultListableBeanFactory -Eagerly caching bean 'H2' to allow for resolving potential circular references2017-11-03 14:45:59.939 [http-bio-80-exec-26] DEBUG o.s.b.f.s.DefaultListableBeanFactory -Finished creating instance of bean 'H2'2017-11-03 14:45:59.939 [http-bio-80-exec-26] DEBUG o.s.b.f.s.DefaultListableBeanFactory -Creating shared instance of singleton bean 'HSQL'2017-11-03 14:45:59.939 [http-bio-80-exec-26] DEBUG o.s.b.f.s.DefaultListableBeanFactory -Creating instance of bean 'HSQL'2017-11-03 14:45:59.939 [http-bio-80-exec-26] DEBUG o.s.b.f.s.DefaultListableBeanFactory -Eagerly caching bean 'HSQL' to allow for resolving potential circular references2017-11-03 14:45:59.939 [http-bio-80-exec-26] DEBUG o.s.b.f.s.DefaultListableBeanFactory -Finished creating instance of bean 'HSQL'2017-11-03 14:45:59.939 [http-bio-80-exec-26] DEBUG o.s.b.f.s.DefaultListableBeanFactory -Creating shared instance of singleton bean 'Informix'2017-11-03 14:45:59.939 [http-bio-80-exec-26] DEBUG o.s.b.f.s.DefaultListableBeanFactory -Creating instance of bean 'Informix'2017-11-03 14:45:59.939 [http-bio-80-exec-26] DEBUG o.s.b.f.s.DefaultListableBeanFactory -Eagerly caching bean 'Informix' to allow for resolving potential circular references2017-11-03 14:45:59.939 [http-bio-80-exec-26] DEBUG o.s.b.f.s.DefaultListableBeanFactory -Finished creating instance of bean 'Informix'2017-11-03 14:45:59.939 [http-bio-80-exec-26] DEBUG o.s.b.f.s.DefaultListableBeanFactory -Creating shared instance of singleton bean 'MS-SQL'2017-11-03 14:45:59.939 [http-bio-80-exec-26] DEBUG o.s.b.f.s.DefaultListableBeanFactory -Creating instance of bean 'MS-SQL'2017-11-03 14:45:59.939 [http-bio-80-exec-26] DEBUG o.s.b.f.s.DefaultListableBeanFactory -Eagerly caching bean 'MS-SQL' to allow for resolving potential circular references2017-11-03 14:45:59.939 [http-bio-80-exec-26] DEBUG o.s.b.f.s.DefaultListableBeanFactory -Finished creating instance of bean 'MS-SQL'2017-11-03 14:45:59.939 [http-bio-80-exec-26] DEBUG o.s.b.f.s.DefaultListableBeanFactory -Creating shared instance of singleton bean 'MySQL'2017-11-03 14:45:59.939 [http-bio-80-exec-26] DEBUG o.s.b.f.s.DefaultListableBeanFactory -Creating instance of bean 'MySQL'2017-11-03 14:45:59.939 [http-bio-80-exec-26] DEBUG o.s.b.f.s.DefaultListableBeanFactory -Eagerly caching bean 'MySQL' to allow for resolving potential circular references2017-11-03 14:45:59.939 [http-bio-80-exec-26] DEBUG o.s.b.f.s.DefaultListableBeanFactory -Finished creating instance of bean 'MySQL'2017-11-03 14:45:59.939 [http-bio-80-exec-26] DEBUG o.s.b.f.s.DefaultListableBeanFactory -Creating shared instance of singleton bean 'Oracle'2017-11-03 14:45:59.939 [http-bio-80-exec-26] DEBUG o.s.b.f.s.DefaultListableBeanFactory -Creating instance of bean 'Oracle'2017-11-03 14:45:59.939 [http-bio-80-exec-26] DEBUG o.s.b.f.s.DefaultListableBeanFactory -Eagerly caching bean 'Oracle' to allow for resolving potential circular references2017-11-03 14:45:59.941 [http-bio-80-exec-26] DEBUG o.s.b.f.s.DefaultListableBeanFactory -Finished creating instance of bean 'Oracle'2017-11-03 14:45:59.941 [http-bio-80-exec-26] DEBUG o.s.b.f.s.DefaultListableBeanFactory -Creating shared instance of singleton bean 'PostgreSQL'2017-11-03 14:45:59.941 [http-bio-80-exec-26] DEBUG o.s.b.f.s.DefaultListableBeanFactory -Creating instance of bean 'PostgreSQL'2017-11-03 14:45:59.941 [http-bio-80-exec-26] DEBUG o.s.b.f.s.DefaultListableBeanFactory -Eagerly caching bean 'PostgreSQL' to allow for resolving potential circular references2017-11-03 14:45:59.942 [http-bio-80-exec-26] DEBUG o.s.b.f.s.DefaultListableBeanFactory -Finished creating instance of bean 'PostgreSQL'2017-11-03 14:45:59.942 [http-bio-80-exec-26] DEBUG o.s.b.f.s.DefaultListableBeanFactory -Creating shared instance of singleton bean 'Sybase'2017-11-03 14:45:59.942 [http-bio-80-exec-26] DEBUG o.s.b.f.s.DefaultListableBeanFactory -Creating instance of bean 'Sybase'2017-11-03 14:45:59.942 [http-bio-80-exec-26] DEBUG o.s.b.f.s.DefaultListableBeanFactory -Eagerly caching bean 'Sybase' to allow for resolving potential circular references2017-11-03 14:45:59.942 [http-bio-80-exec-26] DEBUG o.s.b.f.s.DefaultListableBeanFactory -Finished creating instance of bean 'Sybase'2017-11-03 14:45:59.942 [http-bio-80-exec-26] INFO o.s.j.support.SQLErrorCodesFactory -SQLErrorCodes loaded: [DB2, Derby, H2, HSQL, Informix, MS-SQL, MySQL, Oracle, PostgreSQL, Sybase]2017-11-03 14:45:59.956 [http-bio-80-exec-26] DEBUG o.s.jdbc.datasource.DataSourceUtils -Returning JDBC Connection to DataSource2017-11-03 14:45:59.956 [http-bio-80-exec-26] DEBUG o.s.j.support.SQLErrorCodesFactory -Database product name cached for DataSource [com.mchange.v2.c3p0.ComboPooledDataSource@19d63f9b]: name is 'Oracle'2017-11-03 14:45:59.957 [http-bio-80-exec-26] DEBUG o.s.j.support.SQLErrorCodesFactory -SQL error codes for 'Oracle' found2017-11-03 14:45:59.957 [http-bio-80-exec-26] DEBUG o.s.j.s.SQLErrorCodeSQLExceptionTranslator -Unable to translate SQLException with Error code '911', will now try the fallback translator2017-11-03 14:45:59.957 [http-bio-80-exec-26] DEBUG o.s.j.s.SQLStateSQLExceptionTranslator -Extracted SQL state class '42' from value '42000'2017-11-03 14:45:59.958 [http-bio-80-exec-26] DEBUG org.mybatis.spring.SqlSessionUtils -Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@6c13312]2017-11-03 14:45:59.958 [http-bio-80-exec-26] DEBUG o.s.jdbc.datasource.DataSourceUtils -Returning JDBC Connection to DataSource
阅读全文
1 0
- Mybatis SQLException with Error code '911', Extracted SQL state class '42' from value '42000'
- Translating SQLException with SQL state '42000', error code '1064', message [You have an error in yo
- mybatis uncategorized SQLException for SQL []; SQL state [null]; error code [17004]; 无效的列类型
- SqlMapClient operation; uncategorized SQLException for SQL []; SQL state [null]; error code [0]; 异常解决
- 异常:SqlMapClient operation; uncategorized SQLException for SQL []; SQL state [null]; error code [0];
- uncategorized SQLException for SQL SQL state [null]; error code [17059] 无法转换为内部表示
- 异常:SqlMapClient operation; uncategorized SQLException for SQL []; SQL state [null]; error code [0];
- SqlMapClient operation; uncategorized SQLException for SQL []; SQL state [null]; error code [0];
- 1uncategorized SQLException for SQL []; SQL state [99999]; error code [17004]; 无效的列类型: 1111;
- SQLException for SQL [n/a]; SQL state [HY000]; error code [1366];
- SQL [ ]; SQL state [null]; error code [17004]; 无效的列类型; nested exception is java.sql.SQLException: 无效
- java.sql.SQLException: General error, message from server: "Field 'ID' doesn't have a default value
- 报错SQL state [null]; error code [17027]; 流已被关闭; nested exception is java.sql.SQLException: 流已被关闭
- java.sql.SQLException Error Code: 17002
- sql state:hy000,sql error code:605
- mybatis TypeHandler java.sql.SQLException: No value specified for parameter
- error:for SQL []; SQL state [null]; error code [0]
- java.sql.SQLException: Got error 28 from storage engine 解决方案
- log4net配置
- 《Machine Learning》学习笔记(4)–线性模型
- Android 事件总线 Otto
- Android项目中自定义顶部标题栏
- brew非root用户下使用php72和nginx
- Mybatis SQLException with Error code '911', Extracted SQL state class '42' from value '42000'
- ASP.NET MVC下判断用户登录和授权状态方法
- ######Nginx配置文件nginx.conf中文详解##### #定义Nginx运行的用户和用户组 user www www; #nginx进程数,建议设置为等于CPU总核心数。 worke
- Ajax跨域请求COOKIE无法带上的解决办法
- C++ 的模板中 typename 关键字的用法
- python django rest framework Serialization 的学习
- 操作GPIO其中的两种方法
- python-pip : Depends: python-setuptools (= 0.6c1) 问题
- S5PV210-uboot解析(四)-main_loop函数分析