WSAD Generate RMIC ResourceBundle Problem
Hello Everyone,
If anyone could answer this, I'd be grateful. This has even IBM people stumped.
I created a Resource Bundle in the src directory a WSAD project. It's named Messages_en_US.properties. I've tested getting strings from this resource bundle, in an ejb, on Websphere, at runtime and it works fine.
The problem comes when I want to create a static enum class which references this resource bundle. When I do that and run Generate RMIC, I get the following error in a window:
com.ibm.etools.rmic.RMICException: RMIC Command returns RC = 1. The problems which stopped RMIC are displayed, and have also been recorded in the log file.
Then in the log file, I get this exception:
!MESSAGE java.lang.ExceptionInInitializerError: java.util.MissingResourceException: Can't find bundle for base name com.retek.mdm.app.attribute.service.impl.Messages, locale en_US
at java.lang.Throwable.<init>(Throwable.java)
at java.lang.Throwable.<init>(Throwable.java)
at java.util.MissingResourceException.<init>(MissingResourceException.java:39)
at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:724)
at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java)
at java.util.ResourceBundle.getBundle(ResourceBundle.java:558)
at com.retek.mdm.domain.attribute.AttributeFormatType.<clinit>(AttributeFormatType.java:33)
at java.lang.Class.initializeImpl(Native Method)
at java.lang.Class.initialize(Class.java)
at java.lang.ClassLoader.resolveClassImpl(Native Method)
at java.lang.ClassLoader.resolveClass(ClassLoader.java:617)
at com.ibm.tools.rmic.iiop.DirectoryLoader.loadClass(DirectoryLoader.java:102)
at com.ibm.tools.rmic.iiop.CompoundType.loadClass(CompoundType.java:348)
at com.ibm.tools.rmic.iiop.Type.initClass(Type.java:994)
at com.ibm.tools.rmic.iiop.Type.setRepositoryID(Type.java:1011)
at com.ibm.tools.rmic.iiop.CompoundType.initialize(CompoundType.java:756)
at com.ibm.tools.rmic.iiop.ValueType.initialize(ValueType.java:251)
at com.ibm.tools.rmic.iiop.ValueType.forValue(ValueType.java:111)
at com.ibm.tools.rmic.iiop.CompoundType.makeType(CompoundType.java)
at com.ibm.tools.rmic.iiop.CompoundType$Method.<init>(CompoundType.java)
at com.ibm.tools.rmic.iiop.CompoundType.addAllMethods(CompoundType.java:1302)
at com.ibm.tools.rmic.iiop.ValueType.initialize(ValueType.java:240)
at com.ibm.tools.rmic.iiop.ValueType.forValue(ValueType.java:111)
at com.ibm.tools.rmic.iiop.CompoundType.makeType(CompoundType.java)
at com.ibm.tools.rmic.iiop.CompoundType$Method.<init>(CompoundType.java)
at com.ibm.tools.rmic.iiop.CompoundType.addAllMethods(CompoundType.java:1302)
at com.ibm.tools.rmic.iiop.RemoteType.isConformingRemoteInterface(RemoteType.java:217)
at com.ibm.tools.rmic.iiop.RemoteType.initialize(RemoteType.java:166)
at com.ibm.tools.rmic.iiop.RemoteType.forRemote(RemoteType.java:85)
at com.ibm.tools.rmic.iiop.CompoundType.addRemoteInterfaces(CompoundType.java:1434)
at com.ibm.tools.rmic.iiop.ImplementationType.initialize(ImplementationType.java:161)
at com.ibm.tools.rmic.iiop.ImplementationType.forImplementation(ImplementationType.java:87)
at com.ibm.tools.rmic.iiop.StubGenerator.getTopType(StubGenerator.java:143)
at com.ibm.tools.rmic.iiop.Generator.generate(Generator.java:279)
at sun.rmi.rmic.Main.doCompile(Main.java:547)
at sun.rmi.rmic.Main.compile(Main.java:142)
at java.lang.reflect.AccessibleObject.invokeI(AccessibleObject.java:215)
at java.lang.reflect.Method.invoke(Method.java:255)
at com.ibm.etools.rmic.RMICClassLoader.runCompile(RMICClassLoader.java)
at com.ibm.etools.rmic.RMICOperation.invokeRMICInJVM(RMICOperation.java:466)
at com.ibm.etools.rmic.RMICOperation.rmic(RMICOperation.java:561)
at com.ibm.etools.rmic.RMICOperation.generateStubs(RMICOperation.java:206)
at com.ibm.etools.ejbdeploy.ui.plugin.rmic.UIRMICBeansOperation.generateStubs(UIRMICBeansOperation.java:132)
at com.ibm.etools.rmic.RMICOperation.run(RMICOperation.java:642)
at com.ibm.etools.ejbdeploy.ui.plugin.DeployRMICBeansOperation.generateRMICCode(DeployRMICBeansOperation.java:319)
at com.ibm.etools.ejbdeploy.ui.plugin.DeployRMICBeansOperation.run(DeployRMICBeansOperation.java)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java)
at com.ibm.etools.ejbdeploy.ui.plugin.DeployRunnableWithProgress.run(DeployRunnableWithProgress.java:92)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:101)
Apparently, because I created a static variable, RMIC tries to instantiate it, and then it can find it. Any ideas?
Thanks,
Tim
Not sure if this is the answer but...
Websphere starts it's Web container after it's EJB container. If the class that tries to call that is in the ejb level it might not have read the property file yet because that is in the web level.
We had this problem and it was traced back to the threading of the start up.
Similar Messages
-
WSAD TCP/IP Monitor problem.
Hi guys,
I am running into a poblem using WSAD, the request or response window in TCP/IP Monitor randomly disappeared, I had to close and reopen the WSAD to solve this problem, anyone has any idea how to fix this?
Thanks a lot!
JinStart by asking at a WSAD forum or newsgroup.
-
ResourceBundle problem with IE7
Hi all,
I have problems getting the correct ResourceBundle from the Locale in my applet using IE7. It works with Firefox2 (and with IE6 as a user told me, I did not test this though). Can anyone help me with this? Below you see relevant code and the output in Firefox and IE7:
System.out.println("DisplayLanguage: "+currentLocale.getDisplayLanguage());
res_bundle = ResourceBundle.getBundle("myResources.ApplicationResources", currentLocale);
System.out.println("Locale in ResourceBundle: "+res_bundle.getLocale().toString());
System.out.println("DisplayLanguage in ResourceBundle: "+res_bundle.getLocale().getDisplayLanguage());
Output in Firefox 2:
DisplayLanguage: Italienisch
Locale in ResourceBundle: it //correct
DisplayLanguage in ResourceBundle: Italienisch
Output in InternetExplorer 7:
DisplayLanguage: it_it //different from the Firefox output
Locale in ResourceBundle: de //incorrect, this is the default Locale
DisplayLanguage in ResourceBundle: DeutschOk, this is apparently a JSP issue. The Language Code provided by request.getLocale() in the JSP is not the same for every browser:
in Firefox: de, it (this is what the Locale constructor needs: the ISO-639 language code)
in IE7, Safari: de_DE, it_IT
I don't know why this is the case, but now I can use a workaround (i.e. ignore the second part of the language code).
So, the problem is solved. However, I would be still interested in the reasons for these differences...
Thanks, Gonzberg -
How do I make this program generate a new problem once the button is hit
Here is the code... appreciate any help given
How do I make this program generate a new set of problem when the "NEXT" button is clicked and continue until the END button is hit
package javaapplication3;
import java.awt.GridLayout;
import java.awt.Window;
import javax.swing.*;
import java.awt.event.*;
* @author Sylvester Saulabiu
class Grid extends JFrame{
final int score = 0;
final int total = 0;
Grid(){
//Set Layout of Flashcard
setLayout(new GridLayout(4, 4, 2 , 2));
//Create Panels
JPanel p2 = new JPanel();
JPanel p3 = new JPanel();
final JPanel p1 = new JPanel();
//Create Radio buttons & group them
ButtonGroup group = new ButtonGroup();
final JRadioButton ADD = new JRadioButton("Addition");
final JRadioButton SUB = new JRadioButton("Subtraction");
final JRadioButton MUL = new JRadioButton("Multiplication");
final JRadioButton DIV = new JRadioButton("Division");
p2.add(ADD);
p2.add(SUB);
group.add(ADD);
group.add(SUB);
group.add(MUL);
group.add(DIV);
p2.add(ADD);
p2.add(SUB);
p2.add(DIV);
p2.add(MUL);
//Create buttons
JButton NEXT = new JButton("NEXT");
JButton END = new JButton("End");
//Create Labels
JLabel l1 = new JLabel("First num");
JLabel l2 = new JLabel("Second num");
JLabel l3 = new JLabel("Answer:");
JLabel l4 = new JLabel("Score:");
final JLabel l5 = new JLabel("");
JLabel l6 = new JLabel("/");
final JLabel l7 = new JLabel("");
//Create Textfields
final JTextField number = new JTextField(Generator1());
final JTextField number2 = new JTextField(Generator1());
final JTextField answer = new JTextField(5);
//Add to panels
p1.add(l1);
p1.add(number);
p1.add(l2);
p1.add(number2);
p1.add(l3);
p1.add(answer);
p1.add(l4);
p1.add(l5);
p1.add(l6);
p1.add(l7);
p3.add(NEXT);
p3.add(END);
//Add panels
add(p2);
add(p1);
add(p3);
//Create Listners
NEXT.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
int answer1 = 0;
//Grab the numbers entered
int numm1 = Integer.parseInt(number.getText());
int numm2 = Integer.parseInt(number2.getText());
int nummsanswer = Integer.parseInt(answer.getText());
//Set the score and total into new variabls
int nummscore = score;
int nummtotal = total;
//Check if the add radio button is selected if so add
if (ADD.isSelected() == true){
answer1 = numm1 + numm2;
//otherwise check if the subtract button is selected if so subtract
else if (SUB.isSelected() == true){
answer1 = numm1 - numm2;
//check if the multiplication button is selected if so multiply
else if (MUL.isSelected() == true){
answer1 = numm1 * numm2;
//check if the division button is selected if so divide
else if (DIV.isSelected() == true){
answer1 = numm1 / numm2;
//If the answer user entered is the same with th true answer
if (nummsanswer == answer1){
//add to the total and score
nummtotal += 1;
nummscore += 1;
//Convert the input back to String
String newscore = String.valueOf(nummscore);
String newtotal = String.valueOf(nummtotal);
//Set the text
l5.setText(newscore);
l7.setText(newtotal);
//Otherwise just increase the total counter
else {
nummtotal += 1;
String newtotal = String.valueOf(nummtotal);
l7.setText(newtotal);
//Create End listener
END.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
// get the root window and call dispose on it
Window win = SwingUtilities.getWindowAncestor(p1);
win.dispose();
String Generator1(){
int randomnum;
randomnum = (1 + (int)(Math.random() * 20));
String randomnumm = String.valueOf(randomnum);
return randomnumm;
public class Main {
* @param args the command line arguments
public static void main(String[] args) {
// TODO code application logic here
JFrame frame = new Grid();
frame.setTitle("Flashcard Testing");
frame.setSize(500, 200);
frame.setLocationRelativeTo(null);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setVisible(true);
}Edited by: SirSaula on Dec 5, 2009 4:39 PMExtract code into methods, so that when an action is performed a method is called. That way you can reuse the method for purposes such as resetting textfields to their default values, scores to default values, etc.
You can go one step further and seperate the GUI layer from the processing layer, by deriving classes that for example maintain and calculate a score.
Mel -
ResourceBundle problem with JSP
Hello,
I am accessing a ResourceBundle from a bean. I am also using Tomcat 3.1. The properties file that I am accesing is called res.properties, and resides in the following folder structure.
c:\projects\test\web\WEB-INF\classes\com\riz\test
The code to access the properties file in my bean is
private static ResourceBundle res = ResourceBundle.getBundle("com.riz.test.res");This works fine. My problem is now I am trying to access this same properties file in a JSP. I have tried to call it using the code:
ResourceBundle res = ResourceBundle.getBundle("com.riz.test.res");but I get the following error:
javax.servlet.ServletException: Can't find bundle for base name com.riz.test.res, locale en_US
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:386)
at _0002fwebboss_0002ejspwebboss_jsp_212._jspService(_0002fwebboss_0002ejspwebboss_jsp_212.java:430)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:126)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.java:174)
at org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:261)
at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:369)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:160)
at org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338)
at java.lang.Thread.run(Thread.java:484)
Can anyone give me some guiding suggestions please?
Thanks,
Mike...You will not be able to use this resource from jsp because the resource is under WEB-INF directory structure. The jsp are in the application root directory. You should get the resource bundle once in the begining while logging and after that you can put it in the session and then can make use of it in the jsp pages and anywhere else.
just do...
session.setAttribute("res",res); // in the begining
after that in servlet you can do something like
ResourceBundle res = (ResourceBundle)session.getAttribute("res");
then use it.......
hope it helps
vinod -
MapViewer - Generating Tile Layer problem
Hello
I am having problem while generating tile layer. It is working perfectly, it generates folders and images inside them but the pictures are empty (the base map is rendering ok). What could be the problem?
MapViewer is deployed on WebLogic 10.3 server.
Best regards!are all the pictures empty or just some of them? Could it be those pictures are part of an empty area? can you also check the MapViewer log file to see if there is any error messages that might indicate problems when generating the tiles.
-
Generate sprite sheet problem - MaxRects and Stack frames issue
Hi.
After last update of Flash CC, I have two problems with generating spritesheets.
First, using MacRects Algorithm, there are a few strange rotated texture. This is old bug from Flash CS6.
Second, using Stack Frames, 32 frames animation ( have 12 key frames ) became only 5 textures.
I think this option make silmiliar frames into one statcked frame. But too much stacked. I lost 7 key frames.
What do i have to do??Thank you for your reply. But I think it's not the font problem.
The A alphabet is just used to replaced the original picture.
I can't post the picture because it has copyright.
I am wondering if it's a bug of flash. There are always a few clip got rotated near the end of the png.
can someone give any help? -
French symbol in ResourceBundle problem
I have a problem with a special french symbol in my ResourceBundle.
It is the symbol � (similar to "oe" or \u009D).
I can't event print this symbol to the console. Instead always a ? is displayed. All other french symbols are displayed fine. I tried also to switch the file encoding to UTF-8 ( System.setProperty("file.encoding", "UTF-8")) ), but this does not solve my problem.
Any ideas ?You may want to check the Locale for the console window/application.
What OS are you running on?
vbk -
HI,
I have a report that will generate more than 40000 pages.......I know it is crazy ><
Everytime, the report runs, it will stop in the middle and the forms (which called the report) will be closed and no file was generated.
I just wonder it is because the report too big or not? Are there any ways to fix the problem ?
Thanks!Yes, I have already pass in parameters...however, based on the users requirenment, there are still many pages generated, and they want to have it in one pdf file.
And the pdf was not generated when run in report builder, and report builder was closed automatically. -
Generate Index causes problems - any solution yet?
Hi all,
I searched the forum and knowledgebase, but i'm totally puzzled.
What is the best solution to avoid Indesign CS3 (5.0.3) from crashing when generating an index from a book with multiple documents containing references?
Is it the script from Ole to convert the book to one document?
Is it updating preview on each document (updating preview also crashes)?
Is it something else? Or is there a plug-in i could use?
As I said before, i have Indesign CS3 version 5.0.3.
Many thanks in advance,
Glen BalNetflix are dropping Silverlight, they have already done so for Internet Explorer 11, and will do the same for Safari in Yosemite.
They are using the new HTML5 Premium Video feature of Safari in Yosemite which signficantly improves battery life.
See http://techblog.netflix.com/2014/06/html5-video-in-safari-on-os-x-yosemite.html
(Personally I think the reason Netflix are doing this is nothing to do with battery life but down to the fact Premium Video Extensions includes DRM support ugh! for the first time in HTML5 and the fact that Silverlight is gradually being adbandoned by Microsoft. See http://gigaom.com/2010/10/29/microsoft-giving-up-on-silverlight-joining-html5-pa rty/) -
Hi,
I have been trying to load the data from delimited file to Microsoft sql server 2005 database.Iam using the "LKM File to Mssql(bulk)" knowledge module.It is failing at the step generating fmt file.
can any one help me to solve this issue??
thanks & regards,
Balaji tkmay be
with t as
select sysdate datep from dual union all
select null datep from dual
select xmlagg(xmlelement("Reportf",
case when datep is not null then XMLELEMENT("datep", datep)
end
from t -
Hello !
I am trying to load a resource bundle properties file and I get a MissingResourceException no matter where I put the file. I tried in the /src and the /bin directory of my project. I even tried in the project's root directory. And I don't know where else to try :(
So, please help me!
Thanks!#1 - it may be caused by an incorrect bundle name
#2 - it may be caused by an classpath setting error
#1 - The name of the bundle class must include the "Bundle" tag: example: 'PalavrasBundle_pt_BR.java'
ResourceBundle bundle = ResourceBundle.getBundle("Palavras",new Locale("pt", "BR"));#2 - check if the '.' is present in the classpath settings... -
Problem with RoboHelp 7 and Batch Generate "Printed Documentation"
Hello people! I have a problem with Batch Generate of Word documenttion in RoboHelp 7, when launch the Batch Generate with "Printed Documention" option selected send me a error message like this "Adobe Acrobat or Adobe Elments version 7 or Higher is not installed on your system".
RoboHelp generate de .chm file without problems.
I have the last version of Adobe Acrobat Reader Installed in my computer, my RoboHelp's project is not very complicated, the only to remarks is in spanish lenguage and the computer is in spanish too, but anothers projects in english US generate documentation without problems, I dont know if this had anything to do..
I have windows XP SP 3,so I test in another computer to generate documentation and I have the same problem. What´s happend ??
Thank you for all.I too am having this issue with the TOC. Firefox simply
doesn't handle it correctly and I have no idea how to fix
it. -
Problem with table maintenance generator overview screen
I added a field in a custom table and then used table maintenance generator to regenerate the table maintenance screen.
I used 2 step to generate. The problem that I have is the field not displayed in the overview screen though it is visible in the single screen ( ie the second screen).
I am not sure where the problem is as the field is not visible at all in the table control of overview screen.
Please help me on this as to what could be the problem.Usually it is enough to regenerate both screens and the modules, but sometimes it doesn't pick up all the changes. In that case just delete the maintenance dialog and recreate it. That should do it.
Regards,
Michael -
Hi experts,
I have a problem with PO. I am using BAPI_PO_CREATE1 function module for generating orders. Problems concern delivery dates. Generally when the del. date should be saturday or sunday system will automatically change this date to first working day - monday. Problem is because I need this saturday or sunday date.
During this PO generating in ME21N I've got the message "delivery date: next work day is XX" ...
Is there any method to prevent change of this date ?
Really thanks for help, Daniel.Click on the message and get the message class. Use this message and number go to SE91 and do a where used list, before this message display there should be a Function Module which will determine next working day based on the Delivery date that is entered. Fix a User Exit or Enhancement point to pick up the initial date that was used.
Hope That Helps
Anirban M.
Maybe you are looking for
-
Load is taking too much time & going to short dump.
Hi, We have around 1000 records to be loaded from r/3 . The load is taking too much time and it is still running. When tried to manually update the records ,we are getting an error ' converting the rate into indirect quote: CAD/USD( ex.
-
Can I specify the "root package" of the Library?
Can I specify the "root package" of the Library (currently seemingly hardwired as "components") so that the generated code has sensible package names i.e. "com.adobe.buttons.HelloWorldButton" rather than "components.HelloWorldButton".
-
DBAdapters and polling - Exactly how do they work?
Can someone help me clarify a point please on how a DB Adapter polls for changes on a Database please? I'm looking at this as a starting point for an ESB process so I would be grateful for any other relevant information you could provide. 1) Is this
-
can anyone please give me a step by step instruction on how to use the ralink wireless utility?, i do not know how to make it work. please anyone.........
-
Reg:sales area+sales doc ty
hi all, in VA01 when im trying to create a SO after entering sales doc ty and res sales area im getting the error as"sales doc is not defined for the sales area" plz help me out to solve this issue. Thanx Raj