NIHVIVO-2096 bugfix for initializing SDB ingest tool model maker in RDB mode
This commit is contained in:
parent
dbb222f655
commit
17fcba922c
1 changed files with 11 additions and 6 deletions
|
@ -64,12 +64,7 @@ public class VitroJenaSDBModelMaker implements ModelMaker {
|
|||
this.bds = bds;
|
||||
Store store = getStore();
|
||||
try {
|
||||
if (!StoreUtils.isFormatted(store)) {
|
||||
// initialize the store
|
||||
store.getTableFormatter().create();
|
||||
store.getTableFormatter().truncate();
|
||||
}
|
||||
|
||||
|
||||
Model metadataModel = getMetadataModel();
|
||||
|
||||
if (metadataModel.size()==0) {
|
||||
|
@ -113,6 +108,16 @@ public class VitroJenaSDBModelMaker implements ModelMaker {
|
|||
}
|
||||
}
|
||||
store = SDBFactory.connectStore(conn, storeDesc);
|
||||
try {
|
||||
if (!StoreUtils.isFormatted(store)) {
|
||||
// initialize the store
|
||||
store.getTableFormatter().create();
|
||||
store.getTableFormatter().truncate();
|
||||
}
|
||||
} catch (SQLException sqle) {
|
||||
throw new RuntimeException(
|
||||
"Unable to set up SDB store for model maker", sqle);
|
||||
}
|
||||
if (!isWorking(store)) {
|
||||
if (conn != null) {
|
||||
conn.close();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue