If I run an sqlimport, and the INSERTS are faiing, the errors and warnings are not logged to the console as they happen, instead they are queued and displayed at the end. List is what the stack trace in the logs looks like :
10/18 07:33:07.753 CoreLibImportThread.process
com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Column 'registration_date' cannot be null
....
at com.aquafold.aquacore.close.rdbms.tool.CoreLibImportThread.process(CoreLibImportThread.java:261)
at com.aquafold.aquacore.close.rdbms.tool.CoreLibImportThread.run(CoreLibImportThread.java:104)
at com.aquafold.aquacore.close.rdbms.tool.CoreLibImport.execute(CoreLibImport.java:43)
at com.aquafold.datastudio.tools.shell.cmd.SQLImportCommand.execute(SQLImportCommand.java:263)
You can see CoreLibImportThread._warningErrorObjects for the queued list of warnings and exception. CoreLibImport.execute() will run the thread and then print the warnings. Also, for the exceptions, we should just print the e.getMessage() to console, and not the stacktrace to the log file.
I am also thinking of adding a debug option for the sqlimport command, so I think we may need to design a way to pass a console object for the import/export commands to write to. With this, we can also write the warning information.
To sqlimport/sqlexport I added the option :
-de, --debug : Enabled debug information sent to stderr.
I've also redirected any errors/warnings to stderr as the command is executing
SVN #29841
To sqlimport/sqlexport I added the option :
-de, --debug : Enabled debug information sent to stderr.
I've also redirected any errors/warnings to stderr as the command is executing
SVN #29841
Added debug message to CoreLibExportThread and CoreLibImportThread. One of these debug messages is to report progress once every N records are processed. N is currently hard-coded to 500 which can be customized by adding a new option if needed. SVN r29863.
Added debug message to CoreLibExportThread and CoreLibImportThread. One of these debug messages is to report progress once every N records are processed. N is currently hard-coded to 500 which can be customized by adding a new option if needed. SVN r29863.
Issue #7818 |
Closed |
Fixed |
Resolved |
Completion |
No due date |
Fixed Build trunk/29841, 29863 |
No time estimate |
I am also thinking of adding a debug option for the sqlimport command, so I think we may need to design a way to pass a console object for the import/export commands to write to. With this, we can also write the warning information.