Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: Trunk
    • Fix Version/s: 16.11.01
    • Component/s: example
    • Labels:
      None

      Description

      I am running SVN version 1737587.

      Problem
      =======
      I navigate to https://localhost:8443/example/control/FormWidgetExamples, and found the following error on the page:

      org.ofbiz.widget.renderer.ScreenRenderException: Error rendering screen [component://example/widget/example/FormWidgetExampleScreens.xml#FormWidgetExamples]: org.ofbiz.widget.renderer.ScreenRenderException: Error rendering screen [component://example/widget/example/CommonScreens.xml#main-decorator]: org.ofbiz.widget.renderer.ScreenRenderException: Error rendering screen [component://common/widget/CommonScreens.xml#GlobalDecorator]: java.lang.RuntimeException: Error rendering included form named [DropDownFieldsExampleForm] at location [component://example/widget/example/FormWidgetExampleForms.xml]: java.lang.IllegalArgumentException: The field name (or key) [-description] is not valid for entity [ExampleType].java.lang.IllegalArgumentException: The field name (or key) [-description] is not valid for entity [ExampleType]. (Error rendering included form named [DropDownFieldsExampleForm] at location [component://example/widget/example/FormWidgetExampleForms.xml]: java.lang.IllegalArgumentException: The field name (or key) [-description] is not valid for entity [ExampleType].java.lang.IllegalArgumentException: The field name (or key) [-description] is not valid for entity [ExampleType].) (Error rendering screen [component://common/widget/CommonScreens.xml#GlobalDecorator]: java.lang.RuntimeException: Error rendering included form named [DropDownFieldsExampleForm] at location [component://example/widget/example/FormWidgetExampleForms.xml]: java.lang.IllegalArgumentException: The field name (or key) [-description] is not valid for entity [ExampleType].java.lang.IllegalArgumentException: The field name (or key) [-description] is not valid for entity [ExampleType]. (Error rendering included form named [DropDownFieldsExampleForm] at location [component://example/widget/example/FormWidgetExampleForms.xml]: java.lang.IllegalArgumentException: The field name (or key) [-description] is not valid for entity [ExampleType].java.lang.IllegalArgumentException: The field name (or key) [-description] is not valid for entity [ExampleType].)) (Error rendering screen [component://example/widget/example/CommonScreens.xml#main-decorator]: org.ofbiz.widget.renderer.ScreenRenderException: Error rendering screen [component://common/widget/CommonScreens.xml#GlobalDecorator]: java.lang.RuntimeException: Error rendering included form named [DropDownFieldsExampleForm] at location [component://example/widget/example/FormWidgetExampleForms.xml]: java.lang.IllegalArgumentException: The field name (or key) [-description] is not valid for entity [ExampleType].java.lang.IllegalArgumentException: The field name (or key) [-description] is not valid for entity [ExampleType]. (Error rendering included form named [DropDownFieldsExampleForm] at location [component://example/widget/example/FormWidgetExampleForms.xml]: java.lang.IllegalArgumentException: The field name (or key) [-description] is not valid for entity [ExampleType].java.lang.IllegalArgumentException: The field name (or key) [-description] is not valid for entity [ExampleType].) (Error rendering screen [component://common/widget/CommonScreens.xml#GlobalDecorator]: java.lang.RuntimeException: Error rendering included form named [DropDownFieldsExampleForm] at location [component://example/widget/example/FormWidgetExampleForms.xml]: java.lang.IllegalArgumentException: The field name (or key) [-description] is not valid for entity [ExampleType].java.lang.IllegalArgumentException: The field name (or key) [-description] is not valid for entity [ExampleType]. (Error rendering included form named [DropDownFieldsExampleForm] at location [component://example/widget/example/FormWidgetExampleForms.xml]: java.lang.IllegalArgumentException: The field name (or key) [-description] is not valid for entity [ExampleType].java.lang.IllegalArgumentException: The field name (or key) [-description] is not valid for entity [ExampleType].)))
      

        Activity

        Hide
        jacques.le.roux Jacques Le Roux added a comment -

        It's weird that it does not reproduce on demo https://demo-trunk-ofbiz.apache.org/example/control/FormWidgetExamples since last change was around noon yesterday and the instances are restarted from scratch every night.

        Anyway I reproduce locally even after a "svn up && ant clean-data load-demo start"

        Show
        jacques.le.roux Jacques Le Roux added a comment - It's weird that it does not reproduce on demo https://demo-trunk-ofbiz.apache.org/example/control/FormWidgetExamples since last change was around noon yesterday and the instances are restarted from scratch every night. Anyway I reproduce locally even after a "svn up && ant clean-data load-demo start"
        Hide
        pandeypranay Pranay Pandey added a comment -

        Yes you are right, it's weird, I am also able to reproduce it locally.

        Show
        pandeypranay Pranay Pandey added a comment - Yes you are right, it's weird, I am also able to reproduce it locally.
        Hide
        jacques.le.roux Jacques Le Roux added a comment -

        It could be related with OFBIZ-3311, see the top of stack

        2016-04-07 23:32:16,548 |http-bio-8443-exec-1 |ModelScreenWidget             |E| Error rendering included form named [DropDownFieldsExampleForm] at location [component://example/widget/example/FormWidgetExamp
        leForms.xml]: java.lang.IllegalArgumentException: The field name (or key) [-description] is not valid for entity [ExampleType].
        java.lang.IllegalArgumentException: The field name (or key) [-description] is not valid for entity [ExampleType].
                at org.ofbiz.entity.GenericEntity.get(GenericEntity.java:373) ~[ofbiz-entity.jar:?]
                at org.ofbiz.entity.GenericEntity.get(GenericEntity.java:788) ~[ofbiz-entity.jar:?]
                at org.ofbiz.entity.GenericEntity.get(GenericEntity.java:773) ~[ofbiz-entity.jar:?]
                at org.ofbiz.entity.util.EntityUtil.localizedOrderBy(EntityUtil.java:356) ~[ofbiz-entity.jar:?]
                at org.ofbiz.widget.model.ModelFormField$EntityOptions.addOptionValues(ModelFormField.java:1918) ~[ofbiz-widget.jar:?]
        
        Show
        jacques.le.roux Jacques Le Roux added a comment - It could be related with OFBIZ-3311 , see the top of stack 2016-04-07 23:32:16,548 |http-bio-8443-exec-1 |ModelScreenWidget |E| Error rendering included form named [DropDownFieldsExampleForm] at location [component: //example/widget/example/FormWidgetExamp leForms.xml]: java.lang.IllegalArgumentException: The field name (or key) [-description] is not valid for entity [ExampleType]. java.lang.IllegalArgumentException: The field name (or key) [-description] is not valid for entity [ExampleType]. at org.ofbiz.entity.GenericEntity.get(GenericEntity.java:373) ~[ofbiz-entity.jar:?] at org.ofbiz.entity.GenericEntity.get(GenericEntity.java:788) ~[ofbiz-entity.jar:?] at org.ofbiz.entity.GenericEntity.get(GenericEntity.java:773) ~[ofbiz-entity.jar:?] at org.ofbiz.entity.util.EntityUtil.localizedOrderBy(EntityUtil.java:356) ~[ofbiz-entity.jar:?] at org.ofbiz.widget.model.ModelFormField$EntityOptions.addOptionValues(ModelFormField.java:1918) ~[ofbiz-widget.jar:?]
        Hide
        deepak.dixit Deepak Dixit added a comment - - edited

        Yes Jacques you are right, Its due to ModelUtil.isPotentialLocalizedField and EntityUtil.localizedOrderBy methods introduced in OFBIZ-3311. These method validate the orderByField with entity fields, as we use dash or ASC/DESC keyword in orderBy field to sort result in specific order and dash/ASC/DESC not skipped/handled in isPotentialLocalizedField/localizedOrderBy method.

        Show
        deepak.dixit Deepak Dixit added a comment - - edited Yes Jacques you are right, Its due to ModelUtil.isPotentialLocalizedField and EntityUtil.localizedOrderBy methods introduced in OFBIZ-3311 . These method validate the orderByField with entity fields, as we use dash or ASC/DESC keyword in orderBy field to sort result in specific order and dash/ASC/DESC not skipped/handled in isPotentialLocalizedField/localizedOrderBy method.
        Hide
        soledad Nicolas Malin added a comment -

        Oh oh, it's my fault

        Thanks Deepak for the spotting, I will check it quickly

        Show
        soledad Nicolas Malin added a comment - Oh oh, it's my fault Thanks Deepak for the spotting, I will check it quickly
        Hide
        pandeypranay Pranay Pandey added a comment - - edited

        Hi Nicolas Malin,

        Reassigning this issue to you. Please close it as you fix the problem.

        Thanks

        Show
        pandeypranay Pranay Pandey added a comment - - edited Hi Nicolas Malin , Reassigning this issue to you. Please close it as you fix the problem. Thanks
        Hide
        soledad Nicolas Malin added a comment -

        No pb Pranay Pandey,

        The issue is fixed on trunk at revision 1738258

        I tested each case : with -,+ and ASC,DESC

        Thanks James and Deepak for the help

        Show
        soledad Nicolas Malin added a comment - No pb Pranay Pandey , The issue is fixed on trunk at revision 1738258 I tested each case : with -,+ and ASC,DESC Thanks James and Deepak for the help
        Hide
        pandeypranay Pranay Pandey added a comment - - edited

        Thanks James Yong for reporting this issue and thanks Nicolas for fixing it.

        Show
        pandeypranay Pranay Pandey added a comment - - edited Thanks James Yong for reporting this issue and thanks Nicolas for fixing it.

          People

          • Assignee:
            soledad Nicolas Malin
            Reporter:
            jamesyong James Yong
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development