IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Java Discussion :

Récupération de champs de formulaire


Sujet :

Java

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Futur Membre du Club
    Profil pro
    Inscrit en
    Septembre 2008
    Messages
    4
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Septembre 2008
    Messages : 4
    Par défaut Récupération de champs de formulaire
    Bonjour,

    Je débute en J2EE et je suis confrontée à un problème.

    En effet j'effectue la migration d'une application de WAS vers WASCE. Sur WAS et WASCE l'application web se lance correctement mais sur WASCE les valeurs de formulaires semblent ne pas être bien récupérées/interprétées au niveau des servlets.

    En effet dans les champs textes j'ai des valeurs du type:
    [LJAVA.LANG.STRING;@6C97A6A9
    L'application tourne avec Spring+Struts.

    En PJ une copie d'écran d'une page de l'application.

    J'ai pensé à la librairie cglib-nodep-2.2.jar mais cela ne semble pas provenir du proxy.

    Quelqu'un saurait-il m'indiquer d'où peut venir le problème ?

    Merci d'avance pour votre aide.
    Images attachées Images attachées  

  2. #2
    Membre Expert
    Avatar de olivier.pitton
    Homme Profil pro
    Développeur Java
    Inscrit en
    Juin 2012
    Messages
    355
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 36
    Localisation : France, Hauts de Seine (Île de France)

    Informations professionnelles :
    Activité : Développeur Java
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Juin 2012
    Messages : 355
    Par défaut
    Aucune exception n'est levée ?

  3. #3
    Futur Membre du Club
    Profil pro
    Inscrit en
    Septembre 2008
    Messages
    4
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Septembre 2008
    Messages : 4
    Par défaut
    Bonjour

    Dans la log de mon serveur d'application j'ai ceci:
    2013-08-09 10:50:38,463 ERROR [HtmlFormConverters] formulaire com.merapp.web.forms.ListeGroupeFamilleForm@2fb3d0d9 propriété ffc.code valeur [Ljava.lang.String;@6ba7398e exception java.lang.reflect.InvocationTargetException
    java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:616)
    at org.apache.commons.beanutils.PropertyUtilsBean.invokeMethod(PropertyUtilsBean.java:2170)
    at org.apache.commons.beanutils.PropertyUtilsBean.setSimpleProperty(PropertyUtilsBean.java:2151)
    at org.apache.commons.beanutils.PropertyUtilsBean.setNestedProperty(PropertyUtilsBean.java:1957)
    at org.apache.commons.beanutils.PropertyUtilsBean.setProperty(PropertyUtilsBean.java:2064)
    at org.apache.commons.beanutils.PropertyUtils.setProperty(PropertyUtils.java:858)
    at com.merapp.web.forms.converters.HtmlFormConverters.put(HtmlFormConverters.java:157)
    at org.apache.commons.beanutils.PropertyUtilsBean.setMappedProperty(PropertyUtilsBean.java:1873)
    at org.apache.commons.beanutils.PropertyUtilsBean.setMappedProperty(PropertyUtilsBean.java:1784)
    at org.apache.commons.beanutils.PropertyUtilsBean.setNestedProperty(PropertyUtilsBean.java:1953)
    at org.apache.commons.beanutils.PropertyUtilsBean.setProperty(PropertyUtilsBean.java:2064)
    at org.apache.commons.beanutils.BeanUtilsBean.setProperty(BeanUtilsBean.java:1017)
    at org.apache.commons.beanutils.BeanUtilsBean.populate(BeanUtilsBean.java:830)
    at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:433)
    at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:451)
    at org.apache.struts.chain.commands.servlet.PopulateActionForm.populate(PopulateActionForm.java:45)
    at org.apache.struts.chain.commands.AbstractPopulateActionForm.execute(AbstractPopulateActionForm.java:57)
    at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:48)
    at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
    at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304)
    at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
    at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:280)
    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1858)
    at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:459)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at com.merapp.security.LoginFilter.doFilter(LoginFilter.java:333)
    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:225)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
    at org.apache.geronimo.tomcat.security.SecurityValve.invoke(SecurityValve.java:89)
    at org.apache.geronimo.tomcat.security.jacc.JACCSecurityValve.invoke(JACCSecurityValve.java:54)
    at org.apache.geronimo.tomcat.GeronimoStandardContext$SystemMethodValve.invoke(GeronimoStandardContext.java:731)
    at org.apache.geronimo.tomcat.valve.GeronimoBeforeAfterValve.invoke(GeronimoBeforeAfterValve.java:48)
    at org.apache.geronimo.tomcat.valve.ProtectedTargetValve.invoke(ProtectedTargetValve.java:53)
    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:927)
    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:999)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:565)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:309)
    at org.apache.geronimo.pool.ThreadPool$1.run(ThreadPool.java:267)
    at org.apache.geronimo.pool.ThreadPool$ContextClassLoaderRunnable.run(ThreadPool.java:397)
    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:679)
    Caused by: java.lang.NumberFormatException: For input string: "[Ljava.lang.String;@6ba7398e"
    at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
    at java.lang.Integer.parseInt(Integer.java:481)
    at java.lang.Integer.parseInt(Integer.java:514)
    at com.merapp.web.forms.util.SelectableList.setMaximum(SelectableList.java:30)
    at com.merapp.web.forms.util.SelectableList.setCode(SelectableList.java:45)
    ... 57 more
    merci de votre aide.
    Alma

  4. #4
    Membre du Club
    Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Mars 2010
    Messages
    6
    Détails du profil
    Informations personnelles :
    Localisation : Tunisie

    Informations professionnelles :
    Activité : Ingénieur développement logiciels

    Informations forums :
    Inscription : Mars 2010
    Messages : 6
    Par défaut
    Citation Envoyé par almaongono Voir le message
    Caused by: java.lang.NumberFormatException: For input string: "[Ljava.lang.String;@6ba7398e"
    Normalement l'exception ici est lancée car un string a été inséré dans un champ qui doit contenir un nombre.
    J’espère que ça te résout ton problème.

  5. #5
    Expert éminent
    Avatar de tchize_
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Avril 2007
    Messages
    25 482
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 46
    Localisation : Belgique

    Informations professionnelles :
    Activité : Ingénieur développement logiciels
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Avril 2007
    Messages : 25 482
    Par défaut
    Visiblement, quelque part, dans ton code, tu balance des String[] (tableau) là où on attends un String (valeur simple). Du coup, commons bean utils fait ce qu'il est supposé faire, convertit le tableau en une String via sa méthode toString(), qui donne ce moche [Ljava.lang.String@....


    Visiblement, le code incriminé est dans

    com.merapp.web.forms.converters.HtmlFormConverters.put(HtmlFormConverters.java:157)

    qui balance un String[] là où on attends une String.

  6. #6
    Membre confirmé Avatar de JacNar6
    Homme Profil pro
    Développeur Java/Java EE/Android
    Inscrit en
    Mai 2012
    Messages
    163
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Cameroun

    Informations professionnelles :
    Activité : Développeur Java/Java EE/Android

    Informations forums :
    Inscription : Mai 2012
    Messages : 163
    Par défaut
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    Caused by: java.lang.NumberFormatException: For input string: "[Ljava.lang.String;@6ba7398e"
            at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
            at java.lang.Integer.parseInt(Integer.java:481)
            at java.lang.Integer.parseInt(Integer.java:514)
    Tu essaies de convertir en entier quelque chose qui n'en est pas un !

Discussions similaires

  1. php et récupération des champs du formulaire
    Par kadiato dans le forum EDI, CMS, Outils, Scripts et API
    Réponses: 12
    Dernier message: 07/05/2009, 16h45
  2. Réponses: 6
    Dernier message: 12/01/2007, 16h48
  3. Réponses: 3
    Dernier message: 27/09/2006, 19h50
  4. Réponses: 7
    Dernier message: 20/04/2006, 11h33
  5. Réponses: 16
    Dernier message: 17/06/2005, 15h51

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo