Issue with resource bundle.

Hi ,
I have been facing a issue with getting properties from resource bundle.
final ResourceBundle resourceBundle = ResourceBundle.getBundle("config/global");
I had placed my global.properties file under "WEB-INF/classes/config" folder.It was working fine.I had resinstalled my sun one application server,.Now the server is throwing following exception -
java.util.MissingResourceException: Can't find resource for bundle java.util.PropertyResourceBundle, key record.length
But the same war file is working fine when I deployed it in sun one app servers running other machines.
when i changed the code to -
final ResourceBundle resourceBundle = ResourceBundle.getBundle("config//global");
it started working in machine as well.
How can I resolve this?
Thanks,.
Vivek

And also you can try like this,
My locale file in backing bean is like this
Locale bean
public class LocaleBean {
public String language = "en";
* @return
public void changeLocale(String language) {
System.out.println("changeLocale " + language);
this.language = language;
this.setLanguage(language);
Locale newLocale = new Locale(this.language);
FacesContext context = FacesContext.getCurrentInstance();
context.getViewRoot().setLocale(newLocale);
JSFUtils.storeOnSession("LOCALE", language);
System.out.println("end of change locale");
public void setLanguage(String language) {
this.language = language;
public String getLanguage() {
return language;
public void changeLocaleAction(ActionEvent actionEvent) {
changeLocale(this.language);
// Add event code here...
Faces-config.xml
<?xml version="1.0" encoding="windows-1252"?>
<faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee">
<application>
<default-render-kit-id>oracle.adf.rich</default-render-kit-id>
<resource-bundle>
<base-name>Resorces.xx</base-name>
<var>message</var>
</resource-bundle>
<locale-config>
<default-locale>en</default-locale>
<supported-locale>ar</supported-locale>
<supported-locale>en</supported-locale>
</locale-config>
</application>
<managed-bean>
<managed-bean-name>localeBean</managed-bean-name>
<managed-bean-class>LocaleBean</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
</faces-config>
and my resource bundle as this :
xx_ar_AR.properties
xx.properties
And Project properties>compiler property >character encoding > UTF-8
select Tools-->Preferences-->Environment
and then set the encoding to UTF-8.
no need to change your trinidad-config.xml
Regards
PY

Similar Messages

  • How to work with Resource Bundle

    Hi
    I work with JDeveloper 1013 and making an application with ADF Faces and BC.
    I'd like to internationalize my own application. How can I do this with Resource Bundle(java). How to ask which language the browser wants, ...

    There is a chapter in the ADF Developer Guide that explains this.
    Read it and let us know if you still have questions.

  • How to deal with resource bundle in multiple applications system

    Hi all,
    I'm building new system depend on the method of
    one common model with multiple applications for the view objects
    my JDeveloper version 11.1.2.3
    my Question
    How can i merge the resource bundle for these applications
    as in the common model exists file for resouce bundle
    and each other applications contains resource bundle files how can i merge all these file in one Resource bundle file ?
    Edited by: 985756 on Apr 2, 2013 12:39 AM

    Hi,
    Please check anerjusb blog for your answer
    Hoping this will help you.
    http://andrejusb.blogspot.in/2009/12/reusing-resource-bundles-from-different.html
    Thanks & Regards,
    Vikas

  • Problem with resource bundle messages written inside script of jsf included

    Hi,
    I have a main jsf page with the name Details.jsp.In this page I included Contacts jsf page.I am using resouce bundle for my application.I written all the output text tags with this resouce bundle keys.And I written the Details main page javascript alerts with this resource bundle correctly.But the problem is,I am having script alrts in my included jsf apge i.e. in Contacts page.When I write the script alerts with the resource bundle keys,it is not displaying properly.
    ---------------------------------------------------------------------Details.jsp--------------------------------------
    <f:loadBundle basename="Details_en" var="msg"/>
    <f:view>
    <head>
    <script>
    function saveFn()
    var d=document.getElementById('dform:dinputtext').value;
    if(d=='')
    alert('<h:outputText value="#{msg.requiredValidationMsgkey}"/>');
    return false;
    if(emailValidation()==false)
    return false;
    </script>
    </head>
    <body>
    <h:form id="dform">
    <h:outputText value="#{msg.nameHeader}"/>
    <h:inputText value="#{Bean.name}" id="dinputtext"/>
    <jsp:include page="/Contacts.jsp"/>
    <h:commandButton value="Save" onclick="if(saveFn()==false) return false;" action="#{Bean.saveAction}"/>
    </h:form>
    </body>
    </f:view>
    -------------------------------------------------Contacts.jsp----------------------------------------
    <script>
    function emailValidation()
    var em= document.getElementById('dform:cSubView:cemailtext').value;
    if(em=='')
    alert('<h:outputText value="#{msg.emailValidationMsgKey}"/>');
    return false;
    </script>
    <f:subview id="cSubView">
    <h:inputText value="#{CBean.email}" id="cemailtext" />
    </f:subview>
    The alert message in SaveFn is getting appeared coorectly.But in the function emailValidation is not geting dispalyed correctly.It is appearing as normat output text in the page,but not as an alert.

    Thanks for the reply.
    But I want to do some validations using javascript not only the required validation.
    In my application 5 text fields and one command button are there .Depending upon combination of 2 or 3 text field values, I have to get the values when I pressed command button.
    If I use the h:messages for validators,the conversion error is occurring when the text field takes wrong data.So it is going to give incorrect results when I press the command button.Thats why I am using javascript.
    When user enters wrong data,I want to do validation using javascript and I want to display the alert message using resource bundle.

  • ADF FACES: af:messages does'nt display label with resource bundles

    Hi,
    There is a problem with the af:messages component and error messages containing labels (such as Value is Required error message for required fields).
    If I have an af:inputText with it's label property refering to a resource bundle loaded using the f:loadBundle action, when the Value is Required message is displayed, I get "" for the field name.
    If I replace the label property with a constant value or with an expression refering to a managed bean property, then the label is properly displayed in the error message.
    I suspect this has to do as to when the action of getting the label is done. Maybe the bundle is not availlable at that time. Anyway, this is a bummer as it mean that we cannot use the f:loadBundle action to load resource bundles.
    This happen with AE11. I have not tested this with EA12.

    Thank's!
    I'll try EA12 when I have the time.
    I also found that in our JSPs, we've put the f:loadBundle ouside of the f:view tag. I'll fix that in our codebase.
    While researching a fix, I found out that using a managed bean (which implement Map interface) to load the bundle based on the name refered in the expression language is a lot more intuitive and allow for an easier management of the different resource bundle than the f:loadBundle tag.
    Basically, our EL expression are now #{bundles.bundleName.property} we replace any "_" in bundleName with "." and then lookup this name as a ResourceBundle with the locale of the view. We keep the managed bean in the request scope it remember each bundle it loaded.
    We could have done it with a custom VariableResolver. Maybe a future release of the JSF spec could provide a standard variable name that would implement the same behaviour. This way, one does not have to load each bundles before hand and only the bundles accessed by the JSP will be loaded.

  • Af:setActionListener not working properly with resource bundle value

    Hi,
    I am making a ADF-BC JSF project in which I have a commit button a page. On click of this Commit button I am setting some value (Status) through setActionListener. But as this value(Status) is subject to change, so I have stored it in the resource properties file and I'm assigning it from the resource properties file.
    Now when I hardcode the value, it works properly but when I give it from the properties resource file it sets this value to NULL. Here is my code.
    <af:commandButton text="Commit" action="some action”}>
    <af:setActionListener to="#{bindings.SP11DeliveryWarrantView1WarrantStatus.inputValue}"
    from="#{res['warrantstatus.InProcess']}"/>
    </af:commandButton>
    If I write #{'Some hardcoded value'} instead of #{res['warrantstatus.InProcess']}. It works fine. May I know what is wrong here or is it a bug?
    Neeraj.

    Hi,
    I had the same problem and many thanks Frank - yes this does work. Just for clarity here is what I did with my implementation:
    In my session level managed bean (SystemState) I added the relevant values from the bundle:
    public class SystemState
      public static final String RESOURCE_BUNDLE = "gpl.viewcontroller.resources.UIResources" ;
      private HashMap<String,String> formTypeStatuses = new HashMap<String,String>() ;
      public SystemState()
        formTypeStatuses.put("live",JSFUtils.getResourceBundleValue("home.menu2.livestatus.value",RESOURCE_BUNDLE)) ;
        formTypeStatuses.put("archive",JSFUtils.getResourceBundleValue("home.menu2.archivestatus.value",RESOURCE_BUNDLE)) ;
        formTypeStatuses.put("all",JSFUtils.getResourceBundleValue("home.menu2.allstatuses.value",RESOURCE_BUNDLE)) ;
      public HashMap<String, String> getFormTypeStatuses()
        return formTypeStatuses;
    }I then referenced these values from my jspx page:
                <af:commandLink actionListener="#{bindings.ExecuteWithParams1.execute}"
                                action="ExecuteWithParams1"
                                text="#{res['home.menu2.livestatus.text']}"
                                disabled="#{!bindings.ExecuteWithParams1.enabled}">
                  <af:setActionListener from="#{session_system_state.formTypeStatuses.live}"
                                        to="#{requestScope.status}"/>
                </af:commandLink>
                <af:commandLink actionListener="#{bindings.ExecuteWithParams1.execute}"
                                action="ExecuteWithParams1"
                                text="#{res['home.menu2.archivestatus.text']}"
                                disabled="#{!bindings.ExecuteWithParams1.enabled}">
                  <af:setActionListener from="#{session_system_state.formTypeStatuses.archive}"
                                        to="#{requestScope.status}"/>
                </af:commandLink>
                <af:commandLink actionListener="#{bindings.ExecuteWithParams1.execute}"
                                action="ExecuteWithParams1"
                                text="#{res['home.menu2.allstatuses.text']}"
                                disabled="#{!bindings.ExecuteWithParams1.enabled}">
                  <af:setActionListener from="#{session_system_state.formTypeStatuses.all}"
                                        to="#{requestScope.status}"/>
                </af:commandLink>Dave

  • GTC Page Not loading - Error with Resource Bundles

    I am using following OIM Software:
    OIM 9.1.0.2
    Linux x86
    While accessing the GTC Manage Page, I am getting the Search button, Once I click the Search for all GTCs, It is throwing me error with "Contact Sysstem Administrator"
    During the investigation, I found that I am getting the following error when I access the xlWebApp through Web:
    ===============
    INFO,16 Aug 2010 11:58:35,171,[XELLERATE.WEBAPP],Property global.resultSet.Form~Information.Description.create~generic~connector not found in en locale bundle.
    INFO,16 Aug 2010 11:58:35,171,[XELLERATE.WEBAPP],Property global.resultSet.Form~Information.Description.manage~generic~connector not found in en locale bundle.
    INFO,16 Aug 2010 11:58:35,172,[XELLERATE.WEBAPP],Property global.resultSet.Form~Information.Description.Reset~self~password~menu~item not found in en locale bundle.
    INFO,16 Aug 2010 11:58:35,172,[XELLERATE.WEBAPP],retrieving object from cache key = xlCustomClienten
    INFO,16 Aug 2010 11:58:35,172,[XELLERATE.WEBAPP],Property global.resultSet.Form~Information.Description.Change~self~password~menu~item.Change~Self~Password~menu~item not found in en locale bundle.
    INFO,16 Aug 2010 11:58:35,172,[XELLERATE.WEBAPP],Property global.resultSet.Form~Information.Description.Create~generic~connector.Create~Generic~Technology~Connector~menu~item not found in en locale bundle.
    INFO,16 Aug 2010 11:58:35,172,[XELLERATE.WEBAPP],Property global.resultSet.Form~Information.Description.Manage~generic~connector.Manage~Generic~Technology~Connector~menu~item not found in en locale bundle.
    ===============
    I added the following in customResources_en.properties
    global.resultSet.Form~Information.Description.create~generic~connector=create generic connector
    global.resultSet.Form~Information.Description.manage~generic~connector=manage generic connector
    global.resultSet.Form~Information.Description.Reset~self~password~menu~item=Reset self password menu item
    global.resultSet.Form~Information.Description.Change~self~password~menu~item.Change~Self~Password~menu~item=Change Self Password menu item
    global.resultSet.Form~Information.Description.Create~generic~connector.Create~Generic~Technology~Connector~menu~item=Create Generic Technology Connector menu item
    global.resultSet.Form~Information.Description.Manage~generic~connector.Manage~Generic~Technology~Connector~menu~item=Manage Generic Technology Connector menu item
    I am trying so many options with these two files, however the error is not changing at all. Also, do I need to add this to customDefaultResources.properties?
    Any suggestions?
    Thanks in advance. I will assign Points.
    Regards
    Vijay Chinnasamy

    LCMan wrote:
    Carolyn Samit wrote:
    Did you read my response to you??
    Yes. However, I don't believe it's an enycryption issue. It's something to do with javascript.
    Regardless of what the issue is, the only (temporary) fix seems to be to use Firefox. However, I would have to agree with what Carolyn Samit said. Carolyn is a very active member here and knows a lot of things.

  • Classloader issue with resource adapter and webservice

    The following applications are planned to be deployed on the server.
    1.My-shared-lib.ear (J2EE shared library).
    2.My-Service-ear.ear (Service)
    3.My-Resource-Adapter.rar
    The My-shared-lib.ear contains a war which has 3rd Party jars.
    The My-Service-ear.ear contains the service classes and refers to the My-shared-lib.ear using a library relationship. In our case, it refers to spring, Hibernate and related jars.
    The My-Resource-Adapter.rar contains the Resources Adapters. In this case it contains the Spring jars.
    Points on Setup
    1.The configuration does not specify any jars in the classpath.
    2.There are no 3rd party jars in the ext folder.
    *2.Issue Description*
    Issue while starting the Service EAR.*
    The development setup has an application server that has My-shared-lib.ear and My-Service-ear.ear deployed. This works fine.
    The proposed deployment architecture mandates that these applications be deployed on a server where the My-Resource-Adapter.rar is already running. We can deploy & start My-shared-lib.ear . However, when we try to deploy and start My-Service-ear.ear, it fails to start with the error. The detailed exception is found in Appendix A.
    Error Message:
    java.lang.NoClassDefFoundError: org/hibernate/ejb/HibernatePersistence
    *3.Options tried*
    1.Place all the required jars in the .rar.
    We placed all the 3rd party jars required for the My-Service-ear.ear in the My-Resource-Adapter.rar file. When we deployed all the 3 applications, all applications including the My-Service-ear.ear were deployed and started as well.
    2.Place all the required jars in the Service ear.
    We placed all the 3rd party jars required for the My-Service-ear.ear in the My-Service-ear.ear file with the <prefer-web-inf-classes>true</prefer-web-inf-classes>. When we deployed all the 3 applications, all applications including the My-Service-ear.ear were deployed and started as well.
    3.Altering deployment order.
    The deployment order was altered with a higher preference being given to the My-Service-ear.ear. When we deployed all the 3 applications, the application My-Service-ear.ear was deployed but failed to start giving the same exception.
    *4.Analysis*
    1.The spring jar though available in the library ear is being loaded from the .rar application by the classloader.
    2.The above point means that the library reference being provided in the My-Service-ear.ear does not seem to have any impact.
    3.In the 3rd scenario we observed that when the spring is removed from the .rar, it gets loaded from the My-shared-lib.ear. However when it tries to load Hibernate related classes, it fails.
    *5.Summary*
    Our understanding is that all the applications run within their own Classloaders. If classes are not found within the applications, then they should be looking at the Application Server. But here we see that they are referring to the classes in ‘.rar’ file. Hence we are unable to understand this issue. The above problem has workarounds. However, these options are not allowed as per the requirement. The requirement is that the application should run independent of the’ .rar’. Is there a better approach? Are we missing any configuration?
    Edited by: user8575867 on Oct 13, 2010 11:41 PM

    This thread caught my attention - because since switching last week from a late '06 Macbook to the Macbook Pro 13", my Wifi performance at home has gotten slow and unreliable.
    I'm using the Apple MiniDP-DVI adapter, connected to a 24" Dell monitor, which has worked great for a few years on my white Macbook. My base station is a Linksys WRTSL54GS, located about 20 feet away from my desk.
    So, I tried some speed tests with and without the DVI. Performance with the adapter connected is terrible, disconnected it's perfect. Further testing shows that positioning matters.
    When the adapter is turned back 90 degrees, leading the monitor cable towards the back of my desk, Wifi performance is bad. When I turn the adapter so it sticks straight out the left side of the Macbook Pro, performance is normal.
    This is a little weird, but an acceptable workaround for me.

  • Special character issue with Resource Object in OIM 11g

    Hello
    While creating Resource Object with special character '/' in OIM 11g, it's not allowing me.
    For ex: Peoplesoft Finance/Reporting
    Do we have any other workaround without changing the Resource Object name??
    Thanks for your help.

    Nothing is there in system configuration related to special character.

  • [SOLVED]: Weird font issues with infinality-bundle on upgrade

    Ive been using the infinality-bundle for some time with no problem until a recent update, and it seems like all my fonts got replaced with stranger ones.  Below is a screenshot of my font problem and a snippet from my pacman.log.
    [2013-10-15 18:56] [ALPM-SCRIPTLET]   If you have been using freetype2-infinality from the AUR,
    [2013-10-15 18:56] [ALPM-SCRIPTLET]   the runtime file that came with it has been saved as
    [2013-10-15 18:56] [ALPM-SCRIPTLET]   /etc/profile.d/infinality-settings.sh.pacsave and the new
    [2013-10-15 18:56] [ALPM-SCRIPTLET]   one was installed in its place. You can manually delete
    [2013-10-15 18:56] [ALPM-SCRIPTLET]   infinality-settings.sh.pacsave as it is not needed anymore.
    [2013-10-15 18:56] [ALPM-SCRIPTLET]
    [2013-10-15 18:56] [ALPM-SCRIPTLET]   If you are using [multilib], please install/upgrade
    [2013-10-15 18:56] [ALPM-SCRIPTLET]   lib32-freetype2-infinality-ultimate, too.
    [2013-10-15 18:56] [PACMAN] upgraded freetype2-infinality-ultimate (2.5.0.1-5 -> 2.5.0.1-7)
    [2013-10-15 18:56] [ALPM-SCRIPTLET] Removing redundant symlinks ...
    [2013-10-15 18:56] [ALPM-SCRIPTLET] Done.
    [2013-10-15 18:56] [ALPM-SCRIPTLET] Updating font cache...
    [2013-10-15 18:56] [ALPM-SCRIPTLET] Done.
    [2013-10-15 18:56] [PACMAN] upgraded fontconfig-infinality-ultimate (2.10.95-2 -> 2.11.0-3)
    Last edited by cmm7825 (2013-10-15 23:42:36)

    The recent Infinality update requires a uninstall/install of fontconfig.  I posted the same problem here:
    https://bbs.archlinux.org/viewtopic.php?id=171240
    Last edited by mixer (2013-10-15 23:40:03)

  • Issue with Resource Usage

    When I open up the project plan I see the following in the Resource Usage view for John (resource):
    The level of effort for the task is 8 hrs for that day. However I am seeing a discrepancy where the total effort for that day appears as 9.6 hrs. I don't know where the additional 1.6 hrs is coming from.
    The issue is the same for the other resources in the project.
    Has anyone seen this issue before?
    Thanks in advance. 

    Hi Bomasamudram,
    And you'll only see this check box for Summary Resource Assignemtns if you choose the account each time you start project pro...
    Ben Howard [MVP] | web |
    blog |
    book | P2O

  • MS Project 2013 - Issue with Resource Custom Fields

    When I use “Resource Custom Fields”, (Number type) the formula do not work. Moreover the “Calculation for task and group summary rows” options do not work (be it sum, average or any other option). Any information regarding this will really be
    helpful.

    No, what I mean is that data you enter into the Number1 field added in a Resource view (Resource Sheet for example) will not show the same data as the Number1 field added in a task view.  See FAQ51 at: http://project.mvps.org/faqs.htm
    If you are seeing the correct data in the Task view, you can try applying the built-in Resource Group - but the issue will be that you will not see the total per resource.  For example - if Resource1 and Resource2 are assigned to one task and then Resource2
     and Resource3 are assigned to another task, you won't see the individual details for Resource 2.

  • Using utf-8 in jsp with resource bundle files(Farsi Language) Help !

    Hi,
    I am using jdeveloper and struts and i have a resourcce bundle file that i am writing in Farsi in it.
    my jsp looks like this :
    <%@ page contentType="text/html;charset=UTF-8"%>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <html:form action="IndexAction.do" method="POST" enctype="UTF-8">
    <% request.setCharacterEncoding("UTF-8");%>
    <bean:message key="button.add" /><!-- i get the key from the bundle here-->
    i have saved the bundle file in utf-8 and i have tried native2ascii on it as well.
    i also have response.setContentType("text/html; charset=UTF-8"); in my action file.my browser setting is also utf-8.
    but still i get garbage chars in jsp.
    any idea ?
    thax
    reza

    hello
    i have problem whit write farsi in jsp.
    the charecter is destroy.
    please help me.
    thanks

  • Custom formatting with resource bundles

    This question was posted in response to the following article: http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf6119c-7ff4.html

    Any pattern letter using by DateTimeFormatter.dateTimePattern has to be case-sensitive as defined here: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/globalization/Dat eTimeFormatter.html#setDateTimePattern()
    The example above won't be work using Flex 4.6 + FlashPlayer 11. For example: The DATE_FORMAT defined within the British locale property file has to be dd/MM/yy (not DD/MM/YY).
    -Jens
    http://www.websector.de

  • Internationalization with resource bundle?

    i am trying to print the name scott in english and chinese. Below is the code i tried
    //inside main method
    //Line1
    System.out.println(" english name is "+ResourceBundle.getBundle("MyResources", english).getString("scott"));
    //Line2
    System.out.println(" chinese name is "+ResourceBundle.getBundle("MyResources", chinese).getString("scott"));
    import java.util.ListResourceBundle;
    public class MyResources extends ListResourceBundle {
         protected Object[][] getContents() {
         return new Object[][] {
         {"scott", "scott1"},
    Both Lin1 and 2printing scott1 .should not line 2 print the name in chinese?

    Steven,
    Can you explain me why you choose not to implement this feature in JHS 10.1.3? I need to enhance the original business exceptions, some of them are terrible (maybe you can imagine some of them translated to portuguese), I have two choices and I'm in doubt.
    The first is forget about ApplicationResources.properties for business exceptions and use the default feature of MessageBundles of JDeveloper. The second is to change the JHeadstart implementation (JhsStrutsUixLifecycle and ReportingUtils), seems to be easy to put them working.
    What do you think about it, and why do you choose not to override business exceptions descriptions in the web tier in JHS 10.1.3?
    Thanks,
    Eduardo

Maybe you are looking for

  • Move file to application server  or delete a file from application server

    Hi all I have one application in which if succeful uploading  of BMP file  from application server is not  done , File has to move to another folder like 'ERROR' Folder but i am unable to do that. here is the code: CONDENSE g_t_ws_move. CALL 'SYSTEM'

  • Thunderbird on Ubuntu; receives duplicate imap & pop3 for same user name- how to delete imap? (says 'in use', will not allow entry into Settings)

    Frontier is a telco that has changed to Yahoo mail recently. Thunderbird on Ubuntu 14 LTS behaves somewhat differently than on a Windows machine; I can open Account Settings and will see 2 duplicate account entries in the left panel, but when I clcik

  • I feel stupid for asking this, but-

    I've made a very simple workflow with Automator that opens up multiple documents (in this case, VectorWorks CAD files) and prints them as PDFs. The problem, if it can be called that, is that I end up having to press the return key three times for eac

  • Can't boot into safe mode

    I am running 10.6.7 on a RAID0 internal disk set. I am booting fine into it, but when I try to hold down Shift for Safe-mode boot, I get the little gray spinning circle, and then above it appears a gray circle with a line through it (line a "do not"

  • Alias icons

    Alias icons can no longer be customized, in Mavericks -- a feature that has long been possible.  Is this an overlooked feature that has not yet been seen and carried over, or is it an intentional action that consequently further cripples the user? Fo