-
Help needed agently. I am using SimpleDate format to get my date and it has been working, Now all of a surden it gices a resource not found. am compleely lost. this is the code
public static String timeNow()
{
// Format the current time.
SimpleDateFormat formatter = new SimpleDateFormat ("dd.MMM.yyyy HH:mm:ss ");
Date currentTime = new Date();
return formatter.format(currentTime);
}
and this is the stacktrace.
java.util.MissingResourceException: Can't find resource
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.fillInStackTrace(Compiled Code)
at java.lang.Throwable.<init>(Compiled Code)
at java.lang.Exception.<init>(Compiled Code)
at java.lang.RuntimeException.<init>(Compiled Code)
at java.util.MissingResourceException.<init>(Compiled Code)
at java.util.ResourceBundle.getObject(Compiled Code)
at java.text.DateFormatSymbols.initializeData(Compiled Code)
at java.text.DateFormatSymbols.<init>(Compiled Code)
at java.text.SimpleDateFormat.<init>(Compiled Code)
at java.text.SimpleDateFormat.<init>(Compiled Code)
at za.co.sbic.system.EventLog.timeNow(Compiled Code
Strage thing is someother program is using the same call and it works.:eek: :eek: :eek: :eek:
-
hey innom,
I don't have a jvm on this machine to test out the code. I will try to test it out later, but I did find a place that describes the exception. If you have internet connection, here is the site:
http://java.sun.com/products/jdk/1.2...Exception.html
hope this helps,
Manoj:) :cool:
-
This is a little wierd. Normally if you get an error like that and with the method being static, it would seem that you are trying to use a variable that might not have been created yet. But in your case with the code you have posted this is not the issue. Since everything you use there is created in it.
-
Works for me
What's weird is that it works for me on version 1.3. What are you using and how do you call timeNow()?
-
Ok!!! The problem seemed to be with out of memory Exception. One of the processes was giving this and I wasn't aware. I am still on java 1.2 still need to upgrade.:eek: :eek: :eek: :eek: :confused: