private E createUsingConstructor ( ) throws CheckedAnalysisException { Constructor < E > constructor ; try { constructor = databaseClass . getConstructor ( new Class [ 0 ] ) ; } catch ( NoSuchMethodException e ) { return null ; } try { return constructor . newInstance ( new Object [ 0 ] ) ; } catch ( InstantiationException e ) { throw new CheckedAnalysisException ( "Could not create " + databaseClass . getName ( ) , e ) ; } catch ( IllegalAccessException e ) { throw new CheckedAnalysisException ( "Could not create " + databaseClass . getName ( ) , e ) ; } catch ( InvocationTargetException e ) { throw new CheckedAnalysisException ( "Could not create " + databaseClass . getName ( ) , e ) ; } }
Try to create the database using a no - arg constructor .