Quickfix: remove doable load of RocksDB
package eu.fasten.analyzer.vulnerabilitycacheprocessorplugin;
+import eu.fasten.core.data.graphdb.RocksDao;
import eu.fasten.core.dbconnectors.PostgresConnector;
import eu.fasten.core.dbconnectors.RocksDBConnector;
import org.jooq.DSLContext;
import org.json.JSONObject;
import org.json.JSONTokener;
+import org.rocksdb.RocksDBException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import picocli.CommandLine;
@@ -79,13 +81,14 @@ public class Main implements Runnable {
@Override
public void run() {
var cacheProcessorPlugin = new VulnerabilityCacheProcessorPlugin.VulnerabilityCacheProcessorExtension();
- var graphDao = RocksDBConnector.createRocksDBAccessObject(graphDbPath);
- cacheProcessorPlugin.setRocksDao(graphDao);
DSLContext dbContext = null;
try {
+ cacheProcessorPlugin.setRocksDao(new RocksDao(graphDbPath, false));
dbContext = PostgresConnector.getDSLContext(kbUrl, kbUser, true);
} catch (SQLException e) {
logger.error("Could not connect to the database:", e);
+ } catch (RocksDBException e) {
+ logger.error("Could not connect to the graph db:", e);
}
cacheProcessorPlugin.loadGraphResolver(dbContext, depGraphPath);
final FileReader reader;
