Unable to load a resource file, no error is given

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

Unable to load a resource file, no error is given

user
Hello. I'm doing an excercies from the tutorial:
https://cwiki.apache.org/confluence/display/OFBIZ/OFBiz+Tutorial+-+A+Beginners+Development+Guide#OFBizTutorial-ABeginnersDevelopmentGuide-Nowitsthetimetoshowpracticeapplicationintheappbar

The problem is:
1) Labels resource 'config/PracticeUiLabels.xml' doesn't load.
2) The error message is given only if <property-map> statement with failed_resource is placed as a first <property-map> statement. If it placed as a second statement, then error message isn't shown.
For example, this is a snippet of a <screen> when error message is shown:
                    <actions>
                        <property-map resource="PracticeUiLabels" map-name="uiLabelMap" global="true"/>
                        <property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/>
                        <set field="layoutSettings.companyName" from-field="uiLabelMap.PracticeCompanyName" global="true"/>
                        <set field="activeApp" value="practice" global="true"/>
                        <set field="applicationMenuName" value="PracticeAppBar" global="true"/>
                        <set field="applicationMenuLocation" value="component://practice/widget/PracticeMenus.xml" global="true"/>
                    </actions>

And this is the snippet of a <screen> when error isn't shown (just 2 lines swaped):
                    <actions>
                        <property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/>
                        <property-map resource="PracticeUiLabels" map-name="uiLabelMap" global="true"/>
                        <set field="layoutSettings.companyName" from-field="uiLabelMap.PracticeCompanyName" global="true"/>
                        <set field="activeApp" value="practice" global="true"/>
                        <set field="applicationMenuName" value="PracticeAppBar" global="true"/>
                        <set field="applicationMenuLocation" value="component://practice/widget/PracticeMenus.xml" global="true"/>
                    </actions>

Also, when debugging the application the system property 'System.getProperty("java.class.path")' equals to:
(java.lang.String) /home/user/soft/livegarden/ofbiz.15.12/ofbiz.jar
I don't really understand what actually does (where is stores the classpath) the <classpath> element of the component definition file.
I'm using OfBiz 15.12. The screen definition file, the resource file and the compopent definition files are attached.

ofbiz-component.xml (798 bytes) Download Attachment
PracticeUiLabels.xml (588 bytes) Download Attachment
CommonScreens.xml (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Unable to load a resource file, no error is given

Swapnil Mane
Dear User,

I have tried to generate the issue you are reporting locally and unable to
generate it.
For my case, everything is working expected.

I am able to see the web page title as ### OFBiz: Practice
###:PageTitlePracticePersonForm
('### OFBiz: Practice ###' is the company name defined PracticeUiLabels
files, this means the UiLabel resource is loaded successfully)

Can you please provide following information, which may help us in
debugging problem

#1.) controller.xml, PracticeScreens.xml, web.xml file
#2.) Which URL you are accessing and what you are expecting.

#3.)

2) The error message is given only if <property-map> statement with
> failed_resource is placed as a first <property-map> statement.
>

What is the error message shown for this case?


Best Regards,

Swapnil M Mane
HotWax Systems
www.hotwaxsystems.com

On Tue, Jul 26, 2016 at 5:57 PM, user <[hidden email]> wrote:

> Hello. I'm doing an excercies from the tutorial:
>
> https://cwiki.apache.org/confluence/display/OFBIZ/OFBiz+Tutorial+-+A+Beginners+Development+Guide#OFBizTutorial-ABeginnersDevelopmentGuide-Nowitsthetimetoshowpracticeapplicationintheappbar
>
> The problem is:
> 1) Labels resource 'config/PracticeUiLabels.xml' doesn't load.
> 2) The error message is given only if <property-map> statement with
> failed_resource is placed as a first <property-map> statement. If it placed
> as a second statement, then error message isn't shown.
> For example, this is a snippet of a <screen> when error message is shown:
>                     <actions>
>                         <property-map resource="PracticeUiLabels"
> map-name="uiLabelMap" global="true"/>
>                         <property-map resource="CommonUiLabels"
> map-name="uiLabelMap" global="true"/>
>                         <set field="layoutSettings.companyName"
> from-field="uiLabelMap.PracticeCompanyName" global="true"/>
>                         <set field="activeApp" value="practice"
> global="true"/>
>                         <set field="applicationMenuName"
> value="PracticeAppBar" global="true"/>
>                         <set field="applicationMenuLocation"
> value="component://practice/widget/PracticeMenus.xml" global="true"/>
>                     </actions>
>
> And this is the snippet of a <screen> when error isn't shown (just 2 lines
> swaped):
>                     <actions>
>                         <property-map resource="CommonUiLabels"
> map-name="uiLabelMap" global="true"/>
>                         <property-map resource="PracticeUiLabels"
> map-name="uiLabelMap" global="true"/>
>                         <set field="layoutSettings.companyName"
> from-field="uiLabelMap.PracticeCompanyName" global="true"/>
>                         <set field="activeApp" value="practice"
> global="true"/>
>                         <set field="applicationMenuName"
> value="PracticeAppBar" global="true"/>
>                         <set field="applicationMenuLocation"
> value="component://practice/widget/PracticeMenus.xml" global="true"/>
>                     </actions>
>
> Also, when debugging the application the system property
> 'System.getProperty("java.class.path")' equals to:
> (java.lang.String) /home/user/soft/livegarden/ofbiz.15.12/ofbiz.jar
> I don't really understand what actually does (where is stores the
> classpath) the <classpath> element of the component definition file.
> I'm using OfBiz 15.12. The screen definition file, the resource file and
> the compopent definition files are attached.
>
Reply | Threaded
Open this post in threaded view
|

