Closed kwoot closed 6 years ago
Bugzilla Comment ID: 260 Date: 2009-12-07 02:26:24 From: Lorenzo Tilve \<ltilve@igalia.com>
To reproduce it create a new work report type, with associated description fields and assignment labels.
Intancia not found 636095 [Thread-15] WARN org.hibernate.util.JDBCExceptionReporter - SQL Error: 1064, SQLState: 42000 636095 [Thread-15] ERROR org.hibernate.util.JDBCExceptionReporter - 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 'index, LABEL_TYPE_ID, LABEL_ID, id) values (0, 0, 1, 2929, 3030, 23836)' at line 1 636102 [Thread-15] ERROR org.hibernate.event.def.AbstractFlushingEventListener - Could not synchronize database state with session org.hibernate.exception.SQLGrammarException: Could not execute JDBC batch update at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:67) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43) at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:254) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:266) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:167) at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298) at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27) at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1001) at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:339) at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106) at org.springframework.orm.hibernate3.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:655) at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:732) at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:701) at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:321) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:116) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy98.save(Unknown Source) at org.navalplanner.web.workreports.WorkReportTypeCRUDController.save(WorkReportTypeCRUDController.java:173) at org.navalplanner.web.workreports.WorkReportTypeCRUDController.saveAndExit(WorkReportTypeCRUDController.java:149) 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:597) at bsh.Reflect.invokeMethod(Unknown Source) at bsh.Reflect.invokeObjectMethod(Unknown Source) at bsh.Name.invokeMethod(Unknown Source) at bsh.BSHMethodInvocation.eval(Unknown Source) at bsh.BSHPrimaryExpression.eval(Unknown Source) at bsh.BSHPrimaryExpression.eval(Unknown Source) at bsh.Interpreter.eval(Unknown Source) at bsh.Interpreter.eval(Unknown Source) at org.zkoss.zk.scripting.bsh.BSHInterpreter.exec(BSHInterpreter.java:119) at org.zkoss.zk.scripting.util.GenericInterpreter.interpret(GenericInterpreter.java:310) at org.zkoss.zk.ui.impl.PageImpl.interpret(PageImpl.java:787) at org.zkoss.zk.ui.impl.EventProcessor.process0(EventProcessor.java:176) at org.zkoss.zk.ui.impl.EventProcessor.process(EventProcessor.java:141) at org.zkoss.zk.ui.impl.EventProcessingThreadImpl.process0(EventProcessingThreadImpl.java:493) at org.zkoss.zk.ui.impl.EventProcessingThreadImpl.run(EventProcessingThreadImpl.java:425) 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 'index, LABEL_TYPE_ID, LABEL_ID, id) values (0, 0, 1, 2929, 3030, 23836)' at line 1 at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:1213) at com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:912) at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:48) at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:247) ... 36 more 07-dic-2009 2:11:03 org.zkoss.zk.ui.impl.UiEngineImpl handleError:1131 GRAVE: >>org.springframework.dao.InvalidDataAccessResourceUsageException: Could not execute JDBC batch update; nested exception is org.hibernate.exception.SQLGrammarException: Could not execute JDBC batch update
org.hibernate.exception.SQLGrammarException: Could not execute JDBC batch update [SQL: 1064, 42000] 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 'index, LABEL_TYPE_ID, LABEL_ID, id) values (0, 0, 1, 2929, 3030, 23836)' at line 1 at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:1213) at com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:912) at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:48) at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:247) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:266) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:167) ... 636159 [5912024@qtp-20591791-12] ERROR org.navalplanner.web.error.PageForErrorOnEvent - Could not execute JDBC batch update; nested exception is org.hibernate.exception.SQLGrammarException: Could not execute JDBC batch update[SQL: 1064, 42000] org.springframework.dao.InvalidDataAccessResourceUsageException: Could not execute JDBC batch update; nested exception is org.hibernate.exception.SQLGrammarException: Could not execute JDBC batch update at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:630) at org.springframework.orm.hibernate3.HibernateTransactionManager.convertHibernateAccessException(HibernateTransactionManager.java:789) at org.springframework.orm.hibernate3.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:663) at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:732) at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:701) at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:321) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:116) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy98.save(Unknown Source) at org.navalplanner.web.workreports.WorkReportTypeCRUDController.save(WorkReportTypeCRUDController.java:173) at org.navalplanner.web.workreports.WorkReportTypeCRUDController.saveAndExit(WorkReportTypeCRUDController.java:149) 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:597) at bsh.Reflect.invokeMethod(Unknown Source) at bsh.Reflect.invokeObjectMethod(Unknown Source) at bsh.Name.invokeMethod(Unknown Source) at bsh.BSHMethodInvocation.eval(Unknown Source) at bsh.BSHPrimaryExpression.eval(Unknown Source) at bsh.BSHPrimaryExpression.eval(Unknown Source) at bsh.Interpreter.eval(Unknown Source) at bsh.Interpreter.eval(Unknown Source) at org.zkoss.zk.scripting.bsh.BSHInterpreter.exec(BSHInterpreter.java:119) at org.zkoss.zk.scripting.util.GenericInterpreter.interpret(GenericInterpreter.java:310) at org.zkoss.zk.ui.impl.PageImpl.interpret(PageImpl.java:787) at org.zkoss.zk.ui.impl.EventProcessor.process0(EventProcessor.java:176) at org.zkoss.zk.ui.impl.EventProcessor.process(EventProcessor.java:141) at org.zkoss.zk.ui.impl.EventProcessingThreadImpl.process0(EventProcessingThreadImpl.java:493) at org.zkoss.zk.ui.impl.EventProcessingThreadImpl.run(EventProcessingThreadImpl.java:425) Caused by: org.hibernate.exception.SQLGrammarException: Could not execute JDBC batch update at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:67) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43) at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:254) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:266) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:167) at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298) at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27) at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1001) at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:339) at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106) at org.springframework.orm.hibernate3.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:655) ... 28 more 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 'index, LABEL_TYPE_ID, LABEL_ID, id) values (0, 0, 1, 2929, 3030, 23836)' at line 1 at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:1213) at com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:912) at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:48) at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:247) ... 36 more 127.0.0.1 - - [07/dic/2009:01:11:03 +0000] "POST /navalplanner-webapp/zkau HTTP/1.1" 200 910 "http://localhost:8080/navalplanner-webapp/workreports/workReportTypes.zul" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.4pre) Gecko/20090922 Ubuntu/9.04 (jaunty) Shiretoko/3.5.4pre" 127.0.0.1 - - [07/dic/2009:01:11:03 +0000] "GET /navalplanner-webapp/zkau/web/zul/img/wnd/wnd-ol-corner.png HTTP/1.1" 200 871 "http://localhost:8080/navalplanner-webapp/zkau/web/zul/css/normmoz.css.dsp" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.4pre) Gecko/20090922 Ubuntu/9.04 (jaunty) Shiretoko/3.5.4pre" 127.0.0.1 - - [07/dic/2009:01:11:03 +0000] "GET /navalplanner-webapp/zkau/web/zul/img/wnd/wnd-ol-hl.png HTTP/1.1" 200 604 "http://localhost:8080/navalplanner-webapp/zkau/web/zul/css/normmoz.css.dsp" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.4pre) Gecko/20090922 Ubuntu/9.04 (jaunty) Shiretoko/3.5.4pre" 127.0.0.1 - - [07/dic/2009:01:11:03 +0000] "GET /navalplanner-webapp/zkau/web/zul/img/wnd/wnd-ol-hr.png HTTP/1.1" 200 539 "http://localhost:8080/navalplanner-webapp/zkau/web/zul/css/normmoz.css.dsp" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.4pre) Gecko/20090922 Ubuntu/9.04 (jaunty) Shiretoko/3.5.4pre" 127.0.0.1 - - [07/dic/2009:01:11:03 +0000] "GET /navalplanner-webapp/zkau/web/zul/img/wnd/wnd-ol-hm.png HTTP/1.1" 200 213 "http://localhost:8080/navalplanner-webapp/zkau/web/zul/css/normmoz.css.dsp" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.4pre) Gecko/20090922 Ubuntu/9.04 (jaunty) Shiretoko/3.5.4pre" 127.0.0.1 - - [07/dic/2009:01:11:03 +0000] "GET /navalplanner-webapp/zkau/web/zul/img/wnd/wnd-ol-clr.png HTTP/1.1" 200 131 "http://localhost:8080/navalplanner-webapp/zkau/web/zul/css/normmoz.css.dsp" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.4pre) Gecko/20090922 Ubuntu/9.04 (jaunty) Shiretoko/3.5.4pre" 127.0.0.1 - - [07/dic/2009:01:11:08 +0000] "POST /navalplanner-webapp/zkau HTTP/1.1" 200 97 "http://localhost:8080/navalplanner-webapp/workreports/workReportTypes.zul" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.4pre) Gecko/20090922 Ubuntu/9.04 (jaunty) Shiretoko/3.5.4pre"
Bugzilla Comment ID: 410 Date: 2009-12-11 11:47:51 From: Susana \<smpedreira@gmail.com>
I think I've fixed this behavior with this patch :
ItEr38S05ValidacionEProbasFuncionaisItEr37S06: [Bug #117]It fixes the following error : Batch update exception when trying to save a WorkReportType. It changes the index property name because is a reserved word and needs the simple quotes.
but I can not prove it because I'm using PostgreSQL so this patch has yet to be tested and confirmed.
Bugzilla Comment ID: 854 Date: 2010-03-02 15:32:47 From: Lorenzo Tilve \<ltilve@igalia.com>
Reviewed. It's not longer happening.
(Original Bugzilla Bug ID: 117)
Date: 2009-12-07 02:26:24 From: Lorenzo Tilve \<ltilve@igalia.com> To: Javier Morán \<jmoran@igalia.com> Version: navalplan-1.0 (1.0.x) Last updated: 2011-01-18 17:51:10
(Note: this issue was migrated automatically with bugzilla2github.py tool )