public FormResponse[] getAllFormResponse(int formId) throws FormNotFoundException, ErrorRecreatingFormException {
        try {
            ArrayList<FormResponse> resp;
            if(!formExists(formId)) {
                throw new FormNotFoundException("Form " + formId + " cannot be found");
            }
            String q = "select formresponse from FormResponse where formId = ?;";
            PreparedStatement st = conn.prepareStatement(q);
            st.setInt(1, formId);
            ResultSet rs = st.executeQuery();
            conn.commit();
            resp = new ArrayList<FormResponse>();
            while(rs.next()) {
                byte[] buf = rs.getBytes(1);
                ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(buf));
                resp.add((FormResponse) in.readObject());
            }
            return resp.toArray(new FormResponse[resp.size()]);
        } catch (IOException e) {
            e.printStackTrace();
            try {
                conn.rollback();
            }
            catch(Exception e4) {
                e4.printStackTrace();
                throw new FormNotFoundException("Error rolling back");
            }
            throw new ErrorRecreatingFormException("Error recreating form response");
        } catch(ClassNotFoundException e2) {
            e2.printStackTrace();
            try {
                conn.rollback();
            }
            catch(Exception e4) {
                e4.printStackTrace();
                throw new FormNotFoundException("Error rolling back");
            }
            throw new ErrorRecreatingFormException("Error recreating form response");
        }
        catch(SQLException e3) {
            e3.printStackTrace();
            try {
                conn.rollback();
            }
            catch(Exception e4) {
                e4.printStackTrace();
                throw new FormNotFoundException("Error rolling back");
            }
            throw new FormNotFoundException("Error getting responses");
        }
    }