Example usage for java.util.logging Level SEVERE

List of usage examples for java.util.logging Level SEVERE

Introduction

In this page you can find the example usage for java.util.logging Level SEVERE.

Prototype

Level SEVERE

To view the source code for java.util.logging Level SEVERE.

Click Source Link

Document

SEVERE is a message level indicating a serious failure.

Usage

From source file:controller.PersonalGoalTextControllerTest.java

@AfterClass
public static void tearDownClass() {

    File file = new File(System.getProperty("user.dir") + fSeparator + "MyDiaryBook" + fSeparator);
    try {//from w ww. ja va2 s .com
        FileUtils.deleteDirectory(file);
    } catch (IOException ex) {
        Logger.getLogger(NewEntryTextControllerTest.class.getName()).log(Level.SEVERE, null, ex);
    }
}

From source file:iox.refused.util.TextUtil.java

public static String loadfile(ServletContext context, String filename) {
    InputStream is = context.getResourceAsStream(filename);
    if (is == null) {
        logger.log(Level.SEVERE, "<loadfile> unable to load " + filename);
        return "";
    }//from www . ja va  2 s .  c o m
    String data;
    try {
        data = IOUtils.toString(is, CS);
    } catch (IOException e) {
        logger.log(Level.SEVERE, "<loadfile> unable to load " + filename, e);
        data = "";
    }
    IOUtils.closeQuietly(is);
    return data;
}

From source file:com.pse.fotoz.helpers.Configuration.ConfigurationManager.java

public static void initConfig() {
    try {/*from  ww w  .  j  a  v  a  2s.  c o m*/
        config = new XMLConfiguration("application.cfg.xml");
        configPasswords = new XMLConfiguration("passwords.cfg.xml");
    } catch (ConfigurationException ex) {
        Logger.getLogger(ConfigurationManager.class.getName()).log(Level.SEVERE, null, ex);
    }
    FileChangedReloadingStrategy strategy = new FileChangedReloadingStrategy();
    strategy.setRefreshDelay(reloadDelayMS);
    config.setReloadingStrategy(strategy);
    config.setValidating(true); //valideer de xml
}

From source file:visualizer.datamining.dataanalysis.CreateLineGraph.java

public static void main(String[] args) {
    try {//from  w ww. j ava 2  s.  c  om
        CreateLineGraph instance = CreateLineGraph.getInstance(null);
        instance.display("precision.txt");
        instance.dispose();
    } catch (IOException ex) {
        Logger.getLogger(CreateLineGraph.class.getName()).log(Level.SEVERE, null, ex);
    }
}

From source file:dao.NewEntryTextDaoTest.java

@AfterClass
public static void tearDownClass() {
    File file = new File(System.getProperty("user.dir") + fSeparator + "MyDiaryBook");
    try {//from  w ww.j a va 2s . co m
        FileUtils.deleteDirectory(file);
    } catch (IOException ex) {
        Logger.getLogger(NewEntryTextDaoTest.class.getName()).log(Level.SEVERE, null, ex);
    }
}

From source file:bridgempp.EndpointTranslator.java

public static void saveHumanReadableEndpoint(Endpoint endpoint, String endpointName) {
    try {//from  w  w  w .j av  a  2  s  . c o  m
        ConfigurationManager.endpointConfiguration
                .setProperty("endpoints.id" + computeEndpointID(endpoint.getIdentifer()), endpointName);
        ConfigurationManager.endpointConfiguration.save();
    } catch (ConfigurationException ex) {
        Logger.getLogger(EndpointTranslator.class.getName()).log(Level.SEVERE, null, ex);
    }
}

From source file:jfreechart.ViewGirlsBoysAvgChart.java

