Example usage for javax.management InstanceAlreadyExistsException printStackTrace

List of usage examples for javax.management InstanceAlreadyExistsException printStackTrace

Introduction

In this page you can find the example usage for javax.management InstanceAlreadyExistsException printStackTrace.

Prototype

public void printStackTrace() 

Source Link

Document

Prints this throwable and its backtrace to the standard error stream.

Usage

From source file:com.cyberway.issue.crawler.admin.CrawlJob.java

public void setupForCrawlStart() throws InitializationException {
    try {//w w  w  .ja va  2  s.  c  o  m
        this.controller = setupCrawlController();
        // Register as listener to get job finished notice.
        this.controller.addCrawlStatusListener(this);
        this.controller.initialize(getSettingsHandler());
        // Set the crawl job this MBeanCrawlController needs to worry about.
        ((MBeanCrawlController) this.controller).setCrawlJob(this);
        // Create our mbean description and register our crawljob.
        this.openMBeanInfo = buildMBeanInfo();
        try {
            Heritrix.registerMBean(this, getJmxJobName(), CRAWLJOB_JMXMBEAN_TYPE);
        } catch (InstanceAlreadyExistsException e) {
            throw new InitializationException(e);
        } catch (MBeanRegistrationException e) {
            throw new InitializationException(e);
        } catch (NotCompliantMBeanException e) {
            throw new InitializationException(e);
        }
    } catch (InitializationException e) {
        // Can't load current job since it is misconfigured.
        setStatus(CrawlJob.STATUS_MISCONFIGURED);
        setErrorMessage("A fatal InitializationException occured when " + "loading job:\n" + e.getMessage());
        // Log to stdout so its seen in logs as well as in UI.
        e.printStackTrace();
        this.controller = null;
        throw e;
    }
    setStatus(CrawlJob.STATUS_RUNNING);
    setRunning(true);
}

From source file:org.entando.edo.report.Report.java

@Override
protected Report clone() throws CloneNotSupportedException {
    // If user tries to clone the object then we are sending same class object
    try {/*from  w w w . j av a2 s.c  om*/
        return Report.getInstance();
    } catch (InstanceAlreadyExistsException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }
    return null;
}