RE: Re: Unable to load a resource file, no error is given

user

Can't reproduce now. Is seems like I didn't restart the app after modifying the file 'PracticeUiLabels.xml'. Thanx for attention.



> 28.07.2016, 14:10:31 пользователь Swapnil Mane ([hidden email]) написал:
>
> Dear User,
>
> I have tried to generate the issue you are reporting locally and unable to
> generate it.
> For my case, everything is working expected.
>
> I am able to see the web page title as ### OFBiz: Practice
> ###:PageTitlePracticePersonForm
> ('### OFBiz: Practice ###' is the company name defined PracticeUiLabels
> files, this means the UiLabel resource is loaded successfully)
>
> Can you please provide following information, which may help us in
> debugging problem
>
> #1.) controller.xml, PracticeScreens.xml, web.xml file
> #2.) Which URL you are accessing and what you are expecting.
>
> #3.)
>
> 2) The error message is given only if <property-map> statement with
> > failed_resource is placed as a first <property-map> statement.
> >
>
> What is the error message shown for this case?
>
> Best Regards,
>
> Swapnil M Mane
> HotWax Systems
> www.hotwaxsystems.com
>
> On Tue, Jul 26, 2016 at 5:57 PM, user <[hidden email]> wrote:
>
> > Hello. I'm doing an excercies from the tutorial:
> >
> > https://cwiki.apache.org/confluence/display/OFBIZ/OFBiz+Tutorial+-+A+Beginners+Development+Guide#OFBizTutorial-ABeginnersDevelopmentGuide-Nowitsthetimetoshowpracticeapplicationintheappbar
> >
> > The problem is:
> > 1) Labels resource 'config/PracticeUiLabels.xml' doesn't load.
> > 2) The error message is given only if <property-map> statement with
> > failed_resource is placed as a first <property-map> statement. If it placed
> > as a second statement, then error message isn't shown.
> > For example, this is a snippet of a <screen> when error message is shown:
> >                                            <actions>
> >                                                    <property-map resource="PracticeUiLabels"
> > map-name="uiLabelMap" global="true"/>
> >                                                    <property-map resource="CommonUiLabels"
> > map-name="uiLabelMap" global="true"/>
> >                                                    <set field="layoutSettings.companyName"
> > from-field="uiLabelMap.PracticeCompanyName" global="true"/>
> >                                                    <set field="activeApp" value="practice"
> > global="true"/>
> >                                                    <set field="applicationMenuName"
> > value="PracticeAppBar" global="true"/>
> >                                                    <set field="applicationMenuLocation"
> > value="component://practice/widget/PracticeMenus.xml" global="true"/>
> >                                            </actions>
> >
> > And this is the snippet of a <screen> when error isn't shown (just 2 lines
> > swaped):
> >                                            <actions>
> >                                                    <property-map resource="CommonUiLabels"
> > map-name="uiLabelMap" global="true"/>
> >                                                    <property-map resource="PracticeUiLabels"
> > map-name="uiLabelMap" global="true"/>
> >                                                    <set field="layoutSettings.companyName"
> > from-field="uiLabelMap.PracticeCompanyName" global="true"/>
> >                                                    <set field="activeApp" value="practice"
> > global="true"/>
> >                                                    <set field="applicationMenuName"
> > value="PracticeAppBar" global="true"/>
> >                                                    <set field="applicationMenuLocation"
> > value="component://practice/widget/PracticeMenus.xml" global="true"/>
> >                                            </actions>
> >
> > Also, when debugging the application the system property
> > 'System.getProperty("java.class.path")' equals to:
> > (java.lang.String) /home/user/soft/livegarden/ofbiz.15.12/ofbiz.jar
> > I don't really understand what actually does (where is stores the
> > classpath) the <classpath> element of the component definition file.
> > I'm using OfBiz 15.12. The screen definition file, the resource file and
> > the compopent definition files are attached.
> >
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Re: Unable to load a resource file, no error is given

