title: Why this org.hibernate.exception.GenericJDBCException: could not update occurs only on the remote (virtual) server
body: <p>I am getting this error with my externals server with hibernate. Whilst running my data base locally, the error never occurs. The following is the stack exception:</p>
  
  <pre><code>    javax.servlet.ServletException: java.lang.Exception: org.hibernate.exception.GenericJDBCException: could not update: [fr.model.employee.Employee#510]
  at fr.action.planning.site.ToCloneVacationAction.execute(ToCloneVacationAction.java:469)
  at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
  at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
  at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
  at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
  at fr.util.EncodingFilter.doFilter(EncodingFilter.java:37)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
  at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
  at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:581)
  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
  at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
  at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:928)
  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
  at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)
  at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:539)
  at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:300)
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
  at java.lang.Thread.run(Thread.java:722)
  Caused by: java.lang.Exception: org.hibernate.exception.GenericJDBCException: could not update: [fr.model.employee.Employee#510]
  at fr.GenericDAO.findById(GenericDAO.java:94)
  at fr.dao.SocietyDAO.findSocietyById(SocietyDAO.java:58)
  at fr.service.SocietyPeer.getSocietyName(SocietyPeer.java:83)
  at fr.service.EmployeePeer.getEmployerName(EmployeePeer.java:219)
  at fr.action.employee.BaseEmployeeDisplayAction.createEmployeesBean(BaseEmployeeDisplayAction.java:82)
  at fr.action.planning.site.ToCloneVacationAction.execute(ToCloneVacationAction.java:320)
  ... 25 more
  Caused by: org.hibernate.exception.GenericJDBCException: could not update: [fr.model.employee.Employee#510]
  at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:91)
  at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:79)
  at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
  at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2222)
  at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:2118)
  at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2374)
  at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:84)
  at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:243)
  at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:227)
  at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:141)
  at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:296)
  at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
  at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1008)
  at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:355)
  at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106)
  at fr.dao.GenericDAO.findById(GenericDAO.java:87)
  ... 30 more
  Caused by: java.sql.SQLException: Incorrect arguments to mysqld_stmt_execute
  at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2928)
  at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1571)
  at com.mysql.jdbc.ServerPreparedStatement.serverExecute(ServerPreparedStatement.java:1124)
  at com.mysql.jdbc.ServerPreparedStatement.executeInternal(ServerPreparedStatement.java:676)
  at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1166)
  at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1082)
  at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1067)
  at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:105)
  at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2208)
  ... 42 more
  
  
  javax.servlet.ServletException: java.lang.Exception: org.hibernate.exception.GenericJDBCException: could not update: [fr.model.employee.Employee#510]
  at fr.planning.site.ToCloneVacationAction.execute(ToCloneVacationAction.java:469)
  at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
  at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
  at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
  at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
  at fr.util.EncodingFilter.doFilter(EncodingFilter.java:37)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
  at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
  at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:581)
  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
  at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
  at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:928)
  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
  at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)
  at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:539)
  at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:300)
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
  at java.lang.Thread.run(Thread.java:722)
  Caused by: java.lang.Exception: org.hibernate.exception.GenericJDBCException: could not update: [fr.model.employee.Employee#510]
  at fr.dao.GenericDAO.findById(GenericDAO.java:94)
  at fr.dao.SocietyDAO.findSocietyById(SocietyDAO.java:58)
  at fr.service.SocietyPeer.getSocietyName(SocietyPeer.java:83)
  at fr.service.EmployeePeer.getEmployerName(EmployeePeer.java:219)
  at fr.action.employee.BaseEmployeeDisplayAction.createEmployeesBean(BaseEmployeeDisplayAction.java:82)
  at fr.action.planning.site.ToCloneVacationAction.execute(ToCloneVacationAction.java:320)
  ... 25 more
  Caused by: org.hibernate.exception.GenericJDBCException: could not update: [fr.model.employee.Employee#510]
  at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:91)
  at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:79)
  at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
  at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2222)
  at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:2118)
  at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2374)
  at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:84)
  at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:243)
  at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:227)
  at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:141)
  at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:296)
  at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
  at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1008)
  at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:355)
  at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106)
  at fr.dao.GenericDAO.findById(GenericDAO.java:87)
  ... 30 more
  Caused by: java.sql.SQLException: Incorrect arguments to mysqld_stmt_execute
  at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2928)
  at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1571)
  at com.mysql.jdbc.ServerPreparedStatement.serverExecute(ServerPreparedStatement.java:1124)
  at com.mysql.jdbc.ServerPreparedStatement.executeInternal(ServerPreparedStatement.java:676)
  at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1166)
  at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1082)
  at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1067)
  at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:105)
  at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2208)
  ... 42 more
  java.lang.Exception: org.hibernate.exception.GenericJDBCException: could not update: [fr.model.employee.Employee#510]
  at fr.dao.GenericDAO.findById(GenericDAO.java:94)
  at fr.dao.SocietyDAO.findSocietyById(SocietyDAO.java:58)
  at fr.service.SocietyPeer.getSocietyName(SocietyPeer.java:83)
  at fr.service.EmployeePeer.getEmployerName(EmployeePeer.java:219)
  at fr.action.employee.BaseEmployeeDisplayAction.createEmployeesBean(BaseEmployeeDisplayAction.java:82)
  at fr.action.planning.site.ToCloneVacationAction.execute(ToCloneVacationAction.java:320)
  at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
  at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
  at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
  at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
  at fr.util.EncodingFilter.doFilter(EncodingFilter.java:37)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
  at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
  at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:581)
  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
  at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
  at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:928)
  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
  at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)
  at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:539)
  at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:300)
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
  at java.lang.Thread.run(Thread.java:722)
  Caused by: org.hibernate.exception.GenericJDBCException: could not update: [fr.model.employee.Employee#510]
  at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:91)
  at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:79)
  at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
  at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2222)
  at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:2118)
  at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2374)
  at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:84)
  at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:243)
  at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:227)
  at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:141)
  at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:296)
  at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
  at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1008)
  at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:355)
  at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106)
  at fr.dao.GenericDAO.findById(GenericDAO.java:87)
  ... 30 more
  Caused by: java.sql.SQLException: Incorrect arguments to mysqld_stmt_execute
  at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2928)
  at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1571)
  at com.mysql.jdbc.ServerPreparedStatement.serverExecute(ServerPreparedStatement.java:1124)
  at com.mysql.jdbc.ServerPreparedStatement.executeInternal(ServerPreparedStatement.java:676)
  at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1166)
  at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1082)
  at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1067)
  at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:105)
  at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2208)
  ... 42 more
  </code></pre>
  
  <p>I do not think code is the issue as the code worked fine with previous servers.</p>