Cannot call method "getMessage" of rawSQL.getException

I wanted to use plugins.rawSQL.getException().getMessage() to show the user what could have gone wrong in case of an error in a LOAD DATA INFILE MySQL statement, but I always get this message

TypeError: Cannot call method "getMessage" of 
```I tried the same statement in MySqlWorkbench and I get the expected error (I purportedly shortened the column length to throw an error, otherwise the statement would execute correctly)```
Error Code: 1406. Data too long for column 'fd_name' at row 1

The method is this

sqlExp = LOAD DATA LOCAL INFILE '/Users/rioba/2013/File DB/list.csv' REPLACE INTO TABLE dbfa_geo.tb_test CHARACTER SET 'utf8' FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n' IGNORE 1 LINES (fd_name,@dummy,fd_stat) SET fd_created = CURRENT_TIMESTAMP(),fd_mod = CURRENT_TIMESTAMP();
var done = plugins.rawSQL.executeSQL('dbfa_geo','tb_test',sqlExp);
if(done)
{
     plugins.dialogs.showInfoDialog('','Import OK','Ok');
}
else
{
     var endMsg = plugins.rawSQL.getException().getMessage();
     plugins.dialogs.showInfoDialog('',endMsg,'Ok');
}

Any suggestion on what am I doing wrong?

Hi Rioba,

What does plugins.rawSQL.getException() return for you ?

Hi Roclasi,

plugins.rawSQL.getException() returns null.

I also tried to alter the SQL statement inserting an error in it (I thought that the exception to be intercepted should be generated by the statement rather than the db), but the result is the same

Hi Rioba,

Are you using the latest JDBC drive for MySQL? if not I suggest you download it and replace the one you have.
If you do however I suggest you file this as an issue in Servoy’s bugtracker.

Hope this helps.

Hi Roclasi,

thanks again for your help and, yes, the driver is the latest JDBC from MySql, version 5.1.25.

I will try filing a bug report.