List:MySQL and Java« Previous MessageNext Message »
From:gmx Date:January 15 2012 8:21am
Subject:NullPointerException in GregorianCalendar.java:2026 when upgrading to debian squeeze
View as plain text  
From mysqld  Ver 5.0.51a-24+lenny2-log for debian-linux-gnu on i486 
To      mysqld  Ver 5.1.49-3-log for debian-linux-gnu on i486
java.lang.NullPointerException
	at
java.util.GregorianCalendar.computeFields(GregorianCalendar.java:2026)
	at
java.util.GregorianCalendar.computeFields(GregorianCalendar.java:1996)
	at java.util.Calendar.setTimeInMillis(Calendar.java:1109)
	at java.util.Calendar.setTime(Calendar.java:1075)
	at java.text.SimpleDateFormat.format(SimpleDateFormat.java:876)

It appears that in mysql-connector-java-5.1.10-bin.jar:
com.mysql.jdbc.PreparedStatement line: 4728

this.tsdf.setTimeZone(this.connection.getServerTimezoneTZ());

is null.

The combination "
useGmtMillisForDatetimes=true&serverTimezone=Europe/Zurich&" in my
tomcat's server.xml appears to fix it.
Any better hints?

    Thanks in advance

          Ralf

Thread
NullPointerException in GregorianCalendar.java:2026 when upgrading to debian squeezegmx15 Jan