Hi Samuel, I found the problem. Another Dev created a WOCOmponent and called it AjaxResponse. So sometime, er.ajax.Ajaxresponse is called in stead of the component AjaxResponse. I go to try to fix and make some tests.
Thanks Envoyé depuis iCloud Le 26 avril 2016 à 14:37, Samuel Pelletier <[email protected]> a écrit : Raymond, I suspect an error in a component definition (in the html or wod) you have a reference to AjaxResponse. I would try to do a text search of "AjaxResponse" in your project, you may have some unexpected results. Samuel Le 26 avr. 2016 à 03:51, Raymond NANEON <[email protected]> a écrit : Hi Samuel, I changed my classes names to ColAjaxAction extends ERXDirectAction and ColAjaxResponse extends myAjaxComponent which extends WOComponent. So no refrences of AjaxFramework classes but I still get the same exception. Here is entire stack : [code] avr. 26 09:39:07 Colloque[50889] WARN NSLog - <er.extensions.appserver.ERXDirectActionRequestHandler>: Exception while handling action named "listeModelesMail" on action class "ColAjaxAction" :java.lang.IllegalArgumentException: <com.webobjects.appserver._private.WOComponentDefinition> Class 'er.ajax.AjaxResponse' exists but is not a subclass of WOComponent. java.lang.IllegalArgumentException: <com.webobjects.appserver._private.WOComponentDefinition> Class 'er.ajax.AjaxResponse' exists but is not a subclass of WOComponent. at com.webobjects.appserver._private.WOComponentDefinition._componentClass(WOComponentDefinition.java:496) at com.webobjects.appserver._private.WOComponentDefinition.componentClass(WOComponentDefinition.java:504) at com.webobjects.appserver._private.WOComponentDefinition._componentInstanceInContext(WOComponentDefinition.java:510) at com.webobjects.appserver._private.WOComponentDefinition.componentInstanceInContext(WOComponentDefinition.java:642) at com.webobjects.appserver._private.WOComponentReference._pushComponentInContext(WOComponentReference.java:88) at com.webobjects.appserver._private.WOComponentReference.appendToResponse(WOComponentReference.java:134) at com.webobjects.appserver._private.WODynamicGroup.appendChildrenToResponse(WODynamicGroup.java:126) at com.webobjects.appserver._private.WODynamicGroup.appendToResponse(WODynamicGroup.java:136) at com.webobjects.appserver.WOComponent.appendToResponse(WOComponent.java:1122) at com.webobjects.appserver.WOComponent._appendPageToResponse(WOComponent.java:1574) at com.webobjects.appserver.WOComponent._generateResponseInContext(WOComponent.java:1543) at com.webobjects.appserver.WOComponent.generateResponse(WOComponent.java:1538) at com.webobjects.appserver._private.WOActionRequestHandler._handleRequest(WOActionRequestHandler.java:278) at com.webobjects.appserver._private.WOActionRequestHandler.handleRequest(WOActionRequestHandler.java:158) at er.extensions.appserver.ERXDirectActionRequestHandler.handleRequest(ERXDirectActionRequestHandler.java:128) at com.webobjects.appserver.WOApplication.dispatchRequest(WOApplication.java:1687) at er.extensions.appserver.ERXApplication.dispatchRequestImmediately(ERXApplication.java:2112) at er.extensions.appserver.ERXApplication.dispatchRequest(ERXApplication.java:2077) at fr.univlr.colloque.Application.dispatchRequest(Application.java:116) at com.webobjects.appserver._private.WOWorkerThread.runOnce(WOWorkerThread.java:144) at com.webobjects.appserver._private.WOWorkerThread.run(WOWorkerThread.java:226) at java.lang.Thread.run(Thread.java:745) avr. 26 09:39:07 Colloque[50889] ERROR er.extensions.appserver.ERXApplication - Exception caught: <com.webobjects.appserver._private.WOComponentDefinition> Class 'er.ajax.AjaxResponse' exists but is not a subclass of WOComponent. Extra info: { "Session" = "<fr.univlr.colloque.Session sessionID=2b6IvbG4Xo5PvpvbgHKySw timeOut(sec)=3600.0 terminating=false _wasTimedOut=false contextArray=((\"0\"), (\"2\"), (\"5\"), (\"7\")) contextPageInfos={0 = <com.webobjects.appserver._private.WOTransactionRecord responsePage=<fr.univlr.colloque.components.creationIndividu.CreationIndividu name: fr.univlr.colloque.components.creationIndividu.CreationIndividu subcomponents: {0 = <fr.univlr.colloque.components.globalItf.Template name: fr.univlr.colloque.components.globalItf.Template subcomponents: {0.1.21 = <fr.univlr.colloque.components.siteGen.MenuSite name: fr.univlr.colloque.components.siteGen.MenuSite subcomponents: null >; 0.1.19.0 = <fr.univlr.colloque.components.siteGen.FenetreConnexion name: fr.univlr.colloque.components.siteGen.FenetreConnexion subcomponents: null >; } >; 0.1.29.5 = <fr.univlr.colloque.components.globalItf.Identification name: fr.univlr.colloque.components.globalItf.Identification subcomponents: {0.1.29.5.0 = <fr.univlr.colloque.components.globalItf.Template name: fr.univlr.colloque.components.globalItf.Template subcomponents: null >; } >; 0.1.29.13.15 = <org.cocktail.fwkcktlwebapp.server.components.CktlDatePicker name: org.cocktail.fwkcktlwebapp.server.components.CktlDatePicker subcomponents: null >; 0.1.29.1.0 = <fr.univlr.colloque.components.globalItf.EtapeAriane name: fr.univlr.colloque.components.globalItf.EtapeAriane subcomponents: null >; } > requestSignature=null.null>; 2 = <com.webobjects.appserver._private.WOTransactionRecord responsePage=<com.webobjects.appserver.WORedirect name: com.webobjects.appserver.WORedirect subcomponents: null > requestSignature=0.0.1.29.5.0.3.1.3.3.15>; 5 = <com.webobjects.appserver._private.WOTransactionRecord responsePage=<fr.univlr.colloque.components.inscription.InscriptionColloque name: fr.univlr.colloque.components.inscription.InscriptionColloque subcomponents: {0 = <fr.univlr.colloque.components.globalItf.Template name: fr.univlr.colloque.components.globalItf.Template subcomponents: {0.1.21 = <fr.univlr.colloque.components.siteGen.MenuSite name: fr.univlr.colloque.components.siteGen.MenuSite subcomponents: null >; 0.1.19.0 = <fr.univlr.colloque.components.siteGen.FenetreConnexion name: fr.univlr.colloque.components.siteGen.FenetreConnexion subcomponents: null >; } >; 0.1.29.25.3 = <fr.univlr.colloque.components.globalItf.ListeEvenement name: fr.univlr.colloque.components.globalItf.ListeEvenement subcomponents: null >; 0.1.29.1 = <fr.univlr.colloque.components.globalItf.EtapeAriane name: fr.univlr.colloque.components.globalItf.EtapeAriane subcomponents: null >; 0.1.29.25.9.3 = <fr.univlr.colloque.components.parution.FormulaireQCM name: fr.univlr.colloque.components.parution.FormulaireQCM subcomponents: {0.1.29.25.9.3.1.1.1 = <fr.univlr.colloque.components.parution.FormulaireQuestion name: fr.univlr.colloque.components.parution.FormulaireQuestion subcomponents: {0.1.29.25.9.3.1.1.1.9.1 = <fr.univlr.colloque.components.parution.FormulaireQuestionTexte name: fr.univlr.colloque.components.parution.FormulaireQuestionTexte subcomponents: null >; } >; 0.1.29.25.9.3.1.0.1 = <fr.univlr.colloque.components.parution.FormulaireQuestion name: fr.univlr.colloque.components.parution.FormulaireQuestion subcomponents: {0.1.29.25.9.3.1.0.1.9.1 = <fr.univlr.colloque.components.parution.FormulaireQuestionTexte name: fr.univlr.colloque.components.parution.FormulaireQuestionTexte subcomponents: null >; } >; } >; } > requestSignature=null.null>; 7 = <com.webobjects.appserver._private.WOTransactionRecord responsePage=<fr.univlr.colloque.components.admin.OutilsCommunication name: fr.univlr.colloque.components.admin.OutilsCommunication subcomponents: {0 = <fr.univlr.colloque.components.globalItf.Template name: fr.univlr.colloque.components.globalItf.Template subcomponents: {0.1.21 = <fr.univlr.colloque.components.siteGen.MenuSite name: fr.univlr.colloque.components.siteGen.MenuSite subcomponents: null >; 0.1.19.0 = <fr.univlr.colloque.components.siteGen.FenetreConnexion name: fr.univlr.colloque.components.siteGen.FenetreConnexion subcomponents: null >; } >; 0.1.29.1.2 = <fr.univlr.colloque.components.siteGen.ToolTip name: fr.univlr.colloque.components.siteGen.ToolTip subcomponents: null >; 0.1.29.5 = <fr.univlr.colloque.components.admin.GestionMails name: fr.univlr.colloque.components.admin.GestionMails subcomponents: null >; } > requestSignature=null.null>; } languages=(\"French\", \"French_FR\", \"French\", \"English_US\", \"English\", \"Nonlocalized\") componentState={} currentContextID=9 distributionEnabled=false cookieRendezVousEnabled=true URLRendezVousEnabled=fals localizer=<er.extensions.localization.ERXLocalizer French> messageEncoding=<er.extensions.appserver.ERXMessageEncoding encoding: UTF-8> browser=<er.extensions.appserver.ERXBasicBrowser browserName: Firefox, version: 45.0, mozillaVersion: 5.0, platform: MacOS>>"; "CurrentComponent" = "fr.univlr.colloque.components.admin.ajax.ListeModelesMailsColloque"; "PreviousPageList" = ( "com.webobjects.appserver.WORedirect" ); "Headers" = { "referer" = "http://mac-naneon.utt.fr:50889/cgi-bin/WebObjects/Colloque.woa/wa/menu?code=3&idMenu=-19"; "accept-encoding" = "gzip, deflate"; "cookie" = "wosid=2b6IvbG4Xo5PvpvbgHKySw; woinst=-1"; "user-agent" = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Firefox/45.0"; "x-requested-with" = "XMLHttpRequest"; "accept" = "text/html, */*"; "dnt" = "1"; "host" = "mac-naneon.utt.fr:50889"; "accept-language" = "fr,fr-FR;q=0.8,en-US;q=0.5,en;q=0.3"; "connection" = "keep-alive"; }; "CurrentPage" = "fr.univlr.colloque.components.admin.ajax.ListeModelesMailsColloque"; "Bundles" = { "Ajax" = "6.0"; "ERExtensions" = "6.1.2"; "JavaWebObjects" = "5.4.3"; "FwkCktlThemes" = "1.0.25.2243fix"; "ERJars" = "6.0"; "JavaEOApplication" = "5.4.2"; "FwkCktlWebApp" = "1.0.25.2243fix"; "JavaJDBCAdaptor" = "5.4.3"; "JavaEOAccess" = "5.4.3"; "WOOgnl" = "6.0"; "FwkCktlDroitsUtils" = "1.0.25.2243fix"; "JavaEOControl" = "5.4.2"; "JavaXML" = "5.4.2"; "JavaWOExtensions" = "6.0"; "JavaFoundation" = "5.4.3"; "FwkCktlAjaxWebExt" = "1.0.25.2243fix"; "Colloque" = ""; "ERPrototypes" = "6.0"; }; "URL" = "/cgi-bin/WebObjects/Colloque.woa/wa/ColAjaxAction/listeModelesMail"; } IllegalArgumentException: <com.webobjects.appserver._private.WOComponentDefinition> Class 'er.ajax.AjaxResponse' exists but is not a subclass of WOComponent. at com.webobjects.appserver._private.WOComponentDefinition._componentClass(WOComponentDefinition.java:496) ... skipped 17 stack elements at fr.univlr.colloque.Application.dispatchRequest(Application.java:116) ... skipped 3 stack elements _ignoredPackages:: ("com.webobjects", "java.applet", "java.awt", "java.awt.datatransfer", "java.awt.event", "java.awt.image", "java.beans", "java.io", "java.lang", "java.lang.reflect", "java.math", "java.net", "java.rmi", "java.rmi.dgc", "java.rmi.registry", "java.rmi.server", "java.security", "java.security.acl", "java.security.interfaces", "java.sql", "java.text", "java.util", "java.util.zip") [/code] I get this exception because I return a WOComponent in stead of AjaxResponse in a call JS/Ajax? Thanks Envoyé depuis iCloud Le 25 avril 2016 à 18:54, Samuel Pelletier <[email protected]> a écrit : Hi, The problem seems to be a class in your code that already exists in the AjaxFramework and this confuse WO. A WOComponent (or EOEntity) name need to match a single class name if the entire class path or you will have troubles. Check for classes with generic names like AjaxAction, AjaxResponse that may already exists. Thierry is few error or strange things in the ajaxResponse() method: 1- AjaxResponse is defined in the AjaxFramework is is not a WOComponent, it's parent is ERXResponse. This method is not supposed to compile... 2- ERXDirectAction contain a methodPageWithName(Class<T> componentClass), I suggest you use it, it is way more clean. 3- You can use the returned component class as return type, it is constant. Samuel Le 25 avr. 2016 à 10:43, Raymond NANEON <[email protected]> a écrit : Hi JF, I have a spefic AjaxAction which extends ERXDirectAction uses speficly to call some directAction from javascript. i.e : in my JsFile ==> function modifierModele(idModele){ //Preparation de la requete ... var url_requete = url_serveur+"/wa/AjaxAction/modifierModeleMail?idModeleMail="+idModele+"&objet="+objet+"&message=\""+message+"\""; ajaxRequest({ type:'GET', url: url_requete, async: false, cache: false, mimeType:"text/plain", contentType: false, processData: false, success:function(xml){ //Si la requete s'est bien produite on raffraichit le modele actuellement affiche if( $(xml).find('error').length!=0 && $(xml).find('error').text()=='false')afficherModele(idModele); else ajaxTooltip({html:'ERREUR:'+$(xml).find('msg').text()}); } }); } In my AjaxAction Class : public WOActionResults modifierModeleMailAction() { ... try { ... if (sess.saveChanges()) return ajaxResponse(false, "succes"); return ajaxResponse(true, "Erreur lors de l'enregistrement des donnees"); } catch (Exception e) { return ajaxResponse(true, "Arguments de la requete invalides"); } } private WOComponent ajaxResponse(boolean error, String message) { AjaxResponse response = (AjaxResponse) pageWithName(AjaxResponse.class .getName()); response.setError(error); response.setMessage(message); return response; } I want say that my AjaxResponse is already a WOComponent ? May be I must Cast it as WOComponent ? Thanks ... Envoyé depuis iCloud Le 25 avril 2016 à 15:17, Jean-François Veillette <[email protected]> a écrit : Sorry all … In English … Hi Raymond, The stack is missing too many elements. From what we can see, it seems that your action is executing properly but returning result as an AjaxResponse, but the handler is expecting a WOComponent. Could it be that fr.univlr.colloque.components.admin.ajax.ListeUtilisateursGroupe is returning an AjaxResponse but the handler expect a WOComponent? We need more stack frame to be able to identify where you are in the RRL and what could be the cause of this. jfv On Apr 25, 2016, at 9:13 AM, Jean-François Veillette <[email protected]> wrote: Bonjour Raymond, La stack manque plusieurs niveaux. Selon le peu que l’on a comme information, on en comprend que la requête a bien été exécuté, a retourné une AjaxResponse, mais que le « handler » s’attendais à recevoir un WOComponent. fr.univlr.colloque.components.admin.ajax.ListeUtilisateursGroupe retourne une AjaxResponse, mais le « handler » s’attend à un « WOComponent » ? On a besoin de plus d’élément dans la stack pour voir ou ce passe l’exception dans la RRL. jfv On Apr 25, 2016, at 2:15 AM, Raymond NANEON <[email protected]> wrote: Hi List, Nobody has had this kind of exception? I would like to fix it but I don't know where I can touch. Thanks to take a moment to look at it. Ray Envoyé depuis iCloud Le 21 mars 2016 à 11:30, Raymond NANEON <[email protected]> a écrit : Hi List, I am trying to call some specifics components using AjaxAction in javascript. It works sometimes and sometimes not and I don't understand why? Yes I know the exception tells me ajaxResponse ... but why it works sometimes? here is stacktrace : "CurrentComponent" = "fr.univlr.colloque.components.admin.ajax.ListeUtilisateursGroupe"; "PreviousPageList" = ( "com.webobjects.appserver.WORedirect" ); }; "URL" = "/cgi-bin/WebObjects/Colloque.woa/1/wa/AjaxAction/listeUtilisateursGroupe?idGroupe=11"; } IllegalArgumentException: <com.webobjects.appserver._private.WOComponentDefinition> Class 'er.ajax.AjaxResponse' exists but is not a subclass of WOComponent. at com.webobjects.appserver._private.WOComponentDefinition._componentClass(WOComponentDefinition.java:496) ... skipped 17 stack elements at fr.univlr.colloque.Application.dispatchRequest(Application.java:116) ... skipped 3 stack elements _ignoredPackages:: () How can I avoid this problem in the future? Thanks for help Envoyé depuis iCloud _______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/rnaneon%40me.com This email sent to [email protected] _______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/jean_francois_veillette%40yahoo.ca This email sent to [email protected] _______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/samuel%40samkar.com This email sent to [email protected]
_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [email protected]
