Bug #8485
ferméImpossible d'ajouter un enregistrement avec champ auto incrémenté
100%
Description
Nous avons une table:
CREATE TABLE mgic_hr_category
(
id integer NOT NULL DEFAULT nextval('mgic_hr_category_seq'::regclass),
labelfr character varying(128),
labelen character varying(128),
status integer,
comments character varying(256),
type integer,
CONSTRAINT prk_constraint_mgic_category PRIMARY Key(id)
Séquence :
CREATE SEQUENCE mgic_hr_category_seq
INCREMENT 1
MINVALUE 1
MAXVALUE 2147483648 START 39
CACHE 1;
A la validation nous avons l'erreur suivante :
java.lang.NumberFormatException: For input string:
Voir les copies écran
Fichiers
Mis à jour par Marc Avenel il y a presque 8 ans
- Fichier Category-Erreur2.PNG Category-Erreur2.PNG ajouté
- Fichier Category-Erreur1.PNG Category-Erreur1.PNG ajouté
Pièces jointes
Mis à jour par Marc Avenel il y a presque 8 ans
Détail des logs:
13/01/17-12:05:10,065 - ERROR : util.MSG_EXCEPTION_NOT_EMBEDED | MODULE : util.HomePageUtil.traceException() | Exception non encapsul�e dans une Silverpeas...Exception
java.lang.NumberFormatException: For input string: "YYYYY"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
at java.lang.Integer.parseInt(Integer.java:449)
at java.lang.Integer.parseInt(Integer.java:499)
at com.silverpeas.mydb.control.MyDBSessionController.setValueByType(MyDBSessionController.java:1295)
at com.silverpeas.mydb.control.MyDBSessionController.createDbLine(MyDBSessionController.java:861)
at com.silverpeas.mydb.servlets.MyDBRequestRouter.getUpdateLineDestination(MyDBRequestRouter.java:254)
at com.silverpeas.mydb.servlets.MyDBRequestRouter.getDestination(MyDBRequestRouter.java:114)
at com.silverpeas.mydb.servlets.MyDBRequestRouter.getDestination(MyDBRequestRouter.java:53)
at com.stratelia.silverpeas.peasCore.servlets.ComponentRequestRouter.computeDestination(ComponentRequestRouter.java:247)
at com.stratelia.silverpeas.peasCore.servlets.ComponentRequestRouter.doPost(ComponentRequestRouter.java:133)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
at com.stratelia.silverpeas.peasCore.servlets.SilverpeasHttpServlet.service(SilverpeasHttpServlet.java:49)
at com.stratelia.silverpeas.peasCore.servlets.SilverpeasAuthenticatedHttpServlet.service(SilverpeasAuthenticatedHttpServlet.java:81)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:324)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242)
at com.silverpeas.whitePages.filters.ComponentRequestRouterFilter.doFilter(ComponentRequestRouterFilter.java:74)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242)
at org.silverpeas.web.filter.MassiveWebSecurityFilter.doFilter(MassiveWebSecurityFilter.java:193)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242)
at org.silverpeas.web.filter.InternetExplorerAntiCompatibilityFilter.doFilter(InternetExplorerAntiCompatibilityFilter.java:48)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242)
at org.silverpeas.web.token.SessionSynchronizerTokenValidator.doFilter(SessionSynchronizerTokenValidator.java:103)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242)
at org.silverpeas.web.filter.MessageFilter.doFilter(MessageFilter.java:74)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242)
at org.silverpeas.web.filter.HttpServletRequestDecoration.doFilter(HttpServletRequestDecoration.java:60)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:181)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.event(CatalinaContext.java:285)
at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.invoke(CatalinaContext.java:261)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:88)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:100)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:159)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:53)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:654)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:951)
at java.lang.Thread.run(Thread.java:662)
13/01/17-12:05:10,068 - ERROR : util.MSG_EXCEPTION_NOT_EMBEDED | MODULE : util.HomePageUtil.traceException() | Exception non encapsul�e dans une Silverpeas...Exception (EXCEPTION : java.lang.NumberFormatException: For input string: "YYYYY"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
at java.lang.Integer.parseInt(Integer.java:449)
at java.lang.Integer.parseInt(Integer.java:499)
at com.silverpeas.mydb.control.MyDBSessionController.setValueByType(MyDBSessionController.java:1295)
at com.silverpeas.mydb.control.MyDBSessionController.createDbLine(MyDBSessionController.java:861)
at com.silverpeas.mydb.servlets.MyDBRequestRouter.getUpdateLineDestination(MyDBRequestRouter.java:254)
at com.silverpeas.mydb.servlets.MyDBRequestRouter.getDestination(MyDBRequestRouter.java:114)
at com.silverpeas.mydb.servlets.MyDBRequestRouter.getDestination(MyDBRequestRouter.java:53)
at com.stratelia.silverpeas.peasCore.servlets.ComponentRequestRouter.computeDestination(ComponentRequestRouter.java:247)
at com.stratelia.silverpeas.peasCore.servlets.ComponentRequestRouter.doPost(ComponentRequestRouter.java:133)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
at com.stratelia.silverpeas.peasCore.servlets.SilverpeasHttpServlet.service(SilverpeasHttpServlet.java:49)
at com.stratelia.silverpeas.peasCore.servlets.SilverpeasAuthenticatedHttpServlet.service(SilverpeasAuthenticatedHttpServlet.java:81)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:324)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242)
at com.silverpeas.whitePages.filters.ComponentRequestRouterFilter.doFilter(ComponentRequestRouterFilter.java:74)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242)
at org.silverpeas.web.filter.MassiveWebSecurityFilter.doFilter(MassiveWebSecurityFilter.java:193)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242)
at org.silverpeas.web.filter.InternetExplorerAntiCompatibilityFilter.doFilter(InternetExplorerAntiCompatibilityFilter.java:48)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242)
at org.silverpeas.web.token.SessionSynchronizerTokenValidator.doFilter(SessionSynchronizerTokenValidator.java:103)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242)
at org.silverpeas.web.filter.MessageFilter.doFilter(MessageFilter.java:74)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242)
at org.silverpeas.web.filter.HttpServletRequestDecoration.doFilter(HttpServletRequestDecoration.java:60)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:181)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.event(CatalinaContext.java:285)
at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.invoke(CatalinaContext.java:261)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:88)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:100)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:159)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:53)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:654)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:951)
at java.lang.Thread.run(Thread.java:662)
)
Mis à jour par David Lesimple il y a presque 8 ans
- Sujet changé de MYDB-Ajout enregistrement avec champ auto incrémenté à Impossible d'ajouter un enregistrement avec champ auto incrémenté
- Statut changé de New à Qualified
- Version cible mis à Version 5.15.6
- Votre version de Silverpeas changé de 5.15.3 à 5.15.5
Reproduit en 5.15.5. c'est bien du à la séquence, qui fait que la valeur des champs saisis est décalée sur la colonne suivante.
Mis à jour par Nicolas Eysseric il y a presque 8 ans
- Statut changé de Qualified à In progress...
- Assigné à mis à Nicolas Eysseric
- Navigateur changé de Firefox à Tous
Mis à jour par Nicolas Eysseric il y a presque 8 ans
- Statut changé de In progress... à Resolved
- % réalisé changé de 0 à 100
Anomalie corrigée.
De plus, lors de la création d'un nouvel enregistrement, le champ auto-incrémenté n'est plus affiché.
Traité par PR https://github.com/Silverpeas/Silverpeas-Components/pull/520
Mis à jour par Nicolas Eysseric il y a presque 8 ans
Oui, comme indiqué dans le champ Version cible.
Mis à jour par Yohann Chastagnier il y a presque 8 ans
- Statut changé de Resolved à Integration in progress...
Mis à jour par Yohann Chastagnier il y a presque 8 ans
- Statut changé de Integration in progress... à Closed
Validé et intégré.