@wenshao ,使用druid连接池,一配置wall就报错:
<bean id="wall-filter" class="com.alibaba.druid.wall.WallFilter"> <property name="dbType" value="mysql" /> </bean>
<property name="proxyFilters"> <list> <ref bean="wall-filter"/> </list> </property>
[org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator] - Unable to translate SQLException with Error code '0', will now try the fallback translator 去掉上面的wall配置,则一切正常。
求解
补充下,用的是 1.0.16版本######详细错误提供一下,看是什么SQL无法解释######
[org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'transactionManager'
[org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'transactionManager'
[org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'transactionManager' to allow for resolving potential circular references
[org.springframework.beans.factory.support.DefaultListableBeanFactory] - Returning cached instance of singleton bean 'dataSource'
[org.springframework.beans.factory.support.DefaultListableBeanFactory] - Invoking afterPropertiesSet() on bean with name 'transactionManager'
[org.springframework.beans.factory.support.DefaultListableBeanFactory] - Returning cached instance of singleton bean 'org.springframework.transaction.config.internalTransactionAdvisor'
[org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'transactionManager'
[org.springframework.jdbc.datasource.DataSourceTransactionManager] - Creating new transaction with name [com.asgab.service.account.AccountService.findUserByLoginName]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT; ''
[org.springframework.jdbc.datasource.DataSourceTransactionManager] - Acquired Connection [com.alibaba.druid.proxy.jdbc.ConnectionProxyImpl@7c3c000f] for JDBC transaction
[org.springframework.jdbc.datasource.DataSourceTransactionManager] - Switching JDBC Connection [com.alibaba.druid.proxy.jdbc.ConnectionProxyImpl@7c3c000f] to manual commit
[org.mybatis.spring.SqlSessionUtils] - Creating a new SqlSession
[org.mybatis.spring.SqlSessionUtils] - Registering transaction synchronization for SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@66be17e3]
[org.mybatis.spring.transaction.SpringManagedTransaction] - JDBC Connection [com.alibaba.druid.proxy.jdbc.ConnectionProxyImpl@7c3c000f] will be managed by Spring
[com.asgab.repository.UserMapper.search] - ==> Preparing: select id, name,login_name as loginName, password,salt,roles,emailaudit,register_date as registerDate, email, financeEmail,company, department, function from ss_user where deleted = 1 and login_name=?
[org.mybatis.spring.SqlSessionUtils] - Releasing transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@66be17e3]
[org.springframework.core.env.StandardEnvironment] - Adding [systemProperties] PropertySource with lowest search precedence
[org.springframework.core.env.StandardEnvironment] - Adding [systemEnvironment] PropertySource with lowest search precedence
[org.springframework.core.env.StandardEnvironment] - Initialized StandardEnvironment with PropertySources [systemProperties,systemEnvironment]
[org.springframework.beans.factory.xml.XmlBeanDefinitionReader] - Loading XML bean definitions from class path resource [org/springframework/jdbc/support/sql-error-codes.xml]
[org.springframework.beans.factory.xml.DefaultDocumentLoader] - Using JAXP provider [com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl]
[org.springframework.beans.factory.xml.BeansDtdResolver] - Found beans DTD [http://www.springframework.org/dtd/spring-beans-2.0.dtd] in classpath: spring-beans-2.0.dtd
[org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader] - Loading bean definitions
[org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'DB2'
[org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'DB2'
[org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'DB2' to allow for resolving potential circular references
[org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'DB2'
[org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'Derby'
[org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'Derby'
[org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'Derby' to allow for resolving potential circular references
[org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'Derby'
[org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'H2'
[org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'H2'
[org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'H2' to allow for resolving potential circular references
[org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'H2'
[org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'HSQL'
[org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'HSQL'
[org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'HSQL' to allow for resolving potential circular references
[org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'HSQL'
[org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'Informix'
[org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'Informix'
[org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'Informix' to allow for resolving potential circular references
[org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'Informix'
[org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'MS-SQL'
[org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'MS-SQL'
[org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'MS-SQL' to allow for resolving potential circular references
[org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'MS-SQL'
[org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'MySQL'
[org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'MySQL'
[org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'MySQL' to allow for resolving potential circular references
[org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'MySQL'
[org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'Oracle'
[org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'Oracle'
[org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'Oracle' to allow for resolving potential circular references
[org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'Oracle'
[org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'PostgreSQL'
[org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'PostgreSQL'
[org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'PostgreSQL' to allow for resolving potential circular references
[org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'PostgreSQL'
[org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'Sybase'
[org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'Sybase'
[org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'Sybase' to allow for resolving potential circular references
[org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'Sybase'
[org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'Hana'
[org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'Hana'
[org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'Hana' to allow for resolving potential circular references
[org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'Hana'
[org.springframework.jdbc.support.SQLErrorCodesFactory] - SQLErrorCodes loaded: [DB2, Derby, H2, HSQL, Informix, MS-SQL, MySQL, Oracle, PostgreSQL, Sybase, Hana]
[org.springframework.jdbc.support.SQLErrorCodesFactory] - Looking up default SQLErrorCodes for DataSource [{
CreateTime:"2015-12-17 11:41:02",
ActiveCount:1,
PoolingCount:4,
CreateCount:5,
DestroyCount:0,
CloseCount:0,
ConnectCount:1,
Connections:[
{ID:598880624, ConnectTime:"2015-12-17 11:41:02", UseCount:0, LastActiveTime:"2015-12-17 11:41:02"},
{ID:1939972978, ConnectTime:"2015-12-17 11:41:02", UseCount:0, LastActiveTime:"2015-12-17 11:41:02"},
{ID:1352040302, ConnectTime:"2015-12-17 11:41:02", UseCount:0, LastActiveTime:"2015-12-17 11:41:02"},
{ID:1805162361, ConnectTime:"2015-12-17 11:41:02", UseCount:0, LastActiveTime:"2015-12-17 11:41:02"}
]
}]
[org.springframework.jdbc.support.SQLErrorCodesFactory] - Database product name cached for DataSource [com.alibaba.druid.pool.DruidDataSource@27a6b5de]: name is 'MySQL'
[org.springframework.jdbc.support.SQLErrorCodesFactory] - SQL error codes for 'MySQL' found
[org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator] - Unable to translate SQLException with Error code '0', will now try the fallback translator
[org.mybatis.spring.SqlSessionUtils] - Transaction synchronization deregistering SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@66be17e3]
[org.mybatis.spring.SqlSessionUtils] - Transaction synchronization closing SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@66be17e3]
[org.springframework.jdbc.datasource.DataSourceTransactionManager] - Initiating transaction rollback
[org.springframework.jdbc.datasource.DataSourceTransactionManager] - Rolling back JDBC transaction on Connection [com.alibaba.druid.proxy.jdbc.ConnectionProxyImpl@7c3c000f]
[org.springframework.jdbc.datasource.DataSourceTransactionManager] - Releasing JDBC Connection [com.alibaba.druid.proxy.jdbc.ConnectionProxyImpl@7c3c000f] after transaction
[org.springframework.jdbc.datasource.DataSourceUtils] - Returning JDBC Connection to DataSource
[org.apache.shiro.web.servlet.SimpleCookie] - Added HttpServletResponse Cookie [rememberMe=deleteMe; Path=/csa; Max-Age=0; Expires=Wed, 16-Dec-2015 03:41:31 GMT]
[org.springframework.web.servlet.DispatcherServlet] - DispatcherServlet with name 'springServlet' processing POST request for [/csa/login]
[org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping] - Looking up handler method for path /login
[org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping] - Returning handler method [public java.lang.String com.asgab.web.account.LoginController.fail(java.lang.String,org.springframework.ui.Model)]
[org.springframework.beans.factory.support.DefaultListableBeanFactory] - Returning cached instance of singleton bean 'loginController'
[org.springframework.web.servlet.DispatcherServlet] - Rendering view [org.springframework.web.servlet.view.JstlView: name 'account/login'; URL [/WEB-INF/views/account/login.jsp]] in DispatcherServlet with name 'springServlet'
[org.springframework.web.servlet.view.JstlView] - Added model object 'username' of type [java.lang.String] to request in view with name 'account/login'
[org.springframework.web.servlet.view.JstlView] - Forwarding to resource [/WEB-INF/views/account/login.jsp] in InternalResourceView 'account/login'
[org.springframework.web.servlet.DispatcherServlet] - Successfully completed request
[org.springframework.beans.factory.support.DefaultListableBeanFactory] - Returning cached instance of singleton bean 'sqlSessionFactory'
[org.springframework.beans.factory.support.DefaultListableBeanFactory] - Returning cached instance of singleton bean 'sqlSessionFactory-xmo' ######就是执行了这一句:
select id, name,login_name as loginName, password,salt,roles,emailaudit,register_date as registerDate, email, financeEmail,company, department, function from ss_user where deleted = 1 and login_name=?
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。