public static void viweGirlsAvgChart(List<String> testId, ArrayList<Double> totAvg, ArrayList<Double> girlsAvg,
        ArrayList<Double> boysAvg) throws SQLException, ClassNotFoundException {
    try {// w w  w  .j  av  a  2 s.  c o  m
        UIManager.setLookAndFeel(new McWinLookAndFeel());
    } catch (UnsupportedLookAndFeelException ex) {
        Logger.getLogger(ViewEachStudentChart.class.getName()).log(Level.SEVERE, null, ex);
    }
    DefaultCategoryDataset objDataset = new DefaultCategoryDataset();

    for (Double marks : totAvg) {
        //Double mark = tstId;
        //String tetId = tstId.split(",")[3];
        objDataset.addValue(marks, "Line1", marks);

    }
    for (Double marks : girlsAvg) {
        //Double mark = tstId;
        //String tetId = tstId.split(",")[3];
        objDataset.addValue(marks, "Line2", marks);

    }
    //        for (Double testMark : bAvgList) {
    //            Double mark = testMark;
    //            //String tstId = testId.split(",")[3];
    //            objDataset.setValue(mark, "", mark);
    //            
    //            
    //        }
    JFreeChart objChart = ChartFactory.createLineChart("Marks Chart", //Chart title
            "Test", //Domain axis label
            "Marks", //Range axis label
            objDataset, //Chart Data 
            PlotOrientation.VERTICAL, // orientation
            true, // include legend?
            true, // include tooltips?
            false // include URLs?
    );

    ChartFrame frame = new ChartFrame("Dakma Higher Education Center", objChart);
    frame.setLocationRelativeTo(frame);
    frame.pack();
    frame.setVisible(true);
}

From source file:com.smallfe.clerk.util.DigestUtil.java

public static String getSHA256(String message) {
    try {/*from   www. ja  v a 2  s  .  c o m*/
        MessageDigest md = MessageDigest.getInstance("SHA-256");
        md.update(message.getBytes());

        byte byteData[] = md.digest();

        //convert the byte to hex format method 1
        StringBuffer sb = new StringBuffer();
        for (int i = 0; i < byteData.length; i++) {
            sb.append(Integer.toString((byteData[i] & 0xff) + 0x100, 16).substring(1));
        }
        return sb.toString();
    } catch (NoSuchAlgorithmException ex) {
        Logger.getLogger(DigestUtil.class.getName()).log(Level.SEVERE, null, ex);
        return null;
    }
}

From source file:it.cnr.ilc.tokenizer.utils.Utilities.java

public static String readFileContent(String filepath) throws IOException {
    String message = "";
    File initialFile;//w  ww .j  a  v  a 2 s .  c  o  m
    InputStream targetStream = null;
    String theString = "";

    try {
        initialFile = new File(filepath);
        targetStream = FileUtils.openInputStream(initialFile);
        theString = IOUtils.toString(targetStream, "UTF-8");
    } catch (IOException e) {

        message = "IOaaException in reading the stream for " + filepath + " " + e.getMessage();
        Logger.getLogger(Utilities.class.getName()).log(Level.SEVERE, message);
        //System.exit(-1);
    } finally {
        if (targetStream != null) {
            try {
                targetStream.close();
            } catch (IOException e) {
                message = "IOException in closing the stream for " + filepath + " " + e.getMessage();
                Logger.getLogger(Utilities.class.getName()).log(Level.SEVERE, message);
                //System.exit(-1);
            }

        }

    }
    //System.err.println(theString);
    return theString;
}

From source file:com.lushell.tc.dbpaas.api.utils.MyHttpUtil.java

public static String getDataFromUrl(String url, int timeout) {
    try {/*from  www . j  a  v  a  2s. c o  m*/
        HttpClient httpClient = HttpClients.createDefault();
        HttpGet httpget = new HttpGet(url);
        HttpResponse response = httpClient.execute(httpget);
        HttpEntity entity = response.getEntity();
        //StatusLine statusLine = response.getStatusLine();
        String body = EntityUtils.toString(entity);
        return body;
    } catch (IOException ex) {
        Logger.getLogger(MyHttpUtil.class.getName()).log(Level.SEVERE, null, ex);
        return null;
    }
}