Java MySQL Server version for the right syntax to use near

Source: Internet
Author: User

Jdbcexceptionreporter. logexceptions (72) |

 

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 'lock = '0', content = '1' where id = 1' at line 1
[Bjxd] error [http-8080-Processor22] abstractflushingeventlistener. extends mexecutions (277) | cocould not synchronize database state with Session
Org. hibernate. Exception. sqlgrammarexception: cocould not execute JDBC batch update
At org. hibernate. Exception. errorcodeconverter. Convert (errorcodeconverter. Java: 70)
At org. hibernate. Exception. jdbcexceptionhelper. Convert (jdbcexceptionhelper. Java: 43)
At org.hibernate.jdbc.abstractbatcher.exe cutebatch (abstractbatcher. Java: 181)
At org.hibernate.engine.actionqueue.exe cuteactions (actionqueue. Java: 226)
At org.hibernate.engine.actionqueue.exe cuteactions (actionqueue. Java: 137)
At org. hibernate. event. Def. abstractflushingeventlistener. extends mexecutions (abstractflushingeventlistener. Java: 274)
At org. hibernate. event. Def. defaultflusheventlistener. onflush (defaflusheventlistener. Java: 27)
At org. hibernate. impl. sessionimpl. Flush (sessionimpl. Java: 730)
At org. springframework. Orm. hibernate3.hibernateaccessor. flushifnecessary (hibernateaccessor. Java: 394)
At org.springframework.orm.hibernate3.hibernatetemplate.exe cute (hibernatetemplate. Java: 367)
At org. springframework. Orm. hibernate3.hibernatetemplate. Update (hibernatetemplate. Java: 642)
At org. springframework. Orm. hibernate3.hibernatetemplate. Update (hibernatetemplate. Java: 638)
At com. onexun. zgxq. Dao. admin. orginfodaoimp. editorginfo (orginfodaoimp. Java: 32)
At com. onexun. zgxq. Action. admin. orginfoaction. Del (orginfoaction. Java: 78)
At sun. Reflect. nativemethodaccessorimpl. invoke0 (native method)
At sun. Reflect. nativemethodaccessorimpl. Invoke (nativemethodaccessorimpl. Java: 39)
At sun. Reflect. delegatingmethodaccessorimpl. Invoke (delegatingmethodaccessorimpl. Java: 25)
At java. Lang. Reflect. method. Invoke (method. Java: 585)
At com. opensymphony. xwork. defaultactioninvocation. invokeaction (defaultactioninvocation. Java: 300)
At com. opensymphony. xwork. defaultactioninvocation. Invoke (defaactionactioninvocation. Java: 166)
At com. opensymphony. xwork. Interceptor. aroundinterceptor. Intercept (aroundinterceptor. Java: 35)
At com. opensymphony. xwork. defaultactioninvocation. Invoke (defaactionactioninvocation. Java: 164)
At com. opensymphony. xwork. Interceptor. aroundinterceptor. Intercept (aroundinterceptor. Java: 35)
At com. opensymphony. xwork. defaultactioninvocation. Invoke (defaactionactioninvocation. Java: 164)
At com.opensymphony.xwork.defaactionactionproxy.exe cute (defaactionactionproxy. Java: 116)
At com. opensymphony. webwork. Dispatcher. servletdispatcher. serviceaction (servletdispatcher. Java: 272)
At com. opensymphony. webwork. Dispatcher. servletdispatcher. Service (servletdispatcher. Java: 237)
At javax. servlet. http. httpservlet. Service (httpservlet. Java: 802)
At org. Apache. Catalina. Core. applicationfilterchain. internaldofilter (applicationfilterchain. Java: 252)
At org. Apache. Catalina. Core. applicationfilterchain. dofilter (applicationfilterchain. Java: 173)
At org. Apache. Catalina. Core. standardwrappervalve. Invoke (standardwrappervalve. Java: 213)
At org. Apache. Catalina. Core. standardcontextvalve. Invoke (standardcontextvalve. Java: 178)
At org. Apache. Catalina. Core. standardhostvalve. Invoke (standardhostvalve. Java: 126)
At org. Apache. Catalina. Valves. errorreportvalve. Invoke (errorreportvalve. Java: 105)
At org. Apache. Catalina. Core. standardenginevalve. Invoke (standardenginevalve. Java: 107)
At org. Apache. Catalina. connector. coyoteadapter. Service (coyoteadapter. Java: 148)
At org. Apache. Coyote. http11.http11processor. Process (http11processor. Java: 869)
At org. Apache. Coyote. http11.http11baseprotocol $ http11connectionhandler. processconnection (http11baseprotocol. Java: 664)
At org.apache.tomcat.util.net. pooltcpendpoint. processsocket (pooltcpendpoint. Java: 527)
At org.apache.tomcat.util.net. leaderfollowerworkerthread. Runit (leaderfollowerworkerthread. Java: 80)
At org. Apache. tomcat. util. threads. threadpool $ controlrunnable. Run (threadpool. Java: 684)
At java. Lang. thread. Run (thread. Java: 595)
Caused by: Java. SQL. batchupdateexception: 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 'lock = '0 ', content = '1' where id = 1' at line 1
At com.mysql.jdbc.preparedstatement.exe cutebatch (preparedstatement. Java: 891)
At org.apache.commons.dbcp.delegatingstatement.exe cutebatch (delegatingstatement. Java: 294)
At org. hibernate. JDBC. batchingbatcher. doexecutebatch (batchingbatcher. Java: 57)
At org.hibernate.jdbc.abstractbatcher.exe cutebatch (abstractbatcher. Java: 174)
... 39 more
Org. springframework. JDBC. badsqlgrammarexception: hibernate operation: cocould not execute JDBC batch update; bad SQL grammar [update org_info set user_id = ?, City_id = ?, Univercity_id = ?, Spoken_id = ?, Org_type = ?, Name = ?, Type = ?, City_name = ?, Univercity_name = ?, User_name = ?, Spoken_name = ?, Spoken_pic = ?, Join_right = ?, Member_num = ?, Score = ?, Level = ?, Adversite = ?, Intro = ?, Keyword = ?, Found_time = ?, Lock = ?, Content =? Where id =?]; Nested exception is Java. SQL. batchupdateexception: 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 'lock = '0 ', content = '1' where id = 1' at line 1
Caused by: Java. SQL. batchupdateexception: 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 'lock = '0 ', content = '1' where id = 1' at line 1
At com.mysql.jdbc.preparedstatement.exe cutebatch (preparedstatement. Java: 891)
At org.apache.commons.dbcp.delegatingstatement.exe cutebatch (delegatingstatement. Java: 294)
At org. hibernate. JDBC. batchingbatcher. doexecutebatch (batchingbatcher. Java: 57)
At org.hibernate.jdbc.abstractbatcher.exe cutebatch (abstractbatcher. Java: 174)
At org.hibernate.engine.actionqueue.exe cuteactions (actionqueue. Java: 226)
At org.hibernate.engine.actionqueue.exe cuteactions (actionqueue. Java: 137)
At org. hibernate. event. Def. abstractflushingeventlistener. extends mexecutions (abstractflushingeventlistener. Java: 274)
At org. hibernate. event. Def. defaultflusheventlistener. onflush (defaflusheventlistener. Java: 27)
At org. hibernate. impl. sessionimpl. Flush (sessionimpl. Java: 730)
At org. springframework. Orm. hibernate3.hibernateaccessor. flushifnecessary (hibernateaccessor. Java: 394)
At org.springframework.orm.hibernate3.hibernatetemplate.exe cute (hibernatetemplate. Java: 367)
At org. springframework. Orm. hibernate3.hibernatetemplate. Update (hibernatetemplate. Java: 642)
At org. springframework. Orm. hibernate3.hibernatetemplate. Update (hibernatetemplate. Java: 638)
At com. onexun. zgxq. Dao. admin. orginfodaoimp. editorginfo (orginfodaoimp. Java: 32)
At com. onexun. zgxq. Action. admin. orginfoaction. Del (orginfoaction. Java: 78)
At sun. Reflect. nativemethodaccessorimpl. invoke0 (native method)
At sun. Reflect. nativemethodaccessorimpl. Invoke (nativemethodaccessorimpl. Java: 39)
At sun. Reflect. delegatingmethodaccessorimpl. Invoke (delegatingmethodaccessorimpl. Java: 25)
At java. Lang. Reflect. method. Invoke (method. Java: 585)
At com. opensymphony. xwork. defaultactioninvocation. invokeaction (defaultactioninvocation. Java: 300)
At com. opensymphony. xwork. defaultactioninvocation. Invoke (defaactionactioninvocation. Java: 166)
At com. opensymphony. xwork. Interceptor. aroundinterceptor. Intercept (aroundinterceptor. Java: 35)
At com. opensymphony. xwork. defaultactioninvocation. Invoke (defaactionactioninvocation. Java: 164)
At com. opensymphony. xwork. Interceptor. aroundinterceptor. Intercept (aroundinterceptor. Java: 35)
At com. opensymphony. xwork. defaultactioninvocation. Invoke (defaactionactioninvocation. Java: 164)
At com.opensymphony.xwork.defaactionactionproxy.exe cute (defaactionactionproxy. Java: 116)
At com. opensymphony. webwork. Dispatcher. servletdispatcher. serviceaction (servletdispatcher. Java: 272)
At com. opensymphony. webwork. Dispatcher. servletdispatcher. Service (servletdispatcher. Java: 237)
At javax. servlet. http. httpservlet. Service (httpservlet. Java: 802)
At org. Apache. Catalina. Core. applicationfilterchain. internaldofilter (applicationfilterchain. Java: 252)
At org. Apache. Catalina. Core. applicationfilterchain. dofilter (applicationfilterchain. Java: 173)
At org. Apache. Catalina. Core. standardwrappervalve. Invoke (standardwrappervalve. Java: 213)
At org. Apache. Catalina. Core. standardcontextvalve. Invoke (standardcontextvalve. Java: 178)
At org. Apache. Catalina. Core. standardhostvalve. Invoke (standardhostvalve. Java: 126)
At org. Apache. Catalina. Valves. errorreportvalve. Invoke (errorreportvalve. Java: 105)
At org. Apache. Catalina. Core. standardenginevalve. Invoke (standardenginevalve. Java: 107)
At org. Apache. Catalina. connector. coyoteadapter. Service (coyoteadapter. Java: 148)
At org. Apache. Coyote. http11.http11processor. Process (http11processor. Java: 869)
At org. Apache. Coyote. http11.http11baseprotocol $ http11connectionhandler. processconnection (http11baseprotocol. Java: 664)
At org.apache.tomcat.util.net. pooltcpendpoint. processsocket (pooltcpendpoint. Java: 527)
At org.apache.tomcat.util.net. leaderfollowerworkerthread. Runit (leaderfollowerworkerthread. Java: 80)
At org. Apache. tomcat. util. threads. threadpool $ controlrunnable. Run (threadpool. Java: 684)
At java. Lang. thread. Run (thread. Java: 595)

 
Cause: Lock is a hibernate keyword not allowed
Solution: Modify the field name.

This article from the csdn blog, reproduced please indicate the source: http://blog.csdn.net/xuanlingtao/archive/2007/04/08/1556995.aspx

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.