MWKZ
MWKZ

Reputation: 124

Unable to access new OFBiz 16.11 plugin

I am trying to learn OFBiz 16.11, but I am facing an error when adding a new plugin and tying to access it using its url.

:ERROR MESSAGE:
org.apache.ofbiz.widget.renderer.ScreenRenderException: Error rendering screen [component://common/widget/CommonScreens.xml#login]: org.apache.ofbiz.widget.renderer.ScreenRenderException: Error rendering screen [component://ofbizDemo/widget/CommonScreens.xml#main-decorator]: java.lang.IllegalArgumentException: Could not find resource bundle [OfbizDemoUiLabels] in the locale [en_US] (Could not find resource bundle [OfbizDemoUiLabels] in the locale [en_US]) (Error rendering screen [component://ofbizDemo/widget/CommonScreens.xml#main-decorator]: java.lang.IllegalArgumentException: Could not find resource bundle [OfbizDemoUiLabels] in the locale [en_US] (Could not find resource bundle [OfbizDemoUiLabels] in the locale [en_US]))

I ran the following commands to create a new plugin:

--Initialize OFBiz and load demo data
gradlew cleanAll loadDefault ofbiz

--Add new plugin
gradlew createPlugin -PpluginId=ofbizDemo 

--Apply changes and run OFBiz
gradlew loadDefault ofbiz

I am currently testing OFBiz using Windows 10. New plugin URL: https://localhost:8443/ofbizDemo

Is there any missing step during the creation of the new plugin which is causing this error message?

Note that the above commands can be found in OFBiz tutorial document: Tutorial Document

I checked the OfbizDemoUiLabels.xml file and it exists in its correct location.

Upvotes: 2

Views: 1138

Answers (3)

Mustafa R
Mustafa R

Reputation: 103

It is happening because the current language has been set to English (United States) [en-US]. Just change the language to "English- [en]" from the top right "language" menu, at left of "logout" and "visual themes".

language settings

Alternatively, edit the config file: apache-ofbiz-16.11.xx\specialpurpose\ofbizDemo\config\OfbizDemoUiLabels.xml

Replace all-

<value xml:lang="en">OfbizDemo Application</value>

With

<value xml:lang="en-US">OfbizDemo Application</value>

Upvotes: 1

MWKZ
MWKZ

Reputation: 124

I found the solution. Simply removed all non-English entries in the OfbizDemoUiLabels.xml file. It is now working as expected!

Upvotes: 5

fallik
fallik

Reputation: 41

I just faced the same problem. I solved it by adding entries for my system's default language (which is german) to the OfbizDemoUiLabels.xml, e.g. <value xml:lang="de">OfbizDemo Applikation</value>

Upvotes: 0

Related Questions