Hi,
Am using MySQL Connector/J 3.0 JDBC driver with 4.1.3-beta-standard on OS X.
I have the following code snipet:
// ......
while (rs1 != null && rs1.next())
{
// ......
Calendar cal = Calendar.getInstance();
cal.clear();
cal.setTime(rs1.getTimestamp(i)); < ---------- I get a NullPointerException here.
// ...........
}
// .....
java.lang.NullPointerException at java.util.Calendar.setTime(Calendar.java:902) at com.db.export.SomeClass(SomeClass.java:191)
NOTE: This same code works perfectly fine when i use MySQL Connector/J 3.0 JDBC driver with mysqladmin Ver 8.40 Distrib 4.0.16.
The table was created like this:
CREATE TABLE user ( ID int(11) NOT NULL auto_increment, USERNAME varchar(20) NOT NULL default '', PASSWORD varchar(20) NOT NULL default '', FIRSTNAME varchar(50) NOT NULL default '', LASTNAME varchar(50) NOT NULL default '', EMAILADD varchar(255) NOT NULL default '', PHONENUMBER varchar(255) NOT NULL default '', WEBSITEADDRESS varchar(255) default NULL, PERSONALINFO text, ORGANIZATION varchar(255) default NULL, ENABLED tinyint(1) NOT NULL default '0', OWNERID int(11) NOT NULL default '0', TS datetime default NULL, PRIMARY KEY (ID), UNIQUE KEY USERNAME (USERNAME) ) TYPE=InnoDB;
Does anybody know why I might be getting that exception? Has something changed in 4.1.3 beta ?
Thanks.
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]