This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
I keep getting the following error when trying to load data into a table from a file.
ERROR - com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data truncated for column 'contentId' at row 64 com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data truncated for column 'contentId' at row 64
contentId in the tab delimted text file is always null (in the table it is an auto incremented field and this exception is thrown regardless on every file I try to load (although I haven't tried to load a file with less than 64 rows yet). I can't see anything different about row 64 than any other row (and it doesn't regardless of the data set on row 64). And the table seems to load just fine, but then it kicks out an exception screwing up the next steps. I suppose I could catch it and do nothing, though I loathe to do this with out knowing why.
Going out on a limb, but what was is the data type and size of content id in the database? You could be auto-incrementing past its size if it is small too small.
The error seems like its a data field problem but post mentions that the field is null and irregardless of the data the error comes up. I'd suggest posting your table defintion as well as a few example rows and see if that sheds any light.
The field is a Bigint (mysql data type). And the input for the field is null b/c its an autoincrementing field. The fields in the input file are tab delimited and I've tried putting '' in and nothing for the id field. The strange thing is it seems to work fine. I guess whats the harm in truncating null data? but its still annoying.