List of usage examples for java.lang ExceptionInInitializerError ExceptionInInitializerError
public ExceptionInInitializerError()
ExceptionInInitializerError
with null
as its detail message string and with no saved throwable object. From source file:MessageDigestUtil.java
/** * MessageDisgest???????/* www.j a va2s .c o m*/ * * @return */ public static MessageDigest createMessageDigest() { try { return MessageDigest.getInstance(ALGORHTYM); } catch (NoSuchAlgorithmException e) { throw new ExceptionInInitializerError(); } }
From source file:com.amazonaws.services.kinesis.scaling.auto.AutoscalingController.java
private AutoscalingController() throws Exception { throw new ExceptionInInitializerError(); }
From source file:org.sleuthkit.autopsy.imageanalyzer.datamodel.DrawableDB.java
/** * @param dbPath the path to the db file * * @throws SQLException if there is problem creating or configuring the db */// ww w. ja va2 s. c om private DrawableDB(String dbPath) throws SQLException, ExceptionInInitializerError { this.dbPath = dbPath; if (initializeDB()) { updateFileStmt = prepareStatement( "INSERT OR REPLACE INTO drawable_files (obj_id , path, name, created_time, modified_time, make, model, analyzed) " + "VALUES (?,?,?,?,?,?,?,?)"); insertFileStmt = prepareStatement( "INSERT OR IGNORE INTO drawable_files (obj_id , path, name, created_time, modified_time, make, model, analyzed) " + "VALUES (?,?,?,?,?,?,?,?)"); removeFileStmt = prepareStatement("delete from drawable_files where obj_id = ?"); pathGroupStmt = prepareStatement("select obj_id , analyzed from drawable_files where path = ? ", DrawableAttribute.PATH); nameGroupStmt = prepareStatement("select obj_id , analyzed from drawable_files where name = ? ", DrawableAttribute.NAME); created_timeGroupStmt = prepareStatement( "select obj_id , analyzed from drawable_files where created_time = ? ", DrawableAttribute.CREATED_TIME); modified_timeGroupStmt = prepareStatement( "select obj_id , analyzed from drawable_files where modified_time = ? ", DrawableAttribute.MODIFIED_TIME); makeGroupStmt = prepareStatement("select obj_id , analyzed from drawable_files where make = ? ", DrawableAttribute.MAKE); modelGroupStmt = prepareStatement("select obj_id , analyzed from drawable_files where model = ? ", DrawableAttribute.MODEL); analyzedGroupStmt = prepareStatement("Select obj_id , analyzed from drawable_files where analyzed = ?", DrawableAttribute.ANALYZED); hashSetGroupStmt = prepareStatement( "select drawable_files.obj_id as obj_id, analyzed from drawable_files , hash_sets , hash_set_hits where drawable_files.obj_id = hash_set_hits.obj_id and hash_sets.hash_set_id = hash_set_hits.hash_set_id and hash_sets.hash_set_name = ?", DrawableAttribute.HASHSET); updateGroupStmt = prepareStatement("update groups set seen = 1 where value = ? and attribute = ?"); insertGroupStmt = prepareStatement("insert or replace into groups (value, attribute) values (?,?)"); groupSeenQueryStmt = prepareStatement("select seen from groups where value = ? and attribute = ?"); selectHashSetNamesStmt = prepareStatement("SELECT DISTINCT hash_set_name FROM hash_sets"); insertHashSetStmt = prepareStatement("insert or ignore into hash_sets (hash_set_name) values (?)"); selectHashSetStmt = prepareStatement("select hash_set_id from hash_sets where hash_set_name = ?"); insertHashHitStmt = prepareStatement( "insert or ignore into hash_set_hits (hash_set_id, obj_id) values (?,?)"); } else { throw new ExceptionInInitializerError(); } }
From source file:org.sleuthkit.autopsy.imagegallery.datamodel.DrawableDB.java
/** * @param dbPath the path to the db file * * @throws SQLException if there is problem creating or configuring the db *//*from ww w . ja v a 2 s .c om*/ private DrawableDB(Path dbPath, SleuthkitCase tskCase) throws SQLException, ExceptionInInitializerError, IOException { this.dbPath = dbPath; this.tskCase = tskCase; Files.createDirectories(dbPath.getParent()); if (initializeDBSchema()) { updateFileStmt = prepareStatement( "INSERT OR REPLACE INTO drawable_files (obj_id , path, name, created_time, modified_time, make, model, analyzed) " + "VALUES (?,?,?,?,?,?,?,?)"); insertFileStmt = prepareStatement( "INSERT OR IGNORE INTO drawable_files (obj_id , path, name, created_time, modified_time, make, model, analyzed) " + "VALUES (?,?,?,?,?,?,?,?)"); removeFileStmt = prepareStatement("delete from drawable_files where obj_id = ?"); pathGroupStmt = prepareStatement("select obj_id , analyzed from drawable_files where path = ? ", DrawableAttribute.PATH); nameGroupStmt = prepareStatement("select obj_id , analyzed from drawable_files where name = ? ", DrawableAttribute.NAME); created_timeGroupStmt = prepareStatement( "select obj_id , analyzed from drawable_files where created_time = ? ", DrawableAttribute.CREATED_TIME); modified_timeGroupStmt = prepareStatement( "select obj_id , analyzed from drawable_files where modified_time = ? ", DrawableAttribute.MODIFIED_TIME); makeGroupStmt = prepareStatement("select obj_id , analyzed from drawable_files where make = ? ", DrawableAttribute.MAKE); modelGroupStmt = prepareStatement("select obj_id , analyzed from drawable_files where model = ? ", DrawableAttribute.MODEL); analyzedGroupStmt = prepareStatement("Select obj_id , analyzed from drawable_files where analyzed = ?", DrawableAttribute.ANALYZED); hashSetGroupStmt = prepareStatement( "select drawable_files.obj_id as obj_id, analyzed from drawable_files , hash_sets , hash_set_hits where drawable_files.obj_id = hash_set_hits.obj_id and hash_sets.hash_set_id = hash_set_hits.hash_set_id and hash_sets.hash_set_name = ?", DrawableAttribute.HASHSET); updateGroupStmt = prepareStatement( "insert or replace into groups (seen, value, attribute) values( ?, ? , ?)"); insertGroupStmt = prepareStatement("insert or ignore into groups (value, attribute) values (?,?)"); groupSeenQueryStmt = prepareStatement("select seen from groups where value = ? and attribute = ?"); selectHashSetNamesStmt = prepareStatement("SELECT DISTINCT hash_set_name FROM hash_sets"); insertHashSetStmt = prepareStatement("insert or ignore into hash_sets (hash_set_name) values (?)"); selectHashSetStmt = prepareStatement("select hash_set_id from hash_sets where hash_set_name = ?"); insertHashHitStmt = prepareStatement( "insert or ignore into hash_set_hits (hash_set_id, obj_id) values (?,?)"); for (Category cat : Category.values()) { insertGroup(cat.getDisplayName(), DrawableAttribute.CATEGORY); } initializeImageList(); } else { throw new ExceptionInInitializerError(); } }