Pierre Smits
You don't need to restart the app. Within the web tools component you can
refresh the cache (of labels) as well.

Best regards,

Pierre Smits

ORRTIZ.COM <http://www.orrtiz.com>
OFBiz based solutions & services

OFBiz Extensions Marketplace
http://oem.ofbizci.net/oci-2/

On Thu, Jul 28, 2016 at 7:39 PM, user <[hidden email]> wrote:

>
> Can't reproduce now. Is seems like I didn't restart the app after
> modifying the file 'PracticeUiLabels.xml'. Thanx for attention.
>
>
>
> 28.07.2016, 14:10:31 пользователь Swapnil Mane (
>> [hidden email]) написал:
>>
>>
>> Dear User,
>>
>> I have tried to generate the issue you are reporting locally and unable to
>> generate it.
>> For my case, everything is working expected.
>>
>> I am able to see the web page title as ### OFBiz: Practice
>> ###:PageTitlePracticePersonForm
>> ('### OFBiz: Practice ###' is the company name defined PracticeUiLabels
>> files, this means the UiLabel resource is loaded successfully)
>>
>> Can you please provide following information, which may help us in
>> debugging problem
>>
>> #1.) controller.xml, PracticeScreens.xml, web.xml file
>> #2.) Which URL you are accessing and what you are expecting.
>>
>> #3.)
>>
>> 2) The error message is given only if <property-map> statement with
>> > failed_resource is placed as a first <property-map> statement.
>> >
>>
>> What is the error message shown for this case?
>>
>> Best Regards,
>>
>> Swapnil M Mane
>> HotWax Systems
>> www.hotwaxsystems.com
>>
>> On Tue, Jul 26, 2016 at 5:57 PM, user <[hidden email]> wrote:
>>
>> > Hello. I'm doing an excercies from the tutorial:
>> >
>> >
>> https://cwiki.apache.org/confluence/display/OFBIZ/OFBiz+Tutorial+-+A+Beginners+Development+Guide#OFBizTutorial-ABeginnersDevelopmentGuide-Nowitsthetimetoshowpracticeapplicationintheappbar
>> >
>> > The problem is:
>> > 1) Labels resource 'config/PracticeUiLabels.xml' doesn't load.
>> > 2) The error message is given only if <property-map> statement with
>> > failed_resource is placed as a first <property-map> statement. If it
>> placed
>> > as a second statement, then error message isn't shown.
>> > For example, this is a snippet of a <screen> when error message is
>> shown:
>> >                                            <actions>
>> >                                                    <property-map
>> resource="PracticeUiLabels"
>> > map-name="uiLabelMap" global="true"/>
>> >                                                    <property-map
>> resource="CommonUiLabels"
>> > map-name="uiLabelMap" global="true"/>
>> >                                                    <set
>> field="layoutSettings.companyName"
>> > from-field="uiLabelMap.PracticeCompanyName" global="true"/>
>> >                                                    <set
>> field="activeApp" value="practice"
>> > global="true"/>
>> >                                                    <set
>> field="applicationMenuName"
>> > value="PracticeAppBar" global="true"/>
>> >                                                    <set
>> field="applicationMenuLocation"
>> > value="component://practice/widget/PracticeMenus.xml" global="true"/>
>> >                                            </actions>
>> >
>> > And this is the snippet of a <screen> when error isn't shown (just 2
>> lines
>> > swaped):
>> >                                            <actions>
>> >                                                    <property-map
>> resource="CommonUiLabels"
>> > map-name="uiLabelMap" global="true"/>
>> >                                                    <property-map
>> resource="PracticeUiLabels"
>> > map-name="uiLabelMap" global="true"/>
>> >                                                    <set
>> field="layoutSettings.companyName"
>> > from-field="uiLabelMap.PracticeCompanyName" global="true"/>
>> >                                                    <set
>> field="activeApp" value="practice"
>> > global="true"/>
>> >                                                    <set
>> field="applicationMenuName"
>> > value="PracticeAppBar" global="true"/>
>> >                                                    <set
>> field="applicationMenuLocation"
>> > value="component://practice/widget/PracticeMenus.xml" global="true"/>
>> >                                            </actions>
>> >
>> > Also, when debugging the application the system property
>> > 'System.getProperty("java.class.path")' equals to:
>> > (java.lang.String) /home/user/soft/livegarden/ofbiz.15.12/ofbiz.jar
>> > I don't really understand what actually does (where is stores the
>> > classpath) the <classpath> element of the component definition file.
>> > I'm using OfBiz 15.12. The screen definition file, the resource file and
>> > the compopent definition files are attached.
>> >
>>
>>