Translating SQLException with SQL state '42000', error code '1064'错误

Posted yanew

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Translating SQLException with SQL state '42000', error code '1064'错误相关的知识,希望对你有一定的参考价值。

PostgreSQL, Sybase]
2018-04-12 14:18:55 [org.springframework.jdbc.support.SQLErrorCodesFactory]-[DEBUG] Looking up default SQLErrorCodes for DataSource [{
CreateTime:"2018-04-12 14:18:43",
ActiveCount:1,
PoolingCount:0,
CreateCount:1,
DestroyCount:0,
CloseCount:0,
ConnectCount:1,
Connections:[
]
}]
2018-04-12 14:18:55 [org.springframework.jdbc.support.SQLErrorCodesFactory]-[DEBUG] Database product name cached for DataSource [[email protected]]: name is ‘mysql
2018-04-12 14:18:55 [org.springframework.jdbc.support.SQLErrorCodesFactory]-[DEBUG] SQL error codes for ‘MySQL‘ found
2018-04-12 14:18:55 [org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator]-[DEBUG] Translating SQLException with SQL state ‘42000‘, error code ‘1064‘, message [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘u LEFT JOIN admin_info a on a.user_id=u.id

WHERE u.user_type=‘10‘‘ at line 1]; SQL was [] for task [
### Error querying database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘u LEFT JOIN admin_info a on a.user_id=u.id

WHERE u.user_type=‘10‘‘ at line 1
### The error may exist in file [D:\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp3\wtpwebapps\easyleAdmin\WEB-INF\classes\com\yxl\manager\dao\mapper\UserAdminMapper.xml]
### The error may involve com.yxl.manager.dao.UserAdminDAO.selectCountEntity-Inline
### The error occurred while setting parameters
### SQL: select count(*) user_info u LEFT JOIN admin_info a on a.user_id=u.id WHERE u.user_type=?
### Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘u LEFT JOIN admin_info a on a.user_id=u.id

WHERE u.user_type=‘10‘‘ at line 1
]
2018-04-12 14:18:55 [org.mybatis.spring.SqlSessionUtils]-[DEBUG] Transaction synchronization deregistering SqlSession [org.apache.ibatis.session.defaults.Defaul[email protected]]
2018-04-12 14:18:55 [org.mybatis.spring.SqlSessionUtils]-[DEBUG] Transaction synchronization closing SqlSession [[email protected]]
2018-04-12 14:18:55 [org.springframework.jdbc.datasource.DataSourceUtils]-[DEBUG] Returning JDBC Connection to DataSource
2018-04-12 14:18:55 [org.springframework.jdbc.datasource.DataSourceTransactionManager]-[DEBUG] Should roll back transaction but cannot - no transaction available
2018-04-12 14:18:55 [org.springframework.web.servlet.mvc.method.annotation.ExceptionHandlerExceptionResolver]-[DEBUG] Resolving exception from handler [public org.springframework.web.servlet.ModelAndView com.yxl.manager.controller.UserAdminController.teacherList(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse,com.yxl.manager.common.Pager,com.yxl.manager.common.SelectBean)]: org.springframework.jdbc.BadSqlGrammarException:
### Error querying database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘u LEFT JOIN admin_info a on a.user_id=u.id

WHERE u.user_type=‘10‘‘ at line 1
### The error may exist in file [D:\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp3\wtpwebapps\easyleAdmin\WEB-INF\classes\com\yxl\manager\dao\mapper\UserAdminMapper.xml]
### The error may involve com.yxl.manager.dao.UserAdminDAO.selectCountEntity-Inline
### The error occurred while setting parameters
### SQL: select count(*) user_info u LEFT JOIN admin_info a on a.user_id=u.id WHERE u.user_type=?
### Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘u LEFT JOIN admin_info a on a.user_id=u.id

WHERE u.user_type=‘10‘‘ at line 1
; bad SQL grammar []; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘u LEFT JOIN admin_info a on a.user_id=u.id

