Java Property Resource Bundle

I have an XmlError but the JRC engine cannot find a java resource bundle properties file for that key. I have deployed jrc into jboss. Where can I find the file and where is the best location for it?
thanks
Bruce

Hi CaptainMorgan08,
Thanks for pointing me in that direction. As I understand that is a complete documentation of the class, but I was unable to find there this "key secutiry.ex" error message.
The applet runs fine when I launch it on my desktop XP, but when I upload it to my Linux server, and access it over the net than it throws this error...
It seems like this is not a common error...

Similar Messages

  • Problem with property resource bundles

    I use struts message resource to localize my jsp pages.
    struts message resources itself uses property resource bundles to
    accompolish its task.the problem arises when I try to
    print a message from resource bundle using:
    <bean:message bundle="messages_ir" key="label.username" />
    statement and my resource bundle file has a line like:
    label.username=\u0644\u0646 ,
    but it doesnot show the specified unicode characters. as i have understood it
    only uses the low order bytes in specifed unicdes (e.g \u0644=\u0044).
    plz help me!

    first did you try putting this at the top of the jsp page?
    <%
    page
    language="java"
    pageEncoding="utf-8"
    contentType="text/html;charset=utf-8"
    %>
    then, when using struts, you should also specify the locale:
    <html:html locale="true">
    </html:html>
    hope this helps

  • Java: Loading Resource Bundle File with UTF-8

    I have found out all my previous problems now, thank you all for your assitance with this...
    During the time we have worked so solve our problem with UTF-8 charset we have found new problem with this?
    I don't know if this is the right forum to put this up, if not please let us know where to go with this?
    I have prepared both Eclipse (JSP Files) and GlassFish to run all my files in charset UTF-8. Then i got my
    resource bundle files(property files) to use UTF-8 encoding. Everything looks fine in my text editor. Then
    when i upload these pages every character retrieved from my resource bundles look garbled. This is because
    Java loads property files using ISO 8859-1 character encoding.
    This is a problem from Sun i have read on the internet!
    Note: that in JDK 1.6, you can use PropertyResourceBundle constructor to take a Reader which uses UTF-8 encoding.
    please have a look at these links for more info:
    [http://www.kai-mai.com/node/128]
    [http://java.sun.com/javase/6/docs/api/java/util/PropertyResourceBundle.html]
    Note: PropertyResourceBundle can be constructed either from an InputStream or a Reader, which represents a property file.
    Constructing a PropertyResourceBundle instance from an InputStream requires that the input stream be encoded in ISO-8859-1.
    In that case, characters that cannot be represented in ISO-8859-1 encoding must be represented by Unicode Escapes,
    whereas the other constructor which takes a Reader does not have that limitation.
    What i have read and understand is that the real solution to the problem is: Get the fmt lib to use a Reader instead of an
    InputStream. Alternativly if it works get a ResourceBundle instead of creating one that is wrong all the time? I have to create
    my own ResourceBundle instead of using my own fmt lib wich i cannot trust in a way any more. Is this right or am i comletly wrong?
    My WebTexts files, en, sv and ry are my resource property bundles. To be able to read them i will use resource property bundle reader.
    Fmt lib gives me this but it seems that it inciates this in an InputStream (wich is looked to iso-8859-1) instead of a reader who can
    read UTF-8 without no problem. So can i get my fmt lib to change this or not, anybody have an idea about this???

    Torleif wrote:
    Ok, i know there are a few ways of doing this already. The problem is that i have no idea how to use these different problem solving issues. First we have the;
    1. native2ascii command line utility.
    2. use the XML properties format.
    3. other ways of converting from iso-8859-1 to utf-8.
    The last one i have tried already but i never get this to work. So after knowing of 2 standardized solutions you choose to implement your own non-standard soltion? That's usually not a good idea until you've verified that the standardized solution don't help.
    This is also not the best solution to the problem i have to say. This way i will have both properties files and source files to work with and that is to much i think. Either i will use the native2ascii command or use XML properties format like you say here. I need some more insight in how these two work only because i have no idea my self.Uhm .. read [the documentation|http://java.sun.com/javase/6/docs/api/java/util/Properties.html]? loadFromXML/storeToXML work pretty much exactly the same as load/store, except they handle XML. Try it, look at what it produces, learn.
    Could you please help and explain how to use either this native2ascii command line work or how this XML format properties would work for me. Please i need guidance here with this!!![native2ascii is documented as well|http://java.sun.com/javase/6/docs/technotes/tools/windows/native2ascii.html].
    If you have a specific question after reading those, feel free to ask here.
    You really have to work on your Google-fu, it seems to be too weak.

  • How to compare and edit Resource bundle file using java programe

    Hi All
    I have two resource bundle with key, value and some comments. I need to write a java code to compare both of the values of the keys and if the values are different then i want to replace the second value with the first value.
    Its a programe which will udpate the second file with the first file values.
    I tried using Properties class but it didnt worked because when i am saving the file using store method it removes all the comments and the order of text also got disturbed.
    How I need to do this any help appriciated.
    Please elt me know if someone needs more info.
    Thanks in advance.

    Let's assume the ini file is a mapping type storage (key=value) so lets use Properties object. (works with java 1.4 & up)
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.util.Properties;
    public class Test {
         private static Properties props;
         public static void main(String[] args) throws IOException {
              File file = new File("test.ini");//This is out ini file
              props = new Properties();//Create the properties object
              read(file);//Read the ini file
              //Once we've populated the Properties object. set/add a property using the setProperty() method.
              props.setProperty("testing", "value");
              write(file);//Write to ini file
         public static void read(File file) throws IOException {
              FileInputStream fis = new FileInputStream(file);//Create a FileInputStream
              props.load(fis);//load the ini to the Properties file
              fis.close();//close
         public static void write(File file) throws IOException {
              FileOutputStream fos = new FileOutputStream(file);//Create a FileOutputStream
              props.store(fos, "");//write the Properties object values to our ini file
              fos.close();//close
    }

  • How to use XLIFF file as resource bundle in Java code

    We use xliff as resource bundle for our ADF application. it is has been no problem to have localized message displayed on UI. how ever, I'm wonderring how to use Java code to access xliff as resource bundle which similar to access properties resource bundle. for example:
    Locale myLocale = new Locale("es", "ES");
    ResourceBundle bundle = ResourceBundle.getBundle("HelloResourceBundle", myLocale);
    System.out.println(bundle.getString("Hello"));is it posible to create "HelloResourceBundle" in xliff format?
    Thanks

    Following code worked for me:
    import oracle.javatools.resourcebundle.BundleFactory;
    import java.util.ResourceBundle;
    * This method retrieves localized strings from a given XLIF resource bundle.
    * @param bundleName The XLIF bundle from which the localized string is to be retrieved.
    * @param key The key of the localized string.
    * @return The localized string retrieved from the given XLIF bundle.
    public static String getXlifLocalizedString(String bundleName, String key) {
    if (StringUtils.isEmpty(key)) {
    return key;
    if (StringUtils.isEmpty(bundleName)) {
    return "[" + key + "]";
    String localizedString = null;
    ResourceBundle resourceBundle = null;
    try {
    resourceBundle = BundleFactory.getBundle(bundleName);
    localizedString = resourceBundle.getString(key);
    } catch (Exception e) {
    LOG.log(Level.SEVERE, "Problem in loading XLIF resource bundle: " + bundleName, e);
    return "[" + key + "]";
    return localizedString;
    }

  • Resource Bundle loading in Java

    Hi,
    I want to know how to load resource bundle in java? I have a requirement of reading xml files by looking the path in resource bundle.
    Any help would be highly appreciated.

    FacesContext context = FacesContext.getCurrentInstance();
    ResourceBundle bundle = ResourceBundle.getBundle(properties_file);
    bundle.getString(properties_name);

  • How To Change Resource Bundle file's data from Java Class

    Hi
    i have used below code for accessing Resource Bndle from Java Class but here i also want to make change in a particular key and its value.
    please let me know the code i should use to make changes in Resource Bundle file's key and value and saving the same in the file.
    package test;  import java.util.Enumeration;
    import java.util.ResourceBundle;
    public class ResourceBundleTest {
    public static void main(String[] args) {
    ResourceBundle rb = ResourceBundle.getBundle("test.bundletest.mybundle");
    Enumeration <String> keys = rb.getKeys();
    while (keys.hasMoreElements()) {
    String key = keys.nextElement();
    String value = rb.getString(key);
    System.out.println(key + ": " + value);
    Thanks

    With further debugging, I noticed the following line only works in integrated WLS but not in standalone WLS
    resourceBundle = ResourceBundle.getBundle("com.myapp.MyMappings");
    I confirmed the corresponding properties file was included properly in the EAR file but the standalone WLS failed to find the properties file at runtime.
    Why did the standalone WLS class loader (must be the same as the integrated WLS) failed to find the properties file deployed under the WEB-INF/classes path in the EAR file?
    The above line was in a POJO class which has the same classpath as the properties file ie. com.myapp.MappingManager.class.
    It was strange that the class loader could load the POJO class but unable to find the com.myapp.MyMappings.properties in the same classpath!!!
    Is this a bug in standalone WLS?
    Edited by: Pricilla on May 26, 2010 8:52 AM
    Edited by: Pricilla on May 26, 2010 9:01 AM

  • File not found, Missing resource bundle

    Hi
    I have a problem in accessing files (XML and Resource bundles) in Java projects. I used to access these files in WD Java. The same piece of code does not work here.
    e.g. When I create a new file object by providing the path name I get a file not found exception. The file exists in my package and I call it this way:
    File f = new File("file.txt"); then in an input stream but it doesnt work. However in a J2EE project the same code works.
    Similarly the resouce bundle never seems to work even if I give the fully classified class name for the property file. I can access property files in WD Java with ease. I understand that the root path changes and hence the problem. How should I solve it? Is there an elegant way which makes it work in all cases? Please throw some light on the root path for these projects. Thank you.
    regards
    LNV
    Edited by: vln on Jan 16, 2008 9:34 AM

    You should be using
    <b>this.getClass().getResourceAsStream(filePath)</b>
    which will return you an InputStream.
    Check the JDK documentation for the respective methods in java.lang.Class and java.lang.ClassLoader.
    HTH!
    \-- Vladimir

  • Problem using Resource Bundle in XSLT File

    Hi All,
    I've been trying to use Resource Bundle on my XSLT file with no success for the last 2 weeks. So I would like some help to definitely end this problem.
    The fact is that i have a property file that i would like to read and it works fine when i use jsp or a servlet however when i try to call the same property file using my XSL i get the message below:
    java.util.MissingResourceException: Can't find bundle for base name thoth, locale en_US
    Follow the code from my Stylesheet that i'm calling the resource bundle:
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:java="java.util.ResourceBundle" exclude-result-prefixes="java" version="1.0">
    <xsl:strip-space elements="*"/>
    <xsl:output method="html" indent="yes" version="4.0"/>
    <xsl:output encoding="ISO-8859-1"/>
    <xsl:template match="page">
    <html>
    <body>
    <xsl:apply-templates select="paragraph"/>
    <xsl:variable name="resources" select="java:getBundle('thoth')"/>
    <xsl:value-of select="java:getString($resources,'general.title')"/>
    </body>
    </html>
    </xsl:template>
    </xsl:stylesheet>
    Please someone could help me why this file cannot be located, I am 100% of sure the property file path is in my classpath since it works fine in a servlet. Should i have to put it some other place? Do i have some other way to read this file and show the information from the file?
    I would appreciate any help
    thanks in advance and Regards
    Fabio

    Please someone could help me why this file cannot be located, I am 100% of sure the property file path is in my classpath since it works fine in a servlet.
    Is the property file in your classpath? or whether the directory where the property file is residing is in your classpath. Please put only the directory where the property file is located in the classpath and try again.
    It may be working fine with the servlet because j2ee servlet containers put the classes and lib directory automatically in the classpath therefore resource bundle gets loaded even without putting it explicitly in the classpath. This doesn't happen when you try to test some component from the console.
    Let me know if this does not work.
    regards,
    Abhishek.

  • Error in Loading Resource Bundle in JSP

    Hi
    I have one Resource Bundle which working well in my JSP page
    i declared as below
    <f:loadBundle basename="com.ApplicationLabels" var="lblbundle"/>
    Ok then i want to add another new resource bundle and i put it below the first loadBundle tag
    <f:loadBundle basename="com.newLabels" var="newbundle"/>
    But when i access my JSP page it keeps giving me
    Exception Details: javax.faces.el.PropertyNotFoundException
    Error testing property 'test' in bean of type null
    Possible Source of Error:
    Class Name: com.sun.faces.el.PropertyResolverImpl
    File Name: PropertyResolverImpl.java
    Method Name: getType
    Line Number: 342
    What are the things i need to configure after i creatting properties file for my Application Messages in JSP page
    any idea about this exception?
    Thanks.

    Hi Voodi,
    in the record i have many columns that refered to date, i have: Valid-from, Valid-To H, created on, Valid From, Valid To- i don't know where is the specified column to check the required format, in PSA in the data package 19 i have 13755 Records posted and i have checked many records to control these columns but i don't find something that demonstrate me a difference between the format, i don't know why the error signalated is only 6701...but you think is only a problem of format it's not not somthing that i have to signalated to the person who works on R/3 if there is something to correct in the datasource?
    Thanks
    Bilal

  • BUG-JDev 11G 5407-Project level resource bundle usage messes the page

    When you define a resource bundle on the project properties and if you are using templates the page is not properly rendered in the design view but it runs fine.
    What happens is , JDev adds a JSTL set tag just before the *<af:pageTemplate>* tag and this confuses the designer. To workaround I defined the bundle variable in faces-config, it worked fine for the existing texts but when you add a new text to the page JDev keeps adding this set tag at the beginning of the page and you need delete it each time.
    It looks like a bug to me ..
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
              xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
              xmlns:f="http://java.sun.com/jsf/core"
              xmlns:dvt="http://xmlns.oracle.com/dss/adf/faces"
              xmlns:mcc="http://com.micros.adf.controls"
              xmlns:c="http://java.sun.com/jsp/jstl/core">
    <c:set var="abcdmainBundle"
             value="#{adfBundle['com.abcd.view.zzzz.messages.AbcdMain']}"/>
      <af:pageTemplate viewId="/tmpl/abcdMainFgTmpl.jspx" id="pt1">
        <f:facet name="main">
     

    Hi,
    we have the same issue and therefore do not use the feature of the property inspector.
    Instead we open the *.properties file in jdev and edit it manually.
    There is bug 7537379 around this c:set tag which MAY BE fixed in the next release (11.1.1.2.0) but I don't know if this bug also covers exactly your problem.
    regards
    Peter

  • Where does the resources bundle files need to be

    Hi All,
    Does any of you knows where all the custom resources bundle files that will be used on BCC need to be?
    I have something like this:
    BCC module /src/com/mycompany/resources/WebAppResources.properties
    But when I try to use it
    This happens
    javax.servlet.jsp.JspException: An error occurred while evaluating custom action attribute "title" with value "${activity.description}": An error occurred while getting property "description" from an instance of class atg.bizui.activity.GenericActivity (java.util.MissingResourceException: Can't find resource for bundle java.util.PropertyResourceBundle, key manageLoyaltyProgram.description)
    I am trying to use it on a activity that will be used in the ActivityManager:
    This is what I have
    <resource-bundle>com.mycompany.resources.WebAppResources</resource-bundle>
    Do you know if I am missing somehting or putting the files on a wrong location?
    Regards,
    Obed

    Hi Shaik,
    The title of for the source is added http://i.imgur.com/a6WVxsW.png but when I click on it it throws this exception:
    javax.servlet.jsp.JspException: An error occurred while evaluating custom action attribute "value" with value "${activity.displayName}": An error occurred while getting property "displayName" from an instance of class atg.bizui.activity.GenericActivity (java.util.MissingResourceException: Can't find resource for bundle j
    ava.util.PropertyResourceBundle, key emanageLoyaltyProgram.displayName)
    meaning that the properties file is on the classpath, but my genericActivities.xml file is not able to read the properties file.
    Any suggestion?
    Regards,
    Obed

  • Character encoding in resource bundle files

    I am developing a multilingual site, using resource bundle files. The problem I'm having is that, while the jsp file is save in UTF-8, and the contentType="text/html; charset=UTF-8", the foreign characters in the bundle files don't display properly unless I save them as "windows-1252". If I copy the text and paste it into the jsp file, it displays correctly.
    How can I make the text from the bundle files display the same as the text in the jsp document itself when both files are saved as UTF-8? I'm surprised it doesn't do this by default.

    Because resource bundles (the PropertyResoureceBundle class in particular) doesn't know anything about JSP or HTML page encodings. All that class knows is that it needs to load a properties file from the local (server-side) file system. (BTW, if you are using Struts MessageResources, it works the same way). Anyway, it doesn't read the file every time you call for a resource property String, it reads it 1 time, and 1 time only when you call new ResourceBundle().
    The API docs (in java.util.Properties) specified that properties files are read using the ISO8895-1 encoding, actually, not the Windows-1252 or whatever the OS defines. So if you store text that's using a different encoding then ISO8895-1, it's going to read the chars incorrectly.
    native2ascii converts things to ASCII using Unicode escapes, as I said. (Although, maybe it saves as ISO8895-1, I forget..., or maybe you should specify the output encoding.... you'd have to read the docs on that tool, cuz there's no command-line help.) This is sort-of an exception to the ISO8895-1 thing, in a sense, as all ASCII chars are the same as the first 127 chars of ISO8895-1, so it doesn't matter really.
    So in short, it doesn't assume it's in the default Windows encoding, it assumes it's in ISO8895-1. But since the API docs specifically say so, you should abide by those rules.
    As for "getting around the problem", yes, it does, actually. See, whatever it reads in that Unicode escaped ASCII text is converted properly to Strings in Java, which are 16-bit Unicode characters, which cover nearly every character set around (English, Chinese, Japanese, Arabic, Cyrillic, etc). When it's in that form, the chars are the Unicode chars and that's it. That's all they need to be. Encodings are only important when writing (and reading back) to files or other byte streams. You have to read in with the same encoding it was written under, otherwise the conversion is not going to be correct (with a few exceptions, but not many).
    So that creates a Unicode String in Java, and when you write that to a JSP page or servlet, the output writer used knows from the content type you specified in the page declaration (UTF-8 is typically recommended because it's an efficent way to deal with Unicode chars, particularly in HTML, where most of the HTML tag content is still ASCII text), so it encodes the strings in that encoding.
    Get it?

  • Loading resource bundle

     

    Hi,
              Try putting it in classfiles directory.Do not keep copies of it in any
              other directories...It is working in my case so it should in u r cases
              too...
              Better luck..
              Sameer Gijare
              Joseph Benavidez wrote:
              > I'm having the same problem. I have resource bundles (techincally,
              > property files) in my classpath (not the servlet classpath)
              > that loaded fine with the ResourceBundle.getBundle() method
              > under 5.0 beta 2, but the call seems to be broken now.
              >
              > j.joseph benavidez
              > [email protected]
              >
              > > Philippe Renon wrote:
              > >
              > > Hi,
              > >
              > > I use the following line of code to load a resource bundle from within
              > > a jsp page.
              > >
              > > <%
              > > ResourceBundle bundle = ResourceBundle.getBundle("WebBundle",
              > > request.getLocale());
              > > %>
              > >
              > > I keep getting java.util.MissingResourceException: Can't find bundle
              > > for base name WebBundle, locale fr
              > > If have three files (WebBundle.properties, WebBundle_fr.properties
              > > and WebBundle_fr_FR.properties) , but
              > > I'm not sure where I'm supposed to place these files, so they can be
              > > loaded from the servlet.
              > >
              > > Philippe.
              > >
              > > PS: I use WL 5.1 & J2SE 1.3
              

  • Manually loading resource bundles

    Hi,
    i'm trying to use the .properties files to configure my app.
    This is outside of the general localization discussions and i'm
    running into a few problems. i'm building an internal global tool
    and want to use property files to define the specific views and
    attributes for each section. in my project i have a folder called:
    properties and in it there is a folder for en_US.
    inside of en_US i have two folders, one for each section: UPD
    and BBS. each of those folders have their own config.properties
    file.
    the compile directives look like this:
    -locale=en_US -allow-source-path-overlap=true
    -source-path=properties/{locale}/UPD,properties/{locale}/BBS
    in my application there is a drop down with BBS and UPD
    options. I want to switch to the correct bundle when a user changes
    the dropdown values. attached is the code for the dropdown and the
    switching.
    can someone tell me how to point to the correct bundles?
    Thanks,
    d

    I've tried referencing the default properties file that gets created with a new Visual Java Faces project called Bundle.properties which is in the base directory. This works and it does not complain about a default language en_AU.
    I've searched the directory files for anything thats different about the default properties file but can't find it referenced???
    Currently I'll run with this option but is there any setting I'm missing that prevents me referencing a resource-bundle file in another folder which might cause this error?

Maybe you are looking for

  • MS Powerpoint 2010 Notes Pages and Acrobat 9 Pro

    Does anyone have a print solution that allows Notes pages print in Acrobat 9 Pro? Blank pages print or the notes only and not the slide will print.  We made a mistake by upgrading our whole department to MS Office 2010, not knowing that Acrobat (whic

  • 3500 display blank

    i was updating my set 3500-c ..bt i disconnected it between the software updatation.so the phone was not updated properly.the phone was working fine as earlier,bt after some hours its display was blank.the phone is still working properly,bt there is

  • Query Servers for a specific certificate

    Hello, We have a wildcard certificate on our domain.  Our CA is not longer supporting the SHA-1 algorithim and I need to re-key my certs to SHA2.  The problem I have is my previous network admin did not document the servers the wildcard cert was inst

  • [SOLVED] perl 5.16.3 + imapsync + Gmail

    hello, does anybody use this combination? is it working for you? it stopped working for me somehow after perl upgrade it hangs on "Calling configure", i just made a modification in imapsync and set "SSL_verify_mode => 0" please help, thank you edit:/

  • Broadcast and Cache

    Hi 1. As we know using information broadcasting, we can pre calculate or pre run the reports and send the output of the reports to the users via email. My question is. Is the report send as attachment in email to the users or how? And user drill down