Hello,
Thanks for trying to help,
As you was talking about "flush", I have tried to add a "session.flush()" after "session.update(employee)" and "session.save(employee)"
but i still have an error, below is the error :
Quote:
[21/03/06 09:28:29:516 CET] 6c7d4c1e SystemOut O Hibernate: select dnasalary0_.PKWDNASALP as PKWDNASALP, dnasalary0_.LAST_UPDATE as LAST2_21_, dnasalary0_.CAMPAGNE as CAMPAGNE21_, dnasalary0_.NUMEROADHERENT as NUMEROAD4_21_, dnasalary0_.NUMEROLIGNE as NUMEROLI5_21_, dnasalary0_.NOMSALARIEDNA as NOMSALAR6_21_, dnasalary0_.PRENOMSALARIEDNA as PRENOMSA7_21_, dnasalary0_.NUMEROSECURITESOCIALE as NUMEROSE8_21_, dnasalary0_.SUFFIXESECURITESOCIALE as SUFFIXES9_21_, dnasalary0_.CLENUMEROSECURITESOCIALE as CLENUME10_21_, dnasalary0_.ADRESSE1DNA as ADRESSE11_21_, dnasalary0_.ADRESSE2DNA as ADRESSE12_21_, dnasalary0_.ADRESSE3DNA as ADRESSE13_21_, dnasalary0_.CODEPOSTALDNA as CODEPOS14_21_, dnasalary0_.LOCALITEDNA as LOCALIT15_21_, dnasalary0_.MAJIDENTITE as MAJIDEN16_21_, dnasalary0_.DATEENTREE as DATEENTREE21_, dnasalary0_.DATESORTIE as DATESORTIE21_, dnasalary0_.QUALIFICATION as QUALIFI19_21_, dnasalary0_.CLASSIFICATIONTP as CLASSIF20_21_, dnasalary0_.PROFESSION as PROFESSION21_, dnasalary0_.ABATTEMENT as ABATTEMENT21_, dnasalary0_.CODEHM as CODEHM21_, dnasalary0_.SALAIREBASE as SALAIRE24_21_, dnasalary0_.TEMPSTRAVAIL as TEMPSTR25_21_, dnasalary0_.SALAIRETOTAL as SALAIRE26_21_, dnasalary0_.TEMPSINTEMPERIES as TEMPSIN27_21_, dnasalary0_.INDEMNITEINTEMPERIES as INDEMNI28_21_, dnasalary0_.TEMPSACCIDENTTRAVAIL as TEMPSAC29_21_, dnasalary0_.TEMPSACCIDENTTRAJET as TEMPSAC30_21_, dnasalary0_.TEMPSMALADIEPROFESSIONNELLE as TEMPSMA31_21_, dnasalary0_.TEMPSMATERNITE as TEMPSMA32_21_, dnasalary0_.TEMPSMALADIENONPROFESSIONNELLE as TEMPSMA33_21_, dnasalary0_.NUMEROBLEU as NUMEROBLEU21_, dnasalary0_.CONVENTIONCOLLECTIVE as CONVENT35_21_, dnasalary0_.NUMERODOSSIER as NUMEROD36_21_, dnasalary0_.ETAT as ETAT21_, dnasalary0_.NOUVEAUSALARIE as NOUVEAU38_21_, dnasalary0_.SIECLEMAJLIGNE as SIECLEM39_21_, dnasalary0_.ANNEEMAJLIGNE as ANNEEMA40_21_, dnasalary0_.MOISMAJLIGNE as MOISMAJ41_21_, dnasalary0_.JOURMAJLIGNE as JOURMAJ42_21_, dnasalary0_.TYPEMAJLIGNE as TYPEMAJ43_21_ from DNASALARIES dnasalary0_ where dnasalary0_.CAMPAGNE=? and dnasalary0_.NUMEROADHERENT=? and dnasalary0_.NUMEROSECURITESOCIALE=? order by dnasalary0_.NOMSALARIEDNA
[21/03/06 09:28:29:531 CET] 6c7d4c1e SystemErr R Salarié '1631075120229' non trouvé dans la base de données (=> INSERT)
[21/03/06 09:28:29:578 CET] 6c7d4c1e SystemOut O Hibernate: insert into DNASALARIES (LAST_UPDATE, CAMPAGNE, NUMEROADHERENT, NUMEROLIGNE, NOMSALARIEDNA, PRENOMSALARIEDNA, NUMEROSECURITESOCIALE, SUFFIXESECURITESOCIALE, CLENUMEROSECURITESOCIALE, ADRESSE1DNA, ADRESSE2DNA, ADRESSE3DNA, CODEPOSTALDNA, LOCALITEDNA, MAJIDENTITE, DATEENTREE, DATESORTIE, QUALIFICATION, CLASSIFICATIONTP, PROFESSION, ABATTEMENT, CODEHM, SALAIREBASE, TEMPSTRAVAIL, SALAIRETOTAL, TEMPSINTEMPERIES, INDEMNITEINTEMPERIES, TEMPSACCIDENTTRAVAIL, TEMPSACCIDENTTRAJET, TEMPSMALADIEPROFESSIONNELLE, TEMPSMATERNITE, TEMPSMALADIENONPROFESSIONNELLE, NUMEROBLEU, CONVENTIONCOLLECTIVE, NUMERODOSSIER, ETAT, NOUVEAUSALARIE, SIECLEMAJLIGNE, ANNEEMAJLIGNE, MOISMAJLIGNE, JOURMAJLIGNE, TYPEMAJLIGNE, PKWDNASALP) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
[21/03/06 09:28:29:844 CET] 6c7d4c1e JDBCException W org.hibernate.util.JDBCExceptionReporter SQL Error: -99999, SQLState: 22001
[21/03/06 09:28:29:844 CET] 6c7d4c1e JDBCException E org.hibernate.util.JDBCExceptionReporter [IBM][CLI Driver] CLI0109E Données de chaîne tronquées à droite. SQLSTATE=22001
[21/03/06 09:28:29:844 CET] 6c7d4c1e AbstractFlush E org.hibernate.event.def.AbstractFlushingEventListener Could not synchronize database state with session
[21/03/06 09:28:29:875 CET] 6c7d4c1e AbstractFlush E org.hibernate.event.def.AbstractFlushingEventListener TRAS0014I: L'exception suivante a été consignée : org.hibernate.exception.GenericJDBCException: could not insert:
[org.ccpb14.fwk.base.mapping.Dnasalary]
at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:82)
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:70)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.persister.entity.BasicEntityPersister.insert(BasicEntityPersister.java:1869)
at org.hibernate.persister.entity.BasicEntityPersister.insert(BasicEntityPersister.java:2200)
at org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:46)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java(Compiled Code))
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:136)
at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:274)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:730)
at org.ccpb14.fwk.dna.dadsu.DadsuLoader.loadDnasalarys(DadsuLoader.java:5859)
at org.ccpb14.fwk.dna.dadsu.DadsuLoader.load(DadsuLoader.java:226)
at org.ccpb14.entreprises.dna.actions.DnaDadsuLoaderAction.execute(DnaDadsuLoaderAction.java:66)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:226)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
at com.ibm.ws.webcontainer.servlet.ServicingServletState.service(StrictLifecycleServlet.java:333)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:1068)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:598)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:206)
at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1056)
at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:388)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:231)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:76)
at org.ccpb14.hibernate.HibernateFilter.doFilter(HibernateFilter.java:59)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:132)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:71)
at org.ccpb14.filters.LoginFilter.doFilter(LoginFilter.java:101)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:132)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:71)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:1064)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:598)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:206)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:80)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:214)
at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:182)
at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:623)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:447)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:672)
Caused by: COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver] CLI0109E Données de chaîne tronquées à droite. SQLSTATE=22001
at COM.ibm.db2.jdbc.app.SQLExceptionGenerator.throw_SQLException(SQLExceptionGenerator.java:275)
at COM.ibm.db2.jdbc.app.SQLExceptionGenerator.throw_SQLException(SQLExceptionGenerator.java(Inlined Compiled Code))
at COM.ibm.db2.jdbc.app.SQLExceptionGenerator.check_return_code(SQLExceptionGenerator.java(Compiled Code))
at COM.ibm.db2.jdbc.app.DB2PreparedStatement.execute2(DB2PreparedStatement.java(Compiled Code))
at COM.ibm.db2.jdbc.app.DB2PreparedStatement.executeUpdate(DB2PreparedStatement.java:1736)
at com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement.executeUpdate(WSJdbcPreparedStatement.java:462)
at org.hibernate.jdbc.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:22)
at org.hibernate.persister.entity.BasicEntityPersister.insert(BasicEntityPersister.java:1853)
... 59 more
.
org.hibernate.exception.GenericJDBCException: could not insert: [org.ccpb14.fwk.base.mapping.Dnasalary]
at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:82)
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:70)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.persister.entity.BasicEntityPersister.insert(BasicEntityPersister.java:1869)
at org.hibernate.persister.entity.BasicEntityPersister.insert(BasicEntityPersister.java:2200)
at org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:46)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java(Compiled Code))
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:136)
at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:274)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:730)
at org.ccpb14.fwk.dna.dadsu.DadsuLoader.loadDnasalarys(DadsuLoader.java:5859)
at org.ccpb14.fwk.dna.dadsu.DadsuLoader.load(DadsuLoader.java:226)
at org.ccpb14.entreprises.dna.actions.DnaDadsuLoaderAction.execute(DnaDadsuLoaderAction.java:66)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:226)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
at com.ibm.ws.webcontainer.servlet.ServicingServletState.service(StrictLifecycleServlet.java:333)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:1068)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:598)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:206)
at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1056)
at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:388)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:231)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:76)
at org.ccpb14.hibernate.HibernateFilter.doFilter(HibernateFilter.java:59)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:132)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:71)
at org.ccpb14.filters.LoginFilter.doFilter(LoginFilter.java:101)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:132)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:71)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:1064)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:598)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:206)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:80)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:214)
at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:182)
at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:623)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:447)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:672)
Caused by: COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver] CLI0109E Données de chaîne tronquées à droite. SQLSTATE=22001
at COM.ibm.db2.jdbc.app.SQLExceptionGenerator.throw_SQLException(SQLExceptionGenerator.java:275)
at COM.ibm.db2.jdbc.app.SQLExceptionGenerator.throw_SQLException(SQLExceptionGenerator.java(Inlined Compiled Code))
at COM.ibm.db2.jdbc.app.SQLExceptionGenerator.check_return_code(SQLExceptionGenerator.java(Compiled Code))
at COM.ibm.db2.jdbc.app.DB2PreparedStatement.execute2(DB2PreparedStatement.java(Compiled Code))
at COM.ibm.db2.jdbc.app.DB2PreparedStatement.executeUpdate(DB2PreparedStatement.java:1736)
at com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement.executeUpdate(WSJdbcPreparedStatement.java:462)
at org.hibernate.jdbc.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:22)
at org.hibernate.persister.entity.BasicEntityPersister.insert(BasicEntityPersister.java:1853)
... 59 more