keeps / dbptk-developer

DBPTK Developer - library and command-line tool for execution of database preservation actions
http://www.database-preservation.com
GNU Lesser General Public License v3.0
43 stars 19 forks source link

SIARDDK: Null pointer exception when trying to export table with no primary key defined. #124

Closed ThomasKristensen closed 8 years ago

ThomasKristensen commented 8 years ago

@andreaskring ,I guess we need to guard against null pointer exception occurring when doing siard-dk export of tables with no primary key defined - and provide a suitable error message, if the user is trying to export a db with a table, with no primary key defined.

Place of null pointer exception:

https://github.com/keeps/db-preservation-toolkit/blob/0a2637d1ea427e3b424a751f03c84ffb42650696/dbptk-core/src/main/java/com/databasepreservation/modules/siard/out/metadata/TableIndexFileStrategy.java#L159

andreaskring commented 8 years ago

Yes, we should give an error meesage in this case and throw a ModuleException instead. I will fix this

2016-02-09 17:37 GMT+01:00 Thomas Kristensen notifications@github.com:

@andreaskring https://github.com/andreaskring ,I guess we need to guard against null pointer exception occurring when doing siard-dk export of tables with no primary key defined - and provide a suitable error message, if the user is trying to export a db with a table, with no primary key defined.

Place of null pointer exception:

https://github.com/keeps/db-preservation-toolkit/blob/0a2637d1ea427e3b424a751f03c84ffb42650696/dbptk-core/src/main/java/com/databasepreservation/modules/siard/out/metadata/TableIndexFileStrategy.java#L159

— Reply to this email directly or view it on GitHub https://github.com/keeps/db-preservation-toolkit/issues/124.

Andreas Kring Magenta Aps Incuba, Åbogade 15 DK-8200 Aarhus N

tel +45 3336 9699 dir +45 8177 1698

http://www.magenta.dk andreas@magenta.dk

andreaskring commented 8 years ago

This is fixed now in magenta-aps/dev

chalkos commented 8 years ago

@andreaskring if the code is ready you can create a pull request, I personally prefer reviewing smaller PRs.