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;
|
this.bds = bds;
|
||||||
Store store = getStore();
|
Store store = getStore();
|
||||||
try {
|
try {
|
||||||
if (!StoreUtils.isFormatted(store)) {
|
|
||||||
// initialize the store
|
|
||||||
store.getTableFormatter().create();
|
|
||||||
store.getTableFormatter().truncate();
|
|
||||||
}
|
|
||||||
|
|
||||||
Model metadataModel = getMetadataModel();
|
Model metadataModel = getMetadataModel();
|
||||||
|
|
||||||
if (metadataModel.size()==0) {
|
if (metadataModel.size()==0) {
|
||||||
|
@ -113,6 +108,16 @@ public class VitroJenaSDBModelMaker implements ModelMaker {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
store = SDBFactory.connectStore(conn, storeDesc);
|
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 (!isWorking(store)) {
|
||||||
if (conn != null) {
|
if (conn != null) {
|
||||||
conn.close();
|
conn.close();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue