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:me.cavar.pg2tei.Gutenberg2TEI.java

/**
 *
 * @param outputFolder/*from   ww  w  .j  a v a  2 s  . c o m*/
 * @param catalogOutFN
 */
public static void processRDF(String outputFolder, String catalogOutFN, String ebookURLStr) {
    System.out.println("Processing catalog.rdf");
    File rdfFile = new File(outputFolder, catalogOutFN);
    RDFParser myRdfP = new RDFParser(ebookURLStr, outputFolder);
    try {
        System.out.println(rdfFile.getAbsolutePath());
        myRdfP.parseDocument(rdfFile.getAbsolutePath());
    } catch (ParserConfigurationException | SAXNotRecognizedException | SAXNotSupportedException e) {
        Logger.getLogger(Fetcher.class.getName()).log(Level.SEVERE, null, e);
    }
    System.out.printf("Number of entries: %d\n", myRdfP.getEntryCounter());
}

From source file:caillou.company.clonemanager.gui.spring.SpringFxmlLoader.java

public static LoadingMojo load(String url, final String controllerClassName) {

    lastLoadedURL = url;//w  w  w .j a v  a  2 s. c  o m
    FXMLLoader loader = new FXMLLoader(MainApp.class.getResource(url), resourceBundle);
    loader.setControllerFactory(new Callback<Class<?>, Object>() {
        @Override
        public Object call(Class<?> clazz) {
            if (controllerClassName != null) {
                try {
                    return applicationContext.getBean(Class.forName(controllerClassName));
                } catch (ClassNotFoundException ex) {
                    Logger.getLogger(SpringFxmlLoader.class.getName()).log(Level.SEVERE, null, ex);
                }
            }
            return applicationContext.getBean(clazz);
        }
    });

    try {
        Parent parent = loader.load();
        LoadingMojo loadingMojo = new LoadingMojo();
        loadingMojo.setController(loader.getController());
        loadingMojo.setParent(parent);
        return loadingMojo;
    } catch (IOException ex) {
        Logger.getLogger(SpringFxmlLoader.class.getName()).log(Level.SEVERE, null, ex);
    } catch (Exception exMain) {
        System.out.println("Error");
    }
    return null;
}

From source file:cz.certicon.routing.web.model.beans.DatabasePropertiesBean.java

public Properties getConnectionProperties() {
    if (connectionProperties == null) {
        InputStream in = getClass().getClassLoader().getResourceAsStream("database_connection.properties");
        connectionProperties = new Properties();
        try {/*from  w ww  .  j  a  v  a 2  s  .  c om*/
            connectionProperties.load(in);
            in.close();
        } catch (IOException ex) {
            connectionProperties = null;
            Logger.getLogger(GraphBean.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
    return connectionProperties;
}

From source file:com.cooksys.httpserver.ParsedHttpRequest.java

public static ParsedHttpRequest parseHttpRequest(HttpRequest request, String messageBody) {
    ParsedHttpRequest parsedRequest = new ParsedHttpRequest();

    parsedRequest.requestLine = request.getRequestLine().toString();
    parsedRequest.method = request.getRequestLine().getMethod();

    try {//from   www  . jav a  2s. co m
        //Parse the URI
        URI uri = new URI(request.getRequestLine().getUri());
        parsedRequest.uriPath = uri.getPath();
        parsedRequest.uriParams = parseUrlParameters(uri);
        parsedRequest.headers = (parseHeaders(request));
        parsedRequest.messageBody = messageBody;
    } catch (URISyntaxException | ParseException ex) {
        Logger.getLogger(ParsedHttpRequest.class.getName()).log(Level.SEVERE, null, ex);
    }
    return parsedRequest;
}

From source file:com.app.inventario.dao.FamiliaDAOImpl.java

@Override
public void guardar(Familia familia) {
    try {/*from  w ww .j  a v a  2 s.c  o m*/
        this.iniciaOperacion();
        session.save(familia);
        tx.commit();
    } catch (HibernateException he) {
        Logger.getLogger(FamiliaDAOImpl.class.getName()).log(Level.SEVERE, null, he);
        throw he;
    } finally {
        // Cerrar la session
    }
}

From source file:com.imag.nespros.network.devices.SacomutDevice.java

public SacomutDevice(String name) {
    super(name);//from w  w w .  j  ava2 s.  c  o m
    this.setCpuSpeed(350);
    this.setTotalMemory(1024);
    this.setDeviceType(DeviceType.SACOMUT);
    this.setDeviceName(name);
    try {
        byte[] imageInByte;
        imageInByte = IOUtils.toByteArray(getClass().getClassLoader().getResourceAsStream("image/sacomut.jpg"));
        icon = new MyLayeredIcon(new ImageIcon(imageInByte).getImage());
    } catch (IOException ex) {
        Logger.getLogger(AMIDevice.class.getName()).log(Level.SEVERE, null, ex);
    }
}

From source file:alexaactions.SmartThingsTemperatureDevices.java

SmartThingsTemperatureDevices(SmartThingsAgent sa) {
    agent = sa;//from ww  w .java  2  s. c o  m
    parser = new JSONParser();
    path = "temps";
    String jsonScale = agent.get(path + "/units");
    Object obj = null;
    JSONObject jobj = null;

    try {
        obj = (Object) parser.parse(jsonScale);
        jobj = (JSONObject) obj;
    } catch (ParseException ex) {
        Logger.getLogger(SmartThingsTemperatureDevices.class.getName()).log(Level.SEVERE, null, ex);
        System.out.println("defaulting to F scale");
        tempScale = "F";
    }
    tempScale = (String) jobj.get("units");
}

From source file:com.infullmobile.jenkins.plugin.restrictedregister.util.Utils.java

public static void logError(String message) {
    LOGGER.log(Level.SEVERE, message);
}

From source file:com.iontorrent.main.TSSettings.java

private static void err(Exception ex) {
    Logger.getLogger(TSSettings.class.getName()).log(Level.SEVERE, ex.getMessage(), ex);
}

From source file:com.qait.automation.samjbehavedemo.utils.FileHandler.java

public static void cleanStoryLocation() {
    File storiesDir = getFile(Constants.STORY_LOC);
    if (storiesDir.exists()) {
        try {// w  w  w  . ja va  2 s. c o  m
            FileUtils.deleteDirectory(storiesDir);

        } catch (IOException ex) {
            Logger.getLogger(JiraStoryDownloader.class.getName()).log(Level.SEVERE,
                    "UNABLE TO DELETE OLD STORIES", ex);
            ex.printStackTrace();
        }
    }
    storiesDir.mkdir();
}