Y
Yongsub Chung
Hello.
I have a java program which worked okay last week, but this week.
I added several classes, but I didn't touch the codes related to this
problem.
The skeleton code pieces for the problem is attached at the end.
When I just run the application, it stuck because appropriate init() was
not done.
So, I ran in debugging mode. Right after I ran in jdb, it gave me
following:
-------------------------------------------------------------------------
litdream@lucky tcs4 $ run jdb
Initializing jdb ...
Set uncaught java.lang.Throwable
Set deferred uncaught java.lang.ThrowableVM Started:
Exception occurred: java.io.FileNotFoundException
(uncaught)"thread=main", javaio.FileInputStream.open(), line=-1 bci=-1
main[1] where
[1] java.io.FileInputStream.open (native method)
[2] java.io.FileInputStream.<init> (FileInputStream.java:106)
[3] sun.util.calendar.ZoneInfoFile$1.run (ZoneInfoFile.java:920)
[4] java.security.AccessController.doPrivileged (native method)
[5] sun.util.calendar.ZoneInfoFile.readZoneInfoFile
(ZoneInfoFile.java:914)
[6] sun.util.calendar.ZoneInfoFile.createZoneInfo (ZoneInfoFile.java:526)
[7] sun.util.calendar.ZoneInfoFile.getZoneInfo (ZoneInfoFile.java:496)
[8] sun.util.calendar.ZoneInfo.getTimeZone (ZoneInfo.java:556)
[9] java.util.TimeZone.getTimeZone (TimeZone.java:483)
[10] java.util.TimeZone.setDefaultZone (TimeZone.java:578)
[11] java.util.TimeZone.getDefault (TimeZone.java:534)
[12] java.text.SimpleDateFormat.initialize (SimpleDateFormat.java:503)
[13] java.text.SimpleDateFormat.<init> (SimpleDateFormat.java:446)
[14] java.text.SimpleDateFormat.<init> (SimpleDateFormat.java:427)
[15] tcs.Global.init (Global.java:68)
[16] tcs.Tcs.main (Tcs.java:132)
main[1]
-------------------------------------------------------------------------
16th element in stack, Tcs.java:132, is simply calling Global.init()
function and
15th, Global.java:68, is new SimpleDateFormat("format"); constructor.
( I left code at the bottom. )
I tried by switching line Global.java:68 and Global.java:69.
App. still stops at Global.java:68, therefore I concluded I am not using
SimpleDateFormat right.
I tested differently by commenting out line 68 and 69.
Then, it stops at TimeZone code like following:
-------------------------------------------------------------------------
litdream@lucky tcs4 $ run jdb
Initializing jdb ...
Set uncaught java.lang.Throwable
Set deferred uncaught java.lang.ThrowableVM Started:
Exception occurred: java.io.FileNotFoundException
(uncaught)"thread=main", java.io.FileInputStream.open(), line=-1 bci=-1
main[1] where
[1] java.io.FileInputStream.open (native method)
[2] java.io.FileInputStream.<init> (FileInputStream.java:106)
[3] sun.util.calendar.ZoneInfoFile$1.run (ZoneInfoFile.java:920)
[4] java.security.AccessController.doPrivileged (native method)
[5] sun.util.calendar.ZoneInfoFile.readZoneInfoFile
(ZoneInfoFile.java:914)
[6] sun.util.calendar.ZoneInfoFile.createZoneInfo (ZoneInfoFile.java:526)
[7] sun.util.calendar.ZoneInfoFile.getZoneInfo (ZoneInfoFile.java:496)
[8] sun.util.calendar.ZoneInfo.getTimeZone (ZoneInfo.java:556)
[9] java.util.TimeZone.getTimeZone (TimeZone.java:483)
[10] java.util.TimeZone.setDefaultZone (TimeZone.java:578)
[11] java.util.TimeZone.getDefault (TimeZone.java:534)
[12] tcs.Global.init (Global.java:143)
[13] tcs.Tcs.main (Tcs.java:132)
main[1]
-------------------------------------------------------------------------
line 143 is TimeZone querying.
Interestingly, if I normally run this application, Main:69 actually
produces log, even though Main:68 and beyond created this problem.
May I beg some help from someone who has any clue about this?
My code is attached at the bottom.
CODE:
========================================================================
Main Function:
127: static public void main(String[] args) throws SQLException
128: {
---
132: Global.init();
133: Global.printLog("TCS Started.");
Global.java:
22: public class Global {
--
27: static private SimpleDateFormat NumberOnlyDate = null;
28: static private SimpleDateFormat NumberColon = null;
29: static private ParsePosition pos = null;
30:
31: static public final long SEC = 1000;
32: static public final long MIN = 60 * SEC;
33: static public final long HOUR = 60 * MIN;
34: static public final long DAY = 24 * HOUR;
I have a java program which worked okay last week, but this week.
I added several classes, but I didn't touch the codes related to this
problem.
The skeleton code pieces for the problem is attached at the end.
When I just run the application, it stuck because appropriate init() was
not done.
So, I ran in debugging mode. Right after I ran in jdb, it gave me
following:
-------------------------------------------------------------------------
litdream@lucky tcs4 $ run jdb
Initializing jdb ...
run tcs.Tcs
Set uncaught java.lang.Throwable
Set deferred uncaught java.lang.ThrowableVM Started:
Exception occurred: java.io.FileNotFoundException
(uncaught)"thread=main", javaio.FileInputStream.open(), line=-1 bci=-1
main[1] where
[1] java.io.FileInputStream.open (native method)
[2] java.io.FileInputStream.<init> (FileInputStream.java:106)
[3] sun.util.calendar.ZoneInfoFile$1.run (ZoneInfoFile.java:920)
[4] java.security.AccessController.doPrivileged (native method)
[5] sun.util.calendar.ZoneInfoFile.readZoneInfoFile
(ZoneInfoFile.java:914)
[6] sun.util.calendar.ZoneInfoFile.createZoneInfo (ZoneInfoFile.java:526)
[7] sun.util.calendar.ZoneInfoFile.getZoneInfo (ZoneInfoFile.java:496)
[8] sun.util.calendar.ZoneInfo.getTimeZone (ZoneInfo.java:556)
[9] java.util.TimeZone.getTimeZone (TimeZone.java:483)
[10] java.util.TimeZone.setDefaultZone (TimeZone.java:578)
[11] java.util.TimeZone.getDefault (TimeZone.java:534)
[12] java.text.SimpleDateFormat.initialize (SimpleDateFormat.java:503)
[13] java.text.SimpleDateFormat.<init> (SimpleDateFormat.java:446)
[14] java.text.SimpleDateFormat.<init> (SimpleDateFormat.java:427)
[15] tcs.Global.init (Global.java:68)
[16] tcs.Tcs.main (Tcs.java:132)
main[1]
-------------------------------------------------------------------------
16th element in stack, Tcs.java:132, is simply calling Global.init()
function and
15th, Global.java:68, is new SimpleDateFormat("format"); constructor.
( I left code at the bottom. )
I tried by switching line Global.java:68 and Global.java:69.
App. still stops at Global.java:68, therefore I concluded I am not using
SimpleDateFormat right.
I tested differently by commenting out line 68 and 69.
Then, it stops at TimeZone code like following:
-------------------------------------------------------------------------
litdream@lucky tcs4 $ run jdb
Initializing jdb ...
run tcs.Tcs
Set uncaught java.lang.Throwable
Set deferred uncaught java.lang.ThrowableVM Started:
Exception occurred: java.io.FileNotFoundException
(uncaught)"thread=main", java.io.FileInputStream.open(), line=-1 bci=-1
main[1] where
[1] java.io.FileInputStream.open (native method)
[2] java.io.FileInputStream.<init> (FileInputStream.java:106)
[3] sun.util.calendar.ZoneInfoFile$1.run (ZoneInfoFile.java:920)
[4] java.security.AccessController.doPrivileged (native method)
[5] sun.util.calendar.ZoneInfoFile.readZoneInfoFile
(ZoneInfoFile.java:914)
[6] sun.util.calendar.ZoneInfoFile.createZoneInfo (ZoneInfoFile.java:526)
[7] sun.util.calendar.ZoneInfoFile.getZoneInfo (ZoneInfoFile.java:496)
[8] sun.util.calendar.ZoneInfo.getTimeZone (ZoneInfo.java:556)
[9] java.util.TimeZone.getTimeZone (TimeZone.java:483)
[10] java.util.TimeZone.setDefaultZone (TimeZone.java:578)
[11] java.util.TimeZone.getDefault (TimeZone.java:534)
[12] tcs.Global.init (Global.java:143)
[13] tcs.Tcs.main (Tcs.java:132)
main[1]
-------------------------------------------------------------------------
line 143 is TimeZone querying.
Interestingly, if I normally run this application, Main:69 actually
produces log, even though Main:68 and beyond created this problem.
May I beg some help from someone who has any clue about this?
My code is attached at the bottom.
CODE:
========================================================================
Main Function:
127: static public void main(String[] args) throws SQLException
128: {
---
132: Global.init();
133: Global.printLog("TCS Started.");
Global.java:
22: public class Global {
--
27: static private SimpleDateFormat NumberOnlyDate = null;
28: static private SimpleDateFormat NumberColon = null;
29: static private ParsePosition pos = null;
30:
31: static public final long SEC = 1000;
32: static public final long MIN = 60 * SEC;
33: static public final long HOUR = 60 * MIN;
34: static public final long DAY = 24 * HOUR;