[Bug 394] New: java.lang.ExceptionInInitializerError on systems with uninitialized clock

bugzilla-daemon at icedtea.classpath.org bugzilla-daemon at icedtea.classpath.org
Tue Oct 20 04:00:22 PDT 2009


           Summary: java.lang.ExceptionInInitializerError on systems with
                    uninitialized clock
           Product: IcedTea
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: IcedTea
        AssignedTo: unassigned at icedtea.classpath.org
        ReportedBy: xerxes at zafena.se

I get a Nullpointer exception during java initialization on a system that have
failed to initialize the system clock.

root at OpenRD:~/test# date
Wed Mar 16 12:47:51 1927
root at OpenRD:~/test# java -version
Error occurred during initialization of VM
Caused by: java.lang.NullPointerException
        at java.lang.System.nullInputStream(System.java:1074)
        at java.lang.System.<clinit>(System.java:73)

I wrote a small app to check the system raw clock time and sure it looks bogus 
root at OpenRD:~/test# cat main.c 
#include <stdio.h>
#include <time.h>

int main()
  time_t t = time(0);
  printf("raw time are: %ld = 0x%X\n", (long)t, (long)t);
  return 0;
root at OpenRD:~/test# ./a.out 
Wed Mar 16 12:47:51 1927
raw time are: -1350558729 = 0xAF801BF7

Java initialization work if I set the clock to a sane value:

root at OpenRD:~/test# date 041020102009
Fri Apr 10 20:10:00 UTC 2009
root at OpenRD:~/test# java -version
java version "1.6.0_0"
OpenJDK Runtime Environment (IcedTea6 1.6-rb732a13ecc53) (build 1.6.0_0-b16)
OpenJDK Zero VM (build 14.0-b15, interpreted mode)
root at OpenRD:~/test# ./a.out 
Fri Apr 10 20:10:09 2009
raw time are: 1239394209 = 0x49DFA7A1

Well reguardless of the system clock value java should launch without getting a
null pointer exception.

Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

More information about the distro-pkg-dev mailing list