Thread: [Mdarad-toolbox-devs] Validation bug?
Brought to you by:
erifr
|
From: Vincent-Olivier A. <vi...@up...> - 2006-01-04 13:09:26
|
Hi guys, When browsing the GIR project forms newly generated with a recent CVS update including the new struts validation, I encountered the following (on clicking "edit" for an entity composition) : org.apache.commons.beanutils.ConversionException: Cannot assign value of type 'java.lang.Float' to property 'com_investissementresponsable_catalog_document_enterprise_Board_independencePercent' of type 'java.lang.String' org.apache.struts.action.DynaActionForm.set(DynaActionForm.java:422) com.investissementresponsable.catalog.document.enterprise.struts.board.BoardAbstractAction.populateBoardForm(BoardAbstractAction.java:97) com.investissementresponsable.catalog.document.enterprise.struts.board.BoardFormAction.execute(BoardFormAction.java:36) org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419) org.mdarad.framework.util.struts.AbstractRequestProcessor.processActionPerform(AbstractRequestProcessor.java:61) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194) org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432) javax.servlet.http.HttpServlet.service(HttpServlet.java:709) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1063) org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:263) org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:386) org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:318) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:229) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194) org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432) javax.servlet.http.HttpServlet.service(HttpServlet.java:709) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) I may be wrong here (I didn't have time to look into the code), but isn't the MDARAD library supposed to handle String <--> Float conversion in forms? Vincent |
|
From: <fra...@po...> - 2006-01-10 14:22:16
|
Hi VO, Is this bug blocking? Have you corrected it? Also I'm not sure th conversions should be done in mdarad-framework. = =20 Since Dataisland manages its primitives, I think it should also manag= e=20 the conversions in different types (xml, string, etc.), their validat= ion=20 and most of the specific business logic associated with it. Mdarad= =20 should not know the different primitives.=20 What do you think? Fran=E7ois Vincent-Olivier Arsenault wrote: > Hi guys, > > When browsing the GIR project forms newly generated with a recent C= VS=20 > update including the new struts validation, I encountered the=20 > following (on clicking "edit" for an entity composition) : > > org.apache.commons.beanutils.ConversionException: Cannot assign val= ue=20 > of type 'java.lang.Float' to property=20 > 'com_investissementresponsable_catalog_document_enterprise_Board_in= dependencePercent'=20 > of type 'java.lang.String' > org.apache.struts.action.DynaActionForm.set(DynaActionForm.java= :422) > com.investissementresponsable.catalog.document.enterprise.strut= s.board.BoardAbstractAction.populateBoardForm(BoardAbstractAction.jav= a:97)=20 > > com.investissementresponsable.catalog.document.enterprise.strut= s.board.BoardFormAction.execute(BoardFormAction.java:36)=20 > > org.apache.struts.action.RequestProcessor.processActionPerform(= RequestProcessor.java:419)=20 > > org.mdarad.framework.util.struts.AbstractRequestProcessor.proce= ssActionPerform(AbstractRequestProcessor.java:61)=20 > > org.apache.struts.action.RequestProcessor.process(RequestProces= sor.java:224)=20 > > org.apache.struts.action.ActionServlet.process(ActionServlet.ja= va:1194)=20 > > org.apache.struts.action.ActionServlet.doPost(ActionServlet.jav= a:432) > javax.servlet.http.HttpServlet.service(HttpServlet.java:709) > javax.servlet.http.HttpServlet.service(HttpServlet.java:802) > org.apache.struts.action.RequestProcessor.doForward(RequestProc= essor.java:1063)=20 > > org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRe= questProcessor.java:263)=20 > > org.apache.struts.action.RequestProcessor.processForwardConfig(= RequestProcessor.java:386)=20 > > org.apache.struts.tiles.TilesRequestProcessor.processForwardCon= fig(TilesRequestProcessor.java:318)=20 > > org.apache.struts.action.RequestProcessor.process(RequestProces= sor.java:229)=20 > > org.apache.struts.action.ActionServlet.process(ActionServlet.ja= va:1194)=20 > > org.apache.struts.action.ActionServlet.doPost(ActionServlet.jav= a:432) > javax.servlet.http.HttpServlet.service(HttpServlet.java:709) > javax.servlet.http.HttpServlet.service(HttpServlet.java:802) > > I may be wrong here (I didn't have time to look into the code), but= =20 > isn't the MDARAD library supposed to handle String <--> Float=20 > conversion in forms? > > Vincent > > > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do you grep through = log=20 > files > for problems? Stop! Download the new AJAX search engine that make= s > searching your log files as easy as surfing the web. DOWNLOAD SPL= UNK! > http://ads.osdn.com/?ad_id=3D7637&alloc_id=3D16865&op=3Dclick > _______________________________________________ > Mdarad-toolbox-devs mailing list > Mda...@li... > https://lists.sourceforge.net/lists/listinfo/mdarad-toolbox-devs > > |
|
From: Vincent-Olivier A. <vi...@ha...> - 2006-01-10 17:11:25
|
Yes, it is blocking : every time you save an entity with a float=20 attribute, it crashes. I won't have time to look at it until tomorrow=20 (and would appreciate some help). I don't think it is a primitive thing because it is struts-specific=20 (relies on the java type of the attribute). Anyways, let me know if you have time to look at it and find something. Thanks Vio Fran=E7ois Eric wrote: > Hi VO, > > Is this bug blocking? Have you corrected it? > > Also I'm not sure th conversions should be done in mdarad-framework. =20 > Since Dataisland manages its primitives, I think it should also manage=20 > the conversions in different types (xml, string, etc.), their=20 > validation and most of the specific business logic associated with=20 > it. Mdarad should not know the different primitives. > What do you think? > > Fran=E7ois > > > Vincent-Olivier Arsenault wrote: > >> Hi guys, >> >> When browsing the GIR project forms newly generated with a recent CVS=20 >> update including the new struts validation, I encountered the=20 >> following (on clicking "edit" for an entity composition) : >> >> org.apache.commons.beanutils.ConversionException: Cannot assign value=20 >> of type 'java.lang.Float' to property=20 >> 'com_investissementresponsable_catalog_document_enterprise_Board_indep= endencePercent'=20 >> of type 'java.lang.String' >> org.apache.struts.action.DynaActionForm.set(DynaActionForm.java:42= 2) >> =20 >> com.investissementresponsable.catalog.document.enterprise.struts.board= .BoardAbstractAction.populateBoardForm(BoardAbstractAction.java:97)=20 >> >> =20 >> com.investissementresponsable.catalog.document.enterprise.struts.board= .BoardFormAction.execute(BoardFormAction.java:36)=20 >> >> =20 >> org.apache.struts.action.RequestProcessor.processActionPerform(Request= Processor.java:419)=20 >> >> =20 >> org.mdarad.framework.util.struts.AbstractRequestProcessor.processActio= nPerform(AbstractRequestProcessor.java:61)=20 >> >> =20 >> org.apache.struts.action.RequestProcessor.process(RequestProcessor.jav= a:224)=20 >> >> =20 >> org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194= ) >> =20 >> org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432) >> javax.servlet.http.HttpServlet.service(HttpServlet.java:709) >> javax.servlet.http.HttpServlet.service(HttpServlet.java:802) >> =20 >> org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.j= ava:1063)=20 >> >> =20 >> org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestPr= ocessor.java:263)=20 >> >> =20 >> org.apache.struts.action.RequestProcessor.processForwardConfig(Request= Processor.java:386)=20 >> >> =20 >> org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(Til= esRequestProcessor.java:318)=20 >> >> =20 >> org.apache.struts.action.RequestProcessor.process(RequestProcessor.jav= a:229)=20 >> >> =20 >> org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194= ) >> =20 >> org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432) >> javax.servlet.http.HttpServlet.service(HttpServlet.java:709) >> javax.servlet.http.HttpServlet.service(HttpServlet.java:802) >> >> I may be wrong here (I didn't have time to look into the code), but=20 >> isn't the MDARAD library supposed to handle String <--> Float=20 >> conversion in forms? >> >> Vincent >> >> >> ------------------------------------------------------- >> This SF.net email is sponsored by: Splunk Inc. Do you grep through=20 >> log files >> for problems? Stop! Download the new AJAX search engine that makes >> searching your log files as easy as surfing the web. DOWNLOAD SPLUNK= ! >> http://ads.osdn.com/?ad_id=3D7637&alloc_id=3D16865&op=3Dclick >> _______________________________________________ >> Mdarad-toolbox-devs mailing list >> Mda...@li... >> https://lists.sourceforge.net/lists/listinfo/mdarad-toolbox-devs >> >> > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do you grep through log=20 > files > for problems? Stop! Download the new AJAX search engine that makes > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! > http://ads.osdn.com/?ad_idv37&alloc_id=16865&op=3Dclick > _______________________________________________ > Mdarad-toolbox-devs mailing list > Mda...@li... > https://lists.sourceforge.net/lists/listinfo/mdarad-toolbox-devs > |
|
From: <fra...@po...> - 2006-01-10 18:30:16
|
I have just tried it with TotalTest and it seems to work fine. In th= is=20 model Item has a listPrice which is a float.=20 I'm not sure why you are encountering this problem but is it possible= =20 that you customized some of the code in BoardAbstractAction or=20 BoardFormAction? Maybe compare your custom code with the newly=20 generated code because it seems to work fine for me. Hope this helps. Unfortunately I won't have much more time today to= =20 help you out. Good luck, Frank Vincent-Olivier Arsenault wrote: > Yes, it is blocking : every time you save an entity with a float= =20 > attribute, it crashes. I won't have time to look at it until tomorr= ow=20 > (and would appreciate some help). > > I don't think it is a primitive thing because it is struts-specific= =20 > (relies on the java type of the attribute). > > Anyways, let me know if you have time to look at it and find someth= ing. > > Thanks > > Vio > > > > Fran=E7ois Eric wrote: > >> Hi VO, >> >> Is this bug blocking? Have you corrected it? >> >> Also I'm not sure th conversions should be done in mdarad-framewor= k. =20 >> Since Dataisland manages its primitives, I think it should also= =20 >> manage the conversions in different types (xml, string, etc.), the= ir=20 >> validation and most of the specific business logic associated with= =20 >> it. Mdarad should not know the different primitives. >> What do you think? >> >> Fran=E7ois >> >> >> Vincent-Olivier Arsenault wrote: >> >>> Hi guys, >>> >>> When browsing the GIR project forms newly generated with a recent= =20 >>> CVS update including the new struts validation, I encountered the= =20 >>> following (on clicking "edit" for an entity composition) : >>> >>> org.apache.commons.beanutils.ConversionException: Cannot assign= =20 >>> value of type 'java.lang.Float' to property=20 >>> 'com_investissementresponsable_catalog_document_enterprise_Board_= independencePercent'=20 >>> of type 'java.lang.String' >>> =20 >>> org.apache.struts.action.DynaActionForm.set(DynaActionForm.java:4= 22) >>> =20 >>> com.investissementresponsable.catalog.document.enterprise.struts.= board.BoardAbstractAction.populateBoardForm(BoardAbstractAction.java:= 97)=20 >>> >>> =20 >>> com.investissementresponsable.catalog.document.enterprise.struts.= board.BoardFormAction.execute(BoardFormAction.java:36)=20 >>> >>> =20 >>> org.apache.struts.action.RequestProcessor.processActionPerform(Re= questProcessor.java:419)=20 >>> >>> =20 >>> org.mdarad.framework.util.struts.AbstractRequestProcessor.process= ActionPerform(AbstractRequestProcessor.java:61)=20 >>> >>> =20 >>> org.apache.struts.action.RequestProcessor.process(RequestProcesso= r.java:224)=20 >>> >>> =20 >>> org.apache.struts.action.ActionServlet.process(ActionServlet.java= :1194) >>> =20 >>> org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:= 432) >>> javax.servlet.http.HttpServlet.service(HttpServlet.java:709) >>> javax.servlet.http.HttpServlet.service(HttpServlet.java:802) >>> =20 >>> org.apache.struts.action.RequestProcessor.doForward(RequestProces= sor.java:1063)=20 >>> >>> =20 >>> org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequ= estProcessor.java:263)=20 >>> >>> =20 >>> org.apache.struts.action.RequestProcessor.processForwardConfig(Re= questProcessor.java:386)=20 >>> >>> =20 >>> org.apache.struts.tiles.TilesRequestProcessor.processForwardConfi= g(TilesRequestProcessor.java:318)=20 >>> >>> =20 >>> org.apache.struts.action.RequestProcessor.process(RequestProcesso= r.java:229)=20 >>> >>> =20 >>> org.apache.struts.action.ActionServlet.process(ActionServlet.java= :1194) >>> =20 >>> org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:= 432) >>> javax.servlet.http.HttpServlet.service(HttpServlet.java:709) >>> javax.servlet.http.HttpServlet.service(HttpServlet.java:802) >>> >>> I may be wrong here (I didn't have time to look into the code), b= ut=20 >>> isn't the MDARAD library supposed to handle String <--> Float= =20 >>> conversion in forms? >>> >>> Vincent >>> >>> >>> ------------------------------------------------------- >>> This SF.net email is sponsored by: Splunk Inc. Do you grep throug= h=20 >>> log files >>> for problems? Stop! Download the new AJAX search engine that ma= kes >>> searching your log files as easy as surfing the web. DOWNLOAD S= PLUNK! >>> http://ads.osdn.com/?ad_id=3D7637&alloc_id=3D16865&op=3Dclick >>> _______________________________________________ >>> Mdarad-toolbox-devs mailing list >>> Mda...@li... >>> https://lists.sourceforge.net/lists/listinfo/mdarad-toolbox-devs >>> >>> >> >> >> >> >> ------------------------------------------------------- >> This SF.net email is sponsored by: Splunk Inc. Do you grep through= =20 >> log files >> for problems? Stop! Download the new AJAX search engine that mak= es >> searching your log files as easy as surfing the web. DOWNLOAD SP= LUNK! >> http://ads.osdn.com/?ad_idv37&alloc_id=16865&op=3Dclick >> _______________________________________________ >> Mdarad-toolbox-devs mailing list >> Mda...@li... >> https://lists.sourceforge.net/lists/listinfo/mdarad-toolbox-devs >> > > > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do you grep through = log=20 > files > for problems? Stop! Download the new AJAX search engine that make= s > searching your log files as easy as surfing the web. DOWNLOAD SPL= UNK! > http://ads.osdn.com/?ad_idv37&alloc_id=16865&op=CCk > _______________________________________________ > Mdarad-toolbox-devs mailing list > Mda...@li... > https://lists.sourceforge.net/lists/listinfo/mdarad-toolbox-devs > > > |
|
From: Vincent-Olivier A. <vi...@ha...> - 2006-01-11 16:25:51
|
Sorry, it is not with the "float" primitive but with the "percentage"=20 primitive. I'm zeroing on a solution, but it I don't find, I'll post back= . Vio Fran=E7ois Eric wrote: > I have just tried it with TotalTest and it seems to work fine. In=20 > this model Item has a listPrice which is a float. > I'm not sure why you are encountering this problem but is it possible=20 > that you customized some of the code in BoardAbstractAction or=20 > BoardFormAction? Maybe compare your custom code with the newly=20 > generated code because it seems to work fine for me. > > Hope this helps. Unfortunately I won't have much more time today to=20 > help you out. > > Good luck, > > Frank > > Vincent-Olivier Arsenault wrote: > >> Yes, it is blocking : every time you save an entity with a float=20 >> attribute, it crashes. I won't have time to look at it until tomorrow=20 >> (and would appreciate some help). >> >> I don't think it is a primitive thing because it is struts-specific=20 >> (relies on the java type of the attribute). >> >> Anyways, let me know if you have time to look at it and find something= . >> >> Thanks >> >> Vio >> >> >> >> Fran=E7ois Eric wrote: >> >>> Hi VO, >>> >>> Is this bug blocking? Have you corrected it? >>> >>> Also I'm not sure th conversions should be done in=20 >>> mdarad-framework. Since Dataisland manages its primitives, I think=20 >>> it should also manage the conversions in different types (xml,=20 >>> string, etc.), their validation and most of the specific business=20 >>> logic associated with it. Mdarad should not know the different=20 >>> primitives. >>> What do you think? >>> >>> Fran=E7ois >>> >>> >>> Vincent-Olivier Arsenault wrote: >>> >>>> Hi guys, >>>> >>>> When browsing the GIR project forms newly generated with a recent=20 >>>> CVS update including the new struts validation, I encountered the=20 >>>> following (on clicking "edit" for an entity composition) : >>>> >>>> org.apache.commons.beanutils.ConversionException: Cannot assign=20 >>>> value of type 'java.lang.Float' to property=20 >>>> 'com_investissementresponsable_catalog_document_enterprise_Board_ind= ependencePercent'=20 >>>> of type 'java.lang.String' >>>> =20 >>>> org.apache.struts.action.DynaActionForm.set(DynaActionForm.java:422) >>>> =20 >>>> com.investissementresponsable.catalog.document.enterprise.struts.boa= rd.BoardAbstractAction.populateBoardForm(BoardAbstractAction.java:97)=20 >>>> >>>> =20 >>>> com.investissementresponsable.catalog.document.enterprise.struts.boa= rd.BoardFormAction.execute(BoardFormAction.java:36)=20 >>>> >>>> =20 >>>> org.apache.struts.action.RequestProcessor.processActionPerform(Reque= stProcessor.java:419)=20 >>>> >>>> =20 >>>> org.mdarad.framework.util.struts.AbstractRequestProcessor.processAct= ionPerform(AbstractRequestProcessor.java:61)=20 >>>> >>>> =20 >>>> org.apache.struts.action.RequestProcessor.process(RequestProcessor.j= ava:224)=20 >>>> >>>> =20 >>>> org.apache.struts.action.ActionServlet.process(ActionServlet.java:11= 94)=20 >>>> >>>> =20 >>>> org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432= ) >>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:709) >>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:802) >>>> =20 >>>> org.apache.struts.action.RequestProcessor.doForward(RequestProcessor= .java:1063)=20 >>>> >>>> =20 >>>> org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequest= Processor.java:263)=20 >>>> >>>> =20 >>>> org.apache.struts.action.RequestProcessor.processForwardConfig(Reque= stProcessor.java:386)=20 >>>> >>>> =20 >>>> org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(T= ilesRequestProcessor.java:318)=20 >>>> >>>> =20 >>>> org.apache.struts.action.RequestProcessor.process(RequestProcessor.j= ava:229)=20 >>>> >>>> =20 >>>> org.apache.struts.action.ActionServlet.process(ActionServlet.java:11= 94)=20 >>>> >>>> =20 >>>> org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432= ) >>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:709) >>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:802) >>>> >>>> I may be wrong here (I didn't have time to look into the code), but=20 >>>> isn't the MDARAD library supposed to handle String <--> Float=20 >>>> conversion in forms? >>>> >>>> Vincent >>>> >>>> >>>> ------------------------------------------------------- >>>> This SF.net email is sponsored by: Splunk Inc. Do you grep through=20 >>>> log files >>>> for problems? Stop! Download the new AJAX search engine that makes >>>> searching your log files as easy as surfing the web. DOWNLOAD=20 >>>> SPLUNK! >>>> http://ads.osdn.com/?ad_id=3D7637&alloc_id=3D16865&op=3Dclick >>>> _______________________________________________ >>>> Mdarad-toolbox-devs mailing list >>>> Mda...@li... >>>> https://lists.sourceforge.net/lists/listinfo/mdarad-toolbox-devs >>>> >>>> >>> >>> >>> >>> >>> ------------------------------------------------------- >>> This SF.net email is sponsored by: Splunk Inc. Do you grep through=20 >>> log files >>> for problems? Stop! Download the new AJAX search engine that makes >>> searching your log files as easy as surfing the web. DOWNLOAD SPLUN= K! >>> http://ads.osdn.com/?ad_idv37&alloc_id=16865&op=3Dclick >>> _______________________________________________ >>> Mdarad-toolbox-devs mailing list >>> Mda...@li... >>> https://lists.sourceforge.net/lists/listinfo/mdarad-toolbox-devs >>> >> >> >> ------------------------------------------------------- >> This SF.net email is sponsored by: Splunk Inc. Do you grep through=20 >> log files >> for problems? Stop! Download the new AJAX search engine that makes >> searching your log files as easy as surfing the web. DOWNLOAD SPLUNK= ! >> http://ads.osdn.com/?ad_idv37&alloc_id=16865&op=CCk >> _______________________________________________ >> Mdarad-toolbox-devs mailing list >> Mda...@li... >> https://lists.sourceforge.net/lists/listinfo/mdarad-toolbox-devs >> >> >> > > --=20 Vincent-Olivier Arsenault architecte de syst=E8mes web 2.0 / web 2.0 system architect vi...@ha...=20 ++514-998-1380 Halfbit / UP4C Inc. 206 boulevard Saint-Joseph Ouest Montr=E9al (Qu=E9bec) H2T 2P8 CANADA www.halfbit.com |