WHERE u.user_type=‘10‘‘ at line 1
2018-04-12 14:18:55 [org.springframework.web.servlet.mvc.annotation.ResponseStatusExceptionResolver]-[DEBUG] Resolving exception from handler [public org.springframework.web.servlet.ModelAndView com.yxl.manager.controller.UserAdminController.teacherList(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse,com.yxl.manager.common.Pager,com.yxl.manager.common.SelectBean)]: org.springframework.jdbc.BadSqlGrammarException:
### Error querying database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘u LEFT JOIN admin_info a on a.user_id=u.id

WHERE u.user_type=‘10‘‘ at line 1
### The error may exist in file [D:\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp3\wtpwebapps\easyleAdmin\WEB-INF\classes\com\yxl\manager\dao\mapper\UserAdminMapper.xml]
### The error may involve com.yxl.manager.dao.UserAdminDAO.selectCountEntity-Inline
### The error occurred while setting parameters
### SQL: select count(*) user_info u LEFT JOIN admin_info a on a.user_id=u.id WHERE u.user_type=?
### Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘u LEFT JOIN admin_info a on a.user_id=u.id

WHERE u.user_type=‘10‘‘ at line 1
; bad SQL grammar []; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘u LEFT JOIN admin_info a on a.user_id=u.id

WHERE u.user_type=‘10‘‘ at line 1
2018-04-12 14:18:55 [org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver]-[DEBUG] Resolving exception from handler [public org.springframework.web.servlet.ModelAndView com.yxl.manager.controller.UserAdminController.teacherList(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse,com.yxl.manager.common.Pager,com.yxl.manager.common.SelectBean)]: org.springframework.jdbc.BadSqlGrammarException:
### Error querying database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘u LEFT JOIN admin_info a on a.user_id=u.id

WHERE u.user_type=‘10‘‘ at line 1
### The error may exist in file [D:\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp3\wtpwebapps\easyleAdmin\WEB-INF\classes\com\yxl\manager\dao\mapper\UserAdminMapper.xml]
### The error may involve com.yxl.manager.dao.UserAdminDAO.selectCountEntity-Inline
### The error occurred while setting parameters
### SQL: select count(*) user_info u LEFT JOIN admin_info a on a.user_id=u.id WHERE u.user_type=?
### Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘u LEFT JOIN admin_info a on a.user_id=u.id

WHERE u.user_type=‘10‘‘ at line 1
; bad SQL grammar []; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘u LEFT JOIN admin_info a on a.user_id=u.id

WHERE u.user_type=‘10‘‘ at line 1
2018-04-12 14:18:55 [org.springframework.web.servlet.DispatcherServlet]-[DEBUG] Could not complete request
org.springframework.jdbc.BadSqlGrammarException:
### Error querying database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘u LEFT JOIN admin_info a on a.user_id=u.id

WHERE u.user_type=‘10‘‘ at line 1
### The error may exist in file [D:\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp3\wtpwebapps\easyleAdmin\WEB-INF\classes\com\yxl\manager\dao\mapper\UserAdminMapper.xml]
### The error may involve com.yxl.manager.dao.UserAdminDAO.selectCountEntity-Inline
### The error occurred while setting parameters
### SQL: select count(*) user_info u LEFT JOIN admin_info a on a.user_id=u.id WHERE u.user_type=?
### Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘u LEFT JOIN admin_info a on a.user_id=u.id


 

 

 

错了不止一回   我是用SSM,这是数据库语言错误,检查下near附近的数据库语言























































































以上是关于Translating SQLException with SQL state '42000', error code '1064'错误的主要内容,如果未能解决你的问题,请参考以下文章

Translating Virtual Machine Code

Translating Skills 英汉语序的对比及翻译

《Translating Images into Maps》论文笔记

《Translating Images into Maps》论文笔记

Translating Skills 词义的选择和引申

TransE:Translating Embeddings for Modeling Multi-relational Data