Hi,
I'm using the glibc version of jdk1.1.7v1a on a RH 5.2
system with glibc 2.0.7.
When trying to run some programs, I'm getting this message:
java.lang.Error: dtz null
at java.util.TimeZone.getDefault(TimeZone.java:94)
at
at
at ObjectSerialization.main(ObjectSerialization.java:8)
It also happens in the compiler:
java.lang.Error: dtz null
at java.util.TimeZone.getDefault(TimeZone.java:94)
at
at java.text.MessageFormat.format(MessageFormat.java)
at java.text.MessageFormat.format(MessageFormat.java)
at java.text.MessageFormat.format(MessageFormat.java)
at sun.tools.javac.Main.getText(Main.java)
at sun.tools.javac.BatchEnvironment.errorString(BatchEnvironment.java)
at sun.tools.javac.BatchEnvironment.error(BatchEnvironment.java)
at sun.tools.java.Environment.error(Environment.java)
at sun.tools.java.Environment.error(Environment.java)
at sun.tools.java.Environment.error(Environment.java)
at sun.tools.java.Environment.error(Environment.java)
at sun.tools.tree.Context.findOuterLink(Context.java)
at sun.tools.tree.Context.findOuterLink(Context.java)
at
sun.tools.tree.NewInstanceExpression.insertOuterLink(NewInstanceExpression.java)
at sun.tools.tree.NewInstanceExpression.checkValue(NewInstanceExpression.java)
at sun.tools.tree.Expression.checkInitializer(Expression.java)
at
sun.tools.tree.VarDeclarationStatement.checkDeclaration(VarDeclarationStatement.java)
at
sun.tools.tree.DeclarationStatement.checkBlockStatement(DeclarationStatement.java)
at sun.tools.tree.CompoundStatement.check(CompoundStatement.java)
at sun.tools.tree.Statement.checkMethod(Statement.java)
at sun.tools.javac.SourceField.check(SourceField.java)
at sun.tools.javac.SourceClass.checkFields(SourceClass.java)
at sun.tools.javac.SourceClass.checkInternal(SourceClass.java)
at sun.tools.javac.SourceClass.check(SourceClass.java)
at sun.tools.javac.Main.compile(Main.java)
at sun.tools.javac.Main.main(Main.java)
error: An error has occurred in the compiler; please file a bug report
(http://java.sun.com/cgi-bin/bugreport.cgi).
1 error
Here's the input with which it happens, save it as ObjectSerialization.java
The weird thing is that it happens only intermittently, though it's
reproducible for a given input.
I'm using green threads and no JIT, although it also happens with
native threads and TYA.
NB: the failure that happened when running the program was produced
after I compiled the .java file with Kaffe's pizza compiler.
More info, in case you're interested:
My env:
HOSTNAME=peerless.cs.utah.edu
LOGNAME=gback
PIXELFXDIR=/usr/pfx/Pixel2
MAIL=/var/spool/mail/gback
MACHTYPE=i386
WWW_HOME=http://www.cs.utah.edu/~gback/
TERM=xterm-color
HOSTTYPE=i386-linux
PATH=/usr/local/java/bin:/usr/bin:/sbin:/usr/sbin:/usr/local:/usr/etc:/opt/local/bin:/usr/local/bin:/usr/X11R6/bin:/opt/wordperfect/wpbin:/home/gback/bin:.:/usr/bin:/sbin:/usr/sbin:/usr/local:/usr/etc:/opt/local/bin:/usr/local/bin:/usr/X11R6/bin:/opt/wordperfect/wpbin:/home/gback/bin:.:/usr/bin:/sbin:/usr/sbin:/usr/local:/usr/etc:/opt/local/bin:/usr/local/bin:/usr/X11R6/bin:/opt/wordperfect/wpbin:/home/gback/bin:.:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/X11R6/bin:/opt/kde/bin:/usr/X11R6/bin
HOME=/home/gback
BITMAPDIR=/home/gback/bitmaps
SHELL=/bin/tcsh
USER=gback
VENDOR=intel
GROUP=cs-rsrch
DISPLAY=:0.0
HOST=peerless.cs.utah.edu
OSTYPE=linux
NNTPSERVER=news
OPENWINHOME=/usr/openwin
PWD=/home/gback/kaffe/test/fail
SHLVL=4
EDITOR=vi
CVSROOT=/usr/lsrc/flux/CVS
gback@peerless [79](~) > ls -l /etc/localtime
lrwxrwxrwx 1 root root 33 Apr 13 18:23 /etc/localtime ->
../usr/share/zoneinfo/US/Mountain
gback@peerless [80](~) > date
Tue May 4 16:16:08 MDT 1999
Any ideas? Is this a know problem?
Btw, is there a bug database for this jdk?
Thanks,
- Godmar
///////////////////////////////////////////////////////
import java.io.*;
import java.util.*;
public class ObjectSerialization {
public static void main(String[] args) {
WR wr = new WR();
wr.write();
wr.read();
}
class WR {
FileOutputStream os = null;
ObjectOutput oo = null;
FileInputStream is = null;
ObjectInput oi = null;
WR() {};
// write an object
public void write() {
Date d = new Date();
try {
os = new FileOutputStream("SavedObject");
oo = new ObjectOutputStream(os);
} catch ( Exception e ) {
System.out.println(e);
System.out.println("WRITE: Unable to open stream as an object
stream");
e.printStackTrace();
}
try {
oo.writeObject("Today is: ");
oo.writeObject(d);
os.close();
} catch ( Exception e ) {
System.out.println(e);
System.out.println("Unable to write Objects");
e.printStackTrace();
}
}
// read an object
public void read() {
try {
is = new FileInputStream("SavedObject");
oi = new ObjectInputStream(is);
} catch ( Exception e ) {
System.out.println("READ: Unable to open stream as an object
stream");
e.printStackTrace();
}
Date d = null;
String str = null;
try {
str = (String)oi.readObject();
d = (Date)oi.readObject();
} catch ( Exception e ) {
System.out.println("Unable to read Object");
e.printStackTrace();
}
System.out.println("The String that was written is: " + str);
System.out.println("The Date that was written is: " + d);
}
}
}
////////////////////////////////////////////////////
----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]