I am getting the below error:
Exception in
thread "main" java.lang.ExceptionInInitializerError
Caused by: java.util.MissingResourceException: Can't find bundle for base name c
om.geinfra.geaviation.cpc.main.res.XMLResourceMgr, locale en_US
at java.util.ResourceBundle.throwMissingResourceException(Unknown Source
)
at java.util.ResourceBundle.getBundleImpl(Unknown Source)
at java.util.ResourceBundle.getBundle(Unknown Source)
at com.XMLResourceMgr.<clinit>(XMLResour
ceMgr.java:41).
I have tried various options but none helped. I tried adding it to the classpath, made it in a jar and added to cp, i removed gnujaxp.jar from cp. None of them helped.
I also tried placing the required XMLResourceMgr.XML file in various locations, inside and outside the package, directly inside project folder, location of the class file.. still i am getting this exception. The thing is application is running fine in Eclipse. when i export it as a jar and when i try to run it from command line i get this error. The application was working properly from command line jar mode before adding this XMLResourceMgr. but now i get this error. I have spent so much of time in this but still not able to figure it out. t not able to run this from command line.
the error is in the below block of code inside XMLResourceMgr.java class:
static {
String res = XMLResourceMgr.class.getName();
mResourceBundle = ResourceBundle.getBundle(res, new XMLResourceBundleControl()); //error occurs in this line.
}
i dont actually mean that line of code is wrong. I need to do some config to make that line work. please help me on this. I am trying to read an entry from a file named XMLResourceMgr.xml