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:com.stam.batchmove.SelectionFrame.java

/**
 * @param args the command line arguments
 *///from  w w  w. j  ava2s  . c o m
public static void main(String args[]) {
    /* Set the Nimbus look and feel */
    //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
    /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
     * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
     */
    try {
        for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
            if ("Nimbus".equals(info.getName())) {
                javax.swing.UIManager.setLookAndFeel(info.getClassName());
                break;
            }
        }
    } catch (ClassNotFoundException ex) {
        java.util.logging.Logger.getLogger(SelectionFrame.class.getName()).log(java.util.logging.Level.SEVERE,
                null, ex);
    } catch (InstantiationException ex) {
        java.util.logging.Logger.getLogger(SelectionFrame.class.getName()).log(java.util.logging.Level.SEVERE,
                null, ex);
    } catch (IllegalAccessException ex) {
        java.util.logging.Logger.getLogger(SelectionFrame.class.getName()).log(java.util.logging.Level.SEVERE,
                null, ex);
    } catch (javax.swing.UnsupportedLookAndFeelException ex) {
        java.util.logging.Logger.getLogger(SelectionFrame.class.getName()).log(java.util.logging.Level.SEVERE,
                null, ex);
    }
    //</editor-fold>

    /* Create and display the form */
    java.awt.EventQueue.invokeLater(new Runnable() {
        public void run() {
            new SelectionFrame().setVisible(true);
        }
    });
}

From source file:mum.bigdata.car.recommender.repository.impl.CarRepositoryImpl.java

@Override
public Car getCar(long cid) {
    String sql = String.format("select * from car where cid='%d'", cid);
    try {//from w ww.  ja  va2s. co m
        return this.get(sql).get(0);
    } catch (SQLException ex) {
        Logger.getLogger(MakeRepositoryImpl.class.getName()).log(Level.SEVERE, null, ex);
    }
    return null;
}

From source file:service.FilesServiceImpl.java

@Override
public void add(MultipartFile file, UsersEntity usersEntity) {
    FilesEntity fileEntity;//w  w  w. j  a  v a2 s . c om
    try {
        fileEntity = new FilesEntity(file.getName(), file.getContentType(), file.getBytes(), usersEntity);
        this.filesDao.save(fileEntity);
    } catch (IOException ex) {
        Logger.getLogger(FilesServiceImpl.class.getName()).log(Level.SEVERE, null, ex);
    }
}

From source file:com.app.inventario.logica.FamiliaLogicaImpl.java

@Transactional
public void guardar(Familia familia) throws Exception {
    try {//from   w  ww  .j av a2s .c  om
        familiaDAO.guardar(familia);
    } catch (HibernateException he) {
        Logger.getLogger(FamiliaLogicaImpl.class.getName()).log(Level.SEVERE, null, he);
        throw he;
    }
}

From source file:com.grameenfoundation.ictc.utils.XMLParser.java

public static Document parseXmlText(String requestType) {
    //get the factory
    DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
    try {/*  w  ww  .ja  va 2 s. c om*/

        //Using factory get an instance of document builder
        DocumentBuilder db = dbf.newDocumentBuilder();

        //InputSource is = new InputSource();
        //is.setCharacterStream(new StringReader(data));

        //File f = new File("/home/nii-amon/Documents/cardlessXML/XMLFile.xml");
        File f = new File(requestType);
        //File f = new File("/home/nii-amon/Documents/cardlessXML/txnType.xml");
        Document doc = db.parse(f);
        // normalize text representation
        doc.getDocumentElement().normalize();
        System.out.println("Root element of the doc is " + doc.getDocumentElement().getNodeName());

        return doc;

    } catch (ParserConfigurationException pce) {
        //Log.info("ParserConfigurationException. Reason: "+pce.getMessage());
        pce.printStackTrace();
        return null;
    } catch (IOException ioe) {
        //Log.info("IOException. Reason: "+ioe.getMessage());
        ioe.printStackTrace();
        return null;
    } catch (org.xml.sax.SAXException ex) {
        Logger.getLogger(XMLParser.class.getName()).log(Level.SEVERE, null, ex);

    }
    return null;

}

From source file:com.rr.generic.ui.security.ContextProfileInitializer.java

public void initialize(ConfigurableWebApplicationContext ctx) {
    ConfigurableEnvironment environment = ctx.getEnvironment();

    String hostname = null;/*from  ww  w .j a v  a  2s.co m*/
    String profiles = "local";

    try {
        hostname = InetAddress.getLocalHost().getHostAddress();
    } catch (UnknownHostException ex) {
        Logger.getLogger(ContextProfileInitializer.class.getName()).log(Level.SEVERE, null, ex);
    }

    if ("172.24.16.43".equals(hostname)) {
        profiles = "staging";
    } else if ("172.24.32.41".equals(hostname)) {
        profiles = "prod";
    }

    environment.setActiveProfiles(profiles);
}

From source file:com.ut.healthelink.security.ContextProfileInitializer.java

public void initialize(ConfigurableWebApplicationContext ctx) {
    ConfigurableEnvironment environment = ctx.getEnvironment();

    String hostname = null;// w  w w .  j av a 2s.com
    String profiles = "local";

    try {
        hostname = InetAddress.getLocalHost().getHostAddress();
    } catch (UnknownHostException ex) {
        Logger.getLogger(ContextProfileInitializer.class.getName()).log(Level.SEVERE, null, ex);
    }

    if ("10.202.52.54".equals(hostname)) {
        profiles = "healthelink-test";
    } else if ("10.202.52.152".equals(hostname)) {
        profiles = "healthelink-prod";
    }

    environment.setActiveProfiles(profiles);
}

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

public UtilityDevice(String name) {
    super(name);//from   w  ww.j  av  a2s. c  o m
    this.setCpuSpeed(500);
    this.setTotalMemory(10);
    this.setDeviceType(DeviceType.UTILITY);
    this.setDeviceName(name);
    try {
        byte[] imageInByte;
        imageInByte = IOUtils.toByteArray(getClass().getClassLoader().getResourceAsStream("image/utility.jpg"));
        icon = new MyLayeredIcon(new ImageIcon(imageInByte).getImage());
    } catch (IOException ex) {
        Logger.getLogger(AMIDevice.class.getName()).log(Level.SEVERE, null, ex);
    }
}

From source file:com.nunofacha.chestmaster.commands.ChestHashCommand.java

public static String getPluginHash() {
    try {/*from w  w  w.ja v a2s  .  c  o  m*/
        String path = Main.class.getProtectionDomain().getCodeSource().getLocation().getPath();
        String decodedPath = URLDecoder.decode(path, "UTF-8");
        MessageDigest md = MessageDigest.getInstance("MD5");
        String digest = getDigest(new FileInputStream(decodedPath), md, 2048);
        return digest;
    } catch (NoSuchAlgorithmException ex) {
        Logger.getLogger(ChestHashCommand.class.getName()).log(Level.SEVERE, null, ex);
    } catch (UnsupportedEncodingException ex) {
        Logger.getLogger(ChestHashCommand.class.getName()).log(Level.SEVERE, null, ex);
    } catch (FileNotFoundException ex) {
        Logger.getLogger(ChestHashCommand.class.getName()).log(Level.SEVERE, null, ex);
    }
    return "Failed to get MD5!";

}

From source file:controller.NewEntryDeleteControllerTest.java

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