Message Bundle file is clobbered by Jdeveloper 9.0.3.2

I have an EO with list validation and method validation on two fields. I also have label, tooltip and width hints set up for all the fields. All of this is stored in a MsgBundle.java file.
All worked well until I changed an item in the list validation for one of the fields. Jdev changed the EO xml and java file correctly, but clobbered the MsgBundle file so it lost all of its contents. Here are the before and after MsgBundle files:
BEFORE:
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
package psr.model.businessobjects.common;
import oracle.jbo.common.JboResourceBundle;
import psr.framework.exceptions.ErrorMessages;
// --- File generated by Oracle Business Components for Java.
public class PsrVersionImplMsgBundle extends JboResourceBundle {
* This is the default constructor (do not remove)
public PsrVersionImplMsgBundle() {
* @return an array of key-value pairs.
public Object[][] getContents() {
return super.getMergedArray(sMessageStrings, super.getContents());
public static final String INVALID_STATUS_CHANGE = "PsrVersion_Rule_0";
public static final String INVALID_STAGE_CHANGE = "PsrVersion_Rule_1";
static final Object[][] sMessageStrings = {
// {"PsrVersion_Rule_2", "Version already sponsored"},
{ErrorMessages.ENTITY_ALREADY_EXISTS, "Version already sponsored"},
{"Stage_DISPLAYWIDTH", "30"},
{"Stage_Rule_0", "Please open an OPM ticket to report this error: Invalid Stage"},
{"Status_LABEL", "Status"},
{"NfsAvailable_TOOLTIP", "Does NFS mounting need to be available for this package version?"},
{"Stage_LABEL", "Version"},
{"Status_TOOLTIP", "Package Status"},
{"NfsAvailable_Rule_0", "Please open an OPM ticket to report this error: Invalid NfsAvailable"},
{"VersionNumber_TOOLTIP", "Package Version Number"},
{"PsrPackage_PackageName_LABEL", "Package Name"},
{"PsrPackage_PackageName_TOOLTIP", "Sponsored Package Name"},
{"Status_Rule_0", "Please open an OPM ticket to report this error: Invalid Status"},
{"Stage_TOOLTIP", "Package Stage (Experimental, Current, Previous)"},
{"VersionNumber_DISPLAYWIDTH", "30"},
{"PsrPackage_PackageName_DISPLAYWIDTH", "30"},
{"PsrVersion_Rule_1", "Stage change is invalid"},
{"NfsAvailable_LABEL", "NFS Available"},
{"VersionNumber_LABEL", "Version Number"},
{"PsrVersion_Rule_0", "Status change is invalid"},
{"NfsAvailable_DISPLAYWIDTH", "30"},
{"Status_DISPLAYWIDTH", "30"}};
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AFTER:
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
package psr.model.businessobjects.common;
import oracle.jbo.common.JboResourceBundle;
import psr.framework.exceptions.ErrorMessages;
// --- File generated by Oracle Business Components for Java.
public class PsrVersionImplMsgBundle extends JboResourceBundle {
* This is the default constructor (do not remove)
public PsrVersionImplMsgBundle() {
* @return an array of key-value pairs.
public Object[][] getContents() {
return super.getMergedArray(sMessageStrings, super.getContents());
public static final String INVALID_STATUS_CHANGE = "PsrVersion_Rule_0";
public static final String INVALID_STAGE_CHANGE = "PsrVersion_Rule_1";
static final Object[][] sMessageStrings = {
{"Status_Rule_1", "Status_Rule_0"}};
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Has this been bug been fixed in one of the later versions?
Thanks,
Dennis

Can you email me an as small as possible testcase to reproduce the problem?
steve "dot" muench "at" oracle "dot" com (sorry, I get too much spam as it is) :-)

Similar Messages

  • Argh! Message bundle file names are not allowed to have dots???

    It took me several hours to find the reason for this exception:
    java.util.MissingResourceException: Can't find bundle for base name properties\com.domain.prj.huj.MainApp.Messages, locale de_DE
         at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:804)
         at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:773)
         at java.util.ResourceBundle.getBundle(ResourceBundle.java:538)If the message bundle name contains dots (package separators), this exception is thrown! When I remove the dots, it works. But even the javadoc for ResourceBundle.getBundle() says that the baseName parameter is " the base name of the resource bundle, a fully qualified class name ".
    Is it not possible to have the message bundle file names containing dots (i.e. package declarations with class names)?

    Nope. Periods are used to delimit packages in the basename. So given:
    "com.domain.prj.huj.MainApp.Messages",
    ResourceBundle will look for "com/domain/prj/hui/MainApp/Message[_local][.class|.properties]" on the class path (ie, in jars etc).
    I've just had to implement an alternate RB factory to deal with legacy property files which contain periods. If you are starting from scratch, don't put in periods.

  • How do I use a bean to determine which message bundle value to use?

    Is there a way to use a bean to determine which message from my message bundle I use? I want to be able to call my bean in JSF/JSP page, have the bean return a String, and use that String to pick a message from my message bundle properties file. Now I can do this:
    <h:outputText value="#{bundle.messageA}" />or this:
    <h:outputText value="#{bean.messageName}" />where I have a method on the bean like this:
    public String getMessageName(){
         if(someTest == true){
              return "messageA";
         } else {
              return "messageB";
    }I want to combine the two so my bean determines which message I pick. I want to do this because I want to keep all the text a user sees in the message bundle file. However, based on the state of the bean, I want to display different messages.
    Thanks in advance,

    Ah this way. So you want that much of nasty if statements in the bean instead? ;)
    Then make use of the fact that you also can access Map values using the brace notation. E.g.
    <h:outputText value="#{bundle[bean.messageKey]}"/>Where getMessageKey() returns the message key, e.g. 'messageA' or 'messageB' and so on.

  • Message Bundle class not found

    Hello,
    i'm using JDev 10.1.3.3, and creating ADF BC application. When i've created the jspx page, went to it's Page Definition, and in Structure editor tried to add the Message Bundle file to this page - selected the "Generate Resource Bundle" from the context menu - i'm getting error "Class ...app_XXXPageDefMsgBundle not found" .
    Other pages in application got the same error.
    How can i solve this problem?

    And in the same time, Message Bundle classes for Entity Objects (XXXRowImplMsgBundle.java) are generating well, without any errors.

  • Updating/Reloading Message Bundles

    Hi!,
    I'm developing a JSF application which needs its Message Bundles to be updated quite regularly. The only way I've found to reload a message bundle file is to reload the context, which is not only tedious but also potentially hazardous as, under high client loads, sessions might be destroyed and the clients might lose their ongoing transactions.
    Do I have any simpler way of making JSF reload a message bundle whenever it changes? Or at least force JSF to reload a message bundle when I want it to?
    Kind Regards,
    Guido

    Well... I've removed the Duke Dollars as I've found the reply.
    As there is no standard method in ResourceBundle, the non-standard way to do it involves reflection to make the cacheList field accessible, clearing it then make it private again, all of this in the ResourceBundle instance to be reloaded.
    The code to do so is:
    Field field = ResourceBundle.getBundle("resources.framework").getClass().getSuperclass().getDeclaredField("cacheList");
    field.setAccessible(true);
    sun.misc.SoftCache cache = (sun.misc.SoftCache)field.get(null);
    cache.clear();
    field.setAccessible(false);Obviously, where "resources.framework" is your resource bundle name.
    I think that the reloading of a whole set of internationalized bundles would involve getting the faces context, retrieving all the installed locales, then acquiring the bundles one by one and applying this method.
    Cheers!
    Guido
    Buenos Aires - Argentina

  • Assign message bundle jdeveloper oracle adf entity

    how do you assign a message bundle in jdeveloper 10g for an oracle adf entity

    When you open the entity dialog, select a attribute, open the control hints tab and add some labels, formats, tooltips, JDev creates a messagebundle for you in the common package. Same for the viewobject dialog.
    hth, Markus

  • Generic Message Bundle Property Files

    Hi
    I am using a generic message properties file, which is contained in a seperate java project too the model and view controller projects. In our custom validations on the entities I am referencing the custom messages from the resources project. When running the application module the correct error messages are displayed. However the error messages are not correctley displayed in the UI and the following error message is displayed,
    Error: STRINGMANAGER: Message file: 'java.util.ResourceBundle.msg_en_ZA' not found. (Looking for 'InvalidJobId').
    I have tried including the resource bundle in the view controller project, firstly in the project properties as a Resource Bundle and as a jar file without succes.
    Any help in resolving this would be appreciated.
    Regards.
    Leon.

    Leond wrote:
    Error: STRINGMANAGER: Message file: 'java.util.ResourceBundle.msg_en_ZA' not found. (Looking for 'InvalidJobId').
    I suggest that you verify your browser locale. It seems that it is set to ZA and you don't have a property file (ResourceBundle.msg_en_ZA) for that locale.
    Alternatively, rename to or create the file ResourceBundle.msg_en_ZA.

  • Create Message Bundle classes for EO objects in Jdeveloper

    How to create Message Bundle classes(extending JboResourceBundle) for an EO object using Jdeveloper. The ADFToyStoreDemo contains these bundle classes for the EO. However, when I complete create a new EO, I don't get a default Message Bundle class.

    Don't you get these when you add validation rules to the entity or default values / control hints, etc?

  • 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

  • When do you need to register the message bundle in the faces-config

    hello
    i have applied two examples to localize messages, label, title by creating message.properties file and utilizing the f:loadbundle component the EL expression. It works like a charm without having to register anything, I have only registered the locale, but not the bundle
    also , i have used a programmatic approach
    FacesContext fc = FacesContext.getCurrentInstance();
    ResourceBundle msg = ResourceBundle.getBundle("message",fc.getViewRoot().getLocale());
    fc.addMessage(FacesMessage.SEVERITY_FATAL.toString(),new FacesMessage(msg.getString("ok")));
    which also worked without registering the message bundle!!
    although many article i read ask to register the message bundle.
    Another thing is that in Oracle Jdeveloper 10g for FORMS and PL/SQL Developers states that the message file needs to be located in \resource subdirectory
    and using getBundle (resources.message) to get it. In fact i kept getting errors indicating that the base bundle cannot be read until i located the file in the ViewContoller directory itself (and that is why i reference it with getBundle("message") rather than resources.message as indicated in the book.
    appreciate your response
    ammar sajdi
    amman - jordan

    Hi,
    Your question is not very clear. But let get through some various guideline.
    <f:loadBundle/> is horribly buggy and was all but removed from the specification. As a tag, it gets only evaluated during the render view phase, meaning that if you have EL expression referring the loadBundle's var during another phase, it's going to fail. The most common case is during validation with overridden messages.
    About the programmatic access, the problem is that you're linking your application to a specific bundle at code level. Meaning that you're preventing it to be reused in a different context, while the following get the most application local bundle name (faces-config.xml's message-bundle property)
    Resourcebundle.getBundle(FacesContext.getApplication().getMessageBundle())Registration is also the only way to override the default conversion / validation messages.
    For JSF 1.1 (10g), those are your option. However, if you're using JSF 1.2 (11g), you can also register resource bundles in the faces-config file, you then register the bundle and the var associated to it, removing the need of f:loadBundle and fixing the non render phase issues. furthermore, the code version is also simplified to:
    FacesContext context = FacesContext.getCurrentInstance();
    ResourceBundle bundle = context.getApplication().getResourceBundle(context, "varName");
    bundle.getString("myKey");You other part about \resource I never heard of nor cared for. You can place the bundle where you like on the classpath.
    Regards,
    ~ Simon

  • How to specify multiple message bundles in faces-config.xml

    Hi
    I have different properties file which I want to use as message bundle.
    Message.properties
    Help.properties
    When I specify this in faces-config.xml
    <application>
    <message-bundle>/Message</message-bundle>
    <message-bundle>/Help</message-bundle>
    </application>
    and now when I try to use that in my jsp page like this
    <f:loadBundle basename="/Message" var="message"/>
    <f:loadBundle basename="/Help" var="help"/>
    and access any messagestring from those files I can not excess either of them. But when I use only one of them it works fine.
    Am I doing something wrong or I can not do this thing at all??
    Thanks in advance.

    I only specify one properties file in the <application> tag. That one is used for system messages. I have other properties files for labels, and another for just standard app text, so in my faces-config.xml I have something like this:
    <application>
    <message-bundle>message</message-bundle>
    <locale-config>
    <default-locale>en</default-locale>
    </locale-config>
    </application>
    where my message.properties is used for system messages (validation, etc).
    I don't list the other property files there. I have two more that I use, labels_en.properties, and standard_en.properties. Labels are words that have a : at the end or a *: for required fields. Standard are just other words that I use in my application. So on every page that I have, I start out with the following header:
    <html>
    <f:view locale="en_US">
    <head>
    <f:loadBundle basename="label" var="label"/>
    <f:loadBundle basename="standard" var="standard"/>
    <title>
    .....

  • Message Bundling in BPM

    Hi All,
    I am trying to work on this Scenario for Message Bundling in BPM. The Scenario is i try to collect Idocs in BPM and after 3 IDocs from R/3, BPM will merge all the 3 into one message and send this message to a flat file.
    Now the problem is, though it shows Success message in SXMB_MONI, i dont get the output File.It doesnt even show the messages for my scenario in Runtime Workbench.
    Can somebody pl. guide me on this .
    Thanks,
    Ruchi

    Hi,
    I was trying to work on this Scenario for Message Bundling in BPM. The Scenario is i try to collect Idocs in BPM and after 3 IDocs from R/3, BPM will merge all the 3 into one message and send this message to a flat file.
    After checking it inot SXMB_MONI_BPE i could find out the error....
    <i>Bhavesh: Like you said there was an error in Variable assignment.</i>
    But now the problem is , of 3 messages i only get one record in the Output Response file....
    In SXMB_MONI , it shows <i>'Message is being sent'</i> for the other two.
    I checked the PE for that,it doesnt show any error in the Workflow log...but for the first message it shows the complete workflow and for the other two its showing in the processing mode..
    If anybody can guide me more on this..
    Thanks,
    Ruchi

  • Locale. Can't get it to load Message Bundle

    Have specified two properties files
    default en, supported es in faces.config.xml.
       <application>
         <locale-config>
           <default-locale>en</default-locale>
           <supported-locale>es</supported-locale>
         </locale-config>
       </application>Using IE7. Added es-ES as supported language (at top of list). Tools>IE Options>Languages.
    No luck
    Tried to force issue by setting locale in <f:view locale="es">
    Still not picking up the properies.messages.es file.
    Stays at default properties.messages
    I have used the following tag
    <f:loadBundle basename="com.apress.jsf.messages" var="msgs">
    Tags appear in this sequence in page:
    <f:view locale="es">
    <f:loadBundle basename="com.apress.jsf.messages" var="msgs" />
    Is this the problem?
    Or is this broken in JSF

    Have also tried removing loadbundle and modifying faces.config.xml
       <application>
         <resource-bundle>
           <base-name>com.apress.jsf.messages</base-name>
           <var>msgs</var>
         </resource-bundle>
       </application>Even when view specified es, still not working..
    Once thing I've noticed about IE language support is it shows as es-ES.
    Does my properties.messages file have to have a .es-ES suffix instead of just es?

  • Message bundles accessed from JSF and JSP pages

    Hello, everybody!
    I'm developing a localized JSF application. It is working pretty well until now.
    These are my message files:
    mensagens.properties
    mensagens_en_US.propertiesThis is how they're configured in faces-config.xml:
    <application>
        <resource-bundle>
            <base-name>br.urca.www.biblioteca.web.mensagens</base-name>
            <var>msg</var>
        </resource-bundle>
    </application>And this is how I access the messages in a page:
    <h:outputText value="#{msg.titulo}" />Nothing new until now. But now there was a need for me to have a raw jsp page in
    my web application. This page is displaying ok but I also need to access the
    message bundles as I'm able to access in the normal jsp with the JSF components.
    As you should know I can't use something like the above code with an +<h:outputText>+
    to access the messages because this is a JSF component and I'll not be able to use
    JSF components with this raw jsp page.
    So, my question is: how do I access my localized messages from a raw jsp page? I
    suppose there should be a way to do this, but unfortunately I started programming
    to the web world in Java with JSF, not JSP, so I don't know how to do this with
    JSP.
    Thank you very much.
    Marcos

    BalusC wrote:
    Just include [jstl-1.2.jar|https://maven-repository.dev.java.net/repository/jstl/jars/] in your classpath and define the fmt taglib in your JSP. Nothing more is needed.
    Hello, BalusC. Thank you for your help. We're almost there. After I have included the jstl-1.2.jar you provided me I can use the fmt tag and access message bundles from my raw jsp page (even though I had to provide other message bundles instead of the ones that I use in the other jsf pages, but it's better than nothing).
    Now there just on problem to be fixed. The jsp page is not aware when I change the locale of my application. I change this locale in a jsf page.
    I have this component:
    <h:selectOneMenu value="#{pesquisaAcervo.idiomaAplicacao}"
        valueChangeListener="# {pesquisaAcervo.idiomaAplicacaoMudado}" onchange="submit();">
        <f:selectItems value="#{pesquisaAcervo.idiomasAplicacao}" />
    </h:selectOneMenu>that calls this event in my backing bean class:
    public void idiomaAplicacaoMudado(ValueChangeEvent e)
        fIdiomaAplicacao.liberarItens();
        Idioma idioma = Idioma.deString(e.getNewValue().toString());
        // This line is for JSF
        FacesContext.getCurrentInstance().getViewRoot().setLocale(idioma.localidade());
        // This line is for Tiles
        FacesContext.getCurrentInstance().getExternalContext().getSessionMap().
            put(org.apache.tiles.locale.impl.DefaultLocaleResolver.LOCALE_KEY, idioma.localidade());
    }So, do I have to include another line in the idiomaAplicacaoMudado event above in order for the jsp page load the correct resource bundle? Or what else do I have to do?
    Thank you.
    Marcos

  • Message bundle Please help !

    Hey Im trying to make the message bundle
      <application>
            <message-bundle>webadmin.MyErrors</message-bundle>
        </application>I would like to make another file "MyErrors2 and have it switch based on a variable in the controller.. is that possible?

    You might be able to do it using the fact that ResourceBundles may be actual classes; i.e. they do not have to be properties files.
    But, I am inclined to ask what is the problem you are trying to solve? I suspect you may be down the wrong path. Be broad in your description of the problem.

Maybe you are looking for

  • How to configure multiple listeners

    Hi All, I have installed 2 different Oracle instances on a single machine. I found that each oracle installation created its own Listener. I cant start both of the listeners at the same time. As a result, the respective applications cant talk to thei

  • Watch movie on Mac rented via TV

    Yesterday I rented a movie via TV. Now I want to watch it again on my Mac. Do I need to rent it again in iTunes? (I don't want to pay twice, so I ask before trying.) Thank you!

  • Print document with merged project

    I´m using RoboHelp 7. I have a main project which merges to other projects. When I print documentation to a Word file I'd like the merged projects to automatically integrate in the main document, i.e. I'd like to print one doc file that integrates bo

  • RMX Stylus Multi Channel

    I'm trying to Multi Channel Stylus RMX. After I set up 8 Aux tracks in Logic, and change each output in Stylus mixer. I dragged, and dropped the midi pattern on the instrument track, but did not hear any sound when I hit play in Logic. I only hear so

  • Simple question about af:panelTabbed and required="true"

    Hello, I have a component af:panelTabbed with four tabs: In the fourth tab i have an af:inputText with the tag required="true" The problem is: The required is only applied if i am at the fourth tab (where the inputText is on). If i am at first tab, t