[jira] Created: (OFBIZ-1802) Error in Data File Tool

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] Created: (OFBIZ-1802) Error in Data File Tool

Nicolas Malin (Jira)
Error in Data File Tool
-----------------------

                 Key: OFBIZ-1802
                 URL: https://issues.apache.org/jira/browse/OFBIZ-1802
             Project: OFBiz
          Issue Type: Bug
         Environment: CentOS + Java 5
            Reporter: Ashish Vijaywargiya
            Priority: Minor
         Attachments: DataFileTool.patch

While using the Data File Tool when user submits to generate new file for the Entity Definition it blows up with an error of uiLabelMap is missing.
Here is the Error details :-

org.ofbiz.widget.screen.ScreenRenderException: Error rendering screen [component://webtools/widget/MiscScreens.xml#viewdatafile]: org.ofbiz.base.util.GeneralException: Error running BSH script at location [component://webtools/webapp/webtools/WEB-INF/actions/datafile/viewdatafile.bsh] (Error running BSH script at [component://webtools/webapp/webtools/WEB-INF/actions/datafile/viewdatafile.bsh], line [94]: Sourced file: component://webtools/webapp/webtools/WEB-INF/actions/datafile/viewdatafile.bsh : Attempt to resolve method: get() on undefined variable or class name: uiLabelMap : at Line: 94 : in file: component://webtools/webapp/webtools/WEB-INF/actions/datafile/viewdatafile.bsh : uiLabelMap .get ( "WebtoolsDataEntityFileSavedTo" )
(Sourced file: component://webtools/webapp/webtools/WEB-INF/actions/datafile/viewdatafile.bsh : Attempt to resolve method: get() on undefined variable or class name: uiLabelMap)) (Error running BSH script at location [component://webtools/webapp/webtools/WEB-INF/actions/datafile/viewdatafile.bsh] (Error running BSH script at [component://webtools/webapp/webtools/WEB-INF/actions/datafile/viewdatafile.bsh], line [94]: Sourced file: component://webtools/webapp/webtools/WEB-INF/actions/datafile/viewdatafile.bsh : Attempt to resolve method: get() on undefined variable or class name: uiLabelMap : at Line: 94 : in file: component://webtools/webapp/webtools/WEB-INF/actions/datafile/viewdatafile.bsh : uiLabelMap .get ( "WebtoolsDataEntityFileSavedTo" )
(Sourced file: component://webtools/webapp/webtools/WEB-INF/actions/datafile/viewdatafile.bsh : Attempt to resolve method: get() on undefined variable or class name: uiLabelMap)))

--
Ashish Vijaywargiya

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (OFBIZ-1802) Error in Data File Tool

Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-1802?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ashish Vijaywargiya updated OFBIZ-1802:
---------------------------------------

    Attachment: DataFileTool.patch

Patch for the same.
Thanks !!!

--
Ashish Vijaywargiya


> Error in Data File Tool
> -----------------------
>
>                 Key: OFBIZ-1802
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1802
>             Project: OFBiz
>          Issue Type: Bug
>         Environment: CentOS + Java 5
>            Reporter: Ashish Vijaywargiya
>            Priority: Minor
>         Attachments: DataFileTool.patch
>
>
> While using the Data File Tool when user submits to generate new file for the Entity Definition it blows up with an error of uiLabelMap is missing.
> Here is the Error details :-
> org.ofbiz.widget.screen.ScreenRenderException: Error rendering screen [component://webtools/widget/MiscScreens.xml#viewdatafile]: org.ofbiz.base.util.GeneralException: Error running BSH script at location [component://webtools/webapp/webtools/WEB-INF/actions/datafile/viewdatafile.bsh] (Error running BSH script at [component://webtools/webapp/webtools/WEB-INF/actions/datafile/viewdatafile.bsh], line [94]: Sourced file: component://webtools/webapp/webtools/WEB-INF/actions/datafile/viewdatafile.bsh : Attempt to resolve method: get() on undefined variable or class name: uiLabelMap : at Line: 94 : in file: component://webtools/webapp/webtools/WEB-INF/actions/datafile/viewdatafile.bsh : uiLabelMap .get ( "WebtoolsDataEntityFileSavedTo" )
> (Sourced file: component://webtools/webapp/webtools/WEB-INF/actions/datafile/viewdatafile.bsh : Attempt to resolve method: get() on undefined variable or class name: uiLabelMap)) (Error running BSH script at location [component://webtools/webapp/webtools/WEB-INF/actions/datafile/viewdatafile.bsh] (Error running BSH script at [component://webtools/webapp/webtools/WEB-INF/actions/datafile/viewdatafile.bsh], line [94]: Sourced file: component://webtools/webapp/webtools/WEB-INF/actions/datafile/viewdatafile.bsh : Attempt to resolve method: get() on undefined variable or class name: uiLabelMap : at Line: 94 : in file: component://webtools/webapp/webtools/WEB-INF/actions/datafile/viewdatafile.bsh : uiLabelMap .get ( "WebtoolsDataEntityFileSavedTo" )
> (Sourced file: component://webtools/webapp/webtools/WEB-INF/actions/datafile/viewdatafile.bsh : Attempt to resolve method: get() on undefined variable or class name: uiLabelMap)))
> --
> Ashish Vijaywargiya

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-1802) Error in Data File Tool

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-1802?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12599592#action_12599592 ]

Scott Gray commented on OFBIZ-1802:
-----------------------------------

Hi Ashish

Everything works fine for me, the uiLabelMap is already defined in the main-decorator.

> Error in Data File Tool
> -----------------------
>
>                 Key: OFBIZ-1802
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1802
>             Project: OFBiz
>          Issue Type: Bug
>         Environment: CentOS + Java 5
>            Reporter: Ashish Vijaywargiya
>            Priority: Minor
>         Attachments: DataFileTool.patch
>
>
> While using the Data File Tool when user submits to generate new file for the Entity Definition it blows up with an error of uiLabelMap is missing.
> Here is the Error details :-
> org.ofbiz.widget.screen.ScreenRenderException: Error rendering screen [component://webtools/widget/MiscScreens.xml#viewdatafile]: org.ofbiz.base.util.GeneralException: Error running BSH script at location [component://webtools/webapp/webtools/WEB-INF/actions/datafile/viewdatafile.bsh] (Error running BSH script at [component://webtools/webapp/webtools/WEB-INF/actions/datafile/viewdatafile.bsh], line [94]: Sourced file: component://webtools/webapp/webtools/WEB-INF/actions/datafile/viewdatafile.bsh : Attempt to resolve method: get() on undefined variable or class name: uiLabelMap : at Line: 94 : in file: component://webtools/webapp/webtools/WEB-INF/actions/datafile/viewdatafile.bsh : uiLabelMap .get ( "WebtoolsDataEntityFileSavedTo" )
> (Sourced file: component://webtools/webapp/webtools/WEB-INF/actions/datafile/viewdatafile.bsh : Attempt to resolve method: get() on undefined variable or class name: uiLabelMap)) (Error running BSH script at location [component://webtools/webapp/webtools/WEB-INF/actions/datafile/viewdatafile.bsh] (Error running BSH script at [component://webtools/webapp/webtools/WEB-INF/actions/datafile/viewdatafile.bsh], line [94]: Sourced file: component://webtools/webapp/webtools/WEB-INF/actions/datafile/viewdatafile.bsh : Attempt to resolve method: get() on undefined variable or class name: uiLabelMap : at Line: 94 : in file: component://webtools/webapp/webtools/WEB-INF/actions/datafile/viewdatafile.bsh : uiLabelMap .get ( "WebtoolsDataEntityFileSavedTo" )
> (Sourced file: component://webtools/webapp/webtools/WEB-INF/actions/datafile/viewdatafile.bsh : Attempt to resolve method: get() on undefined variable or class name: uiLabelMap)))
> --
> Ashish Vijaywargiya

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-1802) Error in Data File Tool

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-1802?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12599601#action_12599601 ]

Ashish Vijaywargiya commented on OFBIZ-1802:
--------------------------------------------

Scott Thanks for your comments.
It may possible that you are submitting the form without putting any values inside the fields to generate the EntityDefinition file.

Or

In simple way your code is not coming inside the following two blocks.

if (dataFile != null && dataFileSave != null && dataFileSave.length() > 0) {
    try {
        dataFile.writeDataFile(dataFileSave);
        messages.add(uiLabelMap.get("WebtoolsDataFileSavedTo") + dataFileSave);
    }
    catch (Exception e) {
        messages.add(e.getMessage());
    }
}
 

if (dataFile != null && entityXmlFileSave != null && entityXmlFileSave.length() > 0) {
    try {
        //dataFile.writeDataFile(entityXmlFileSave);
        DataFile2EntityXml.writeToEntityXml(entityXmlFileSave, dataFile);
        messages.add(uiLabelMap.get("WebtoolsDataEntityFileSavedTo") + entityXmlFileSave);
    }
    catch (Exception e) {
        messages.add(e.getMessage());
    }
}
 

Please put the following sentence at the top of the viewdatafile.bsh file.(Without applying my patch)
System.err.println("The value of uiLabelMap ========" + uiLabelMap.get("WebtoolsDataFileSavedTo"));
You will get the same error in this case as well.

Because in the Screen Definition the BSH file is used in which we are calling uiLabelMap.
The scope of uiLabelMap comes after the inclusion of main-decorator.

I am attaching the two sample file so that you can generate the EntityDefinition file and see the same result on your machine as well.
Please let me know if you are unable to reproduce the error.

--
Ashish Vijaywargiya



> Error in Data File Tool
> -----------------------
>
>                 Key: OFBIZ-1802
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1802
>             Project: OFBiz
>          Issue Type: Bug
>         Environment: CentOS + Java 5
>            Reporter: Ashish Vijaywargiya
>            Priority: Minor
>         Attachments: Data_File_Tool_Files.zip, DataFileTool.patch
>
>
> While using the Data File Tool when user submits to generate new file for the Entity Definition it blows up with an error of uiLabelMap is missing.
> Here is the Error details :-
> org.ofbiz.widget.screen.ScreenRenderException: Error rendering screen [component://webtools/widget/MiscScreens.xml#viewdatafile]: org.ofbiz.base.util.GeneralException: Error running BSH script at location [component://webtools/webapp/webtools/WEB-INF/actions/datafile/viewdatafile.bsh] (Error running BSH script at [component://webtools/webapp/webtools/WEB-INF/actions/datafile/viewdatafile.bsh], line [94]: Sourced file: component://webtools/webapp/webtools/WEB-INF/actions/datafile/viewdatafile.bsh : Attempt to resolve method: get() on undefined variable or class name: uiLabelMap : at Line: 94 : in file: component://webtools/webapp/webtools/WEB-INF/actions/datafile/viewdatafile.bsh : uiLabelMap .get ( "WebtoolsDataEntityFileSavedTo" )
> (Sourced file: component://webtools/webapp/webtools/WEB-INF/actions/datafile/viewdatafile.bsh : Attempt to resolve method: get() on undefined variable or class name: uiLabelMap)) (Error running BSH script at location [component://webtools/webapp/webtools/WEB-INF/actions/datafile/viewdatafile.bsh] (Error running BSH script at [component://webtools/webapp/webtools/WEB-INF/actions/datafile/viewdatafile.bsh], line [94]: Sourced file: component://webtools/webapp/webtools/WEB-INF/actions/datafile/viewdatafile.bsh : Attempt to resolve method: get() on undefined variable or class name: uiLabelMap : at Line: 94 : in file: component://webtools/webapp/webtools/WEB-INF/actions/datafile/viewdatafile.bsh : uiLabelMap .get ( "WebtoolsDataEntityFileSavedTo" )
> (Sourced file: component://webtools/webapp/webtools/WEB-INF/actions/datafile/viewdatafile.bsh : Attempt to resolve method: get() on undefined variable or class name: uiLabelMap)))
> --
> Ashish Vijaywargiya

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (OFBIZ-1802) Error in Data File Tool

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-1802?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ashish Vijaywargiya updated OFBIZ-1802:
---------------------------------------

    Attachment: Data_File_Tool_Files.zip

> Error in Data File Tool
> -----------------------
>
>                 Key: OFBIZ-1802
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1802
>             Project: OFBiz
>          Issue Type: Bug
>         Environment: CentOS + Java 5
>            Reporter: Ashish Vijaywargiya
>            Priority: Minor
>         Attachments: Data_File_Tool_Files.zip, DataFileTool.patch
>
>
> While using the Data File Tool when user submits to generate new file for the Entity Definition it blows up with an error of uiLabelMap is missing.
> Here is the Error details :-
> org.ofbiz.widget.screen.ScreenRenderException: Error rendering screen [component://webtools/widget/MiscScreens.xml#viewdatafile]: org.ofbiz.base.util.GeneralException: Error running BSH script at location [component://webtools/webapp/webtools/WEB-INF/actions/datafile/viewdatafile.bsh] (Error running BSH script at [component://webtools/webapp/webtools/WEB-INF/actions/datafile/viewdatafile.bsh], line [94]: Sourced file: component://webtools/webapp/webtools/WEB-INF/actions/datafile/viewdatafile.bsh : Attempt to resolve method: get() on undefined variable or class name: uiLabelMap : at Line: 94 : in file: component://webtools/webapp/webtools/WEB-INF/actions/datafile/viewdatafile.bsh : uiLabelMap .get ( "WebtoolsDataEntityFileSavedTo" )
> (Sourced file: component://webtools/webapp/webtools/WEB-INF/actions/datafile/viewdatafile.bsh : Attempt to resolve method: get() on undefined variable or class name: uiLabelMap)) (Error running BSH script at location [component://webtools/webapp/webtools/WEB-INF/actions/datafile/viewdatafile.bsh] (Error running BSH script at [component://webtools/webapp/webtools/WEB-INF/actions/datafile/viewdatafile.bsh], line [94]: Sourced file: component://webtools/webapp/webtools/WEB-INF/actions/datafile/viewdatafile.bsh : Attempt to resolve method: get() on undefined variable or class name: uiLabelMap : at Line: 94 : in file: component://webtools/webapp/webtools/WEB-INF/actions/datafile/viewdatafile.bsh : uiLabelMap .get ( "WebtoolsDataEntityFileSavedTo" )
> (Sourced file: component://webtools/webapp/webtools/WEB-INF/actions/datafile/viewdatafile.bsh : Attempt to resolve method: get() on undefined variable or class name: uiLabelMap)))
> --
> Ashish Vijaywargiya

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Closed: (OFBIZ-1802) Error in Data File Tool

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-1802?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Scott Gray closed OFBIZ-1802.
-----------------------------

    Resolution: Fixed

Sorry Ashish, I didn't read the error message properly and assumed the error was coming from the ftl file.

I've committed (rev. 659870) a different version of your patch so that the uiLabelMap is loaded the same way as other bsh scripts do it.

> Error in Data File Tool
> -----------------------
>
>                 Key: OFBIZ-1802
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1802
>             Project: OFBiz
>          Issue Type: Bug
>         Environment: CentOS + Java 5
>            Reporter: Ashish Vijaywargiya
>            Priority: Minor
>         Attachments: Data_File_Tool_Files.zip, DataFileTool.patch
>
>
> While using the Data File Tool when user submits to generate new file for the Entity Definition it blows up with an error of uiLabelMap is missing.
> Here is the Error details :-
> org.ofbiz.widget.screen.ScreenRenderException: Error rendering screen [component://webtools/widget/MiscScreens.xml#viewdatafile]: org.ofbiz.base.util.GeneralException: Error running BSH script at location [component://webtools/webapp/webtools/WEB-INF/actions/datafile/viewdatafile.bsh] (Error running BSH script at [component://webtools/webapp/webtools/WEB-INF/actions/datafile/viewdatafile.bsh], line [94]: Sourced file: component://webtools/webapp/webtools/WEB-INF/actions/datafile/viewdatafile.bsh : Attempt to resolve method: get() on undefined variable or class name: uiLabelMap : at Line: 94 : in file: component://webtools/webapp/webtools/WEB-INF/actions/datafile/viewdatafile.bsh : uiLabelMap .get ( "WebtoolsDataEntityFileSavedTo" )
> (Sourced file: component://webtools/webapp/webtools/WEB-INF/actions/datafile/viewdatafile.bsh : Attempt to resolve method: get() on undefined variable or class name: uiLabelMap)) (Error running BSH script at location [component://webtools/webapp/webtools/WEB-INF/actions/datafile/viewdatafile.bsh] (Error running BSH script at [component://webtools/webapp/webtools/WEB-INF/actions/datafile/viewdatafile.bsh], line [94]: Sourced file: component://webtools/webapp/webtools/WEB-INF/actions/datafile/viewdatafile.bsh : Attempt to resolve method: get() on undefined variable or class name: uiLabelMap : at Line: 94 : in file: component://webtools/webapp/webtools/WEB-INF/actions/datafile/viewdatafile.bsh : uiLabelMap .get ( "WebtoolsDataEntityFileSavedTo" )
> (Sourced file: component://webtools/webapp/webtools/WEB-INF/actions/datafile/viewdatafile.bsh : Attempt to resolve method: get() on undefined variable or class name: uiLabelMap)))
> --
> Ashish Vijaywargiya

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-1802) Error in Data File Tool

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-1802?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12599663#action_12599663 ]

Ashish Vijaywargiya commented on OFBIZ-1802:
--------------------------------------------

Thanks Scott for taking care of this.

--
Ashish Vijaywargiya

> Error in Data File Tool
> -----------------------
>
>                 Key: OFBIZ-1802
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1802
>             Project: OFBiz
>          Issue Type: Bug
>         Environment: CentOS + Java 5
>            Reporter: Ashish Vijaywargiya
>            Priority: Minor
>         Attachments: Data_File_Tool_Files.zip, DataFileTool.patch
>
>
> While using the Data File Tool when user submits to generate new file for the Entity Definition it blows up with an error of uiLabelMap is missing.
> Here is the Error details :-
> org.ofbiz.widget.screen.ScreenRenderException: Error rendering screen [component://webtools/widget/MiscScreens.xml#viewdatafile]: org.ofbiz.base.util.GeneralException: Error running BSH script at location [component://webtools/webapp/webtools/WEB-INF/actions/datafile/viewdatafile.bsh] (Error running BSH script at [component://webtools/webapp/webtools/WEB-INF/actions/datafile/viewdatafile.bsh], line [94]: Sourced file: component://webtools/webapp/webtools/WEB-INF/actions/datafile/viewdatafile.bsh : Attempt to resolve method: get() on undefined variable or class name: uiLabelMap : at Line: 94 : in file: component://webtools/webapp/webtools/WEB-INF/actions/datafile/viewdatafile.bsh : uiLabelMap .get ( "WebtoolsDataEntityFileSavedTo" )
> (Sourced file: component://webtools/webapp/webtools/WEB-INF/actions/datafile/viewdatafile.bsh : Attempt to resolve method: get() on undefined variable or class name: uiLabelMap)) (Error running BSH script at location [component://webtools/webapp/webtools/WEB-INF/actions/datafile/viewdatafile.bsh] (Error running BSH script at [component://webtools/webapp/webtools/WEB-INF/actions/datafile/viewdatafile.bsh], line [94]: Sourced file: component://webtools/webapp/webtools/WEB-INF/actions/datafile/viewdatafile.bsh : Attempt to resolve method: get() on undefined variable or class name: uiLabelMap : at Line: 94 : in file: component://webtools/webapp/webtools/WEB-INF/actions/datafile/viewdatafile.bsh : uiLabelMap .get ( "WebtoolsDataEntityFileSavedTo" )
> (Sourced file: component://webtools/webapp/webtools/WEB-INF/actions/datafile/viewdatafile.bsh : Attempt to resolve method: get() on undefined variable or class name: uiLabelMap)))
> --
> Ashish Vijaywargiya

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.