Example usage for java.lang StackOverflowError fillInStackTrace

List of usage examples for java.lang StackOverflowError fillInStackTrace

Introduction

In this page you can find the example usage for java.lang StackOverflowError fillInStackTrace.

Prototype

public synchronized Throwable fillInStackTrace() 

Source Link

Document

Fills in the execution stack trace.

Usage

From source file:io.personium.core.bar.BarFileReadRunner.java

/**
 * 00_$metadata_xml??????.//  w  w  w  . j a  va  2  s . c o  m
 * @param entryName ??
 * @param inputStream 
 * @param davCmp Collection?
 * @return ????true
 */
protected boolean registUserSchema(String entryName, InputStream inputStream, DavCmp davCmp) {
    EdmDataServices metadata = null;
    // XML(StAX,SAX,DOM)?InputStream???????????
    // ?????????????????
    try {
        InputStreamReader isr = new InputStreamReader(new CloseShieldInputStream(inputStream));
        // 00_$metadata.xml????
        XMLFactoryProvider2 provider = StaxXMLFactoryProvider2.getInstance();
        XMLInputFactory2 factory = provider.newXMLInputFactory2();
        XMLEventReader2 reader = factory.createXMLEventReader(isr);
        PersoniumEdmxFormatParser parser = new PersoniumEdmxFormatParser();
        metadata = parser.parseMetadata(reader);
    } catch (Exception ex) {
        log.info("XMLParseException: " + ex.getMessage(), ex.fillInStackTrace());
        String message = PersoniumCoreMessageUtils.getMessage("PL-BI-2002");
        writeOutputStream(true, "PL-BI-1004", entryName, message);
        return false;
    } catch (StackOverflowError tw) {
        // ComplexType???StackOverFlowError??
        log.info("XMLParseException: " + tw.getMessage(), tw.fillInStackTrace());
        String message = PersoniumCoreMessageUtils.getMessage("PL-BI-2002");
        writeOutputStream(true, "PL-BI-1004", entryName, message);
        return false;
    }
    // Entity/Property?
    // Property/ComplexProperty????ComplexType???????
    // ??ComplexType????EntityType?
    // PersoniumODataProducer producer = davCmp.getODataProducer();
    try {
        createComplexTypes(metadata, davCmp);
        createEntityTypes(metadata, davCmp);
        createAssociations(metadata, davCmp);
    } catch (PersoniumCoreException e) {
        writeOutputStream(true, "PL-BI-1004", entryName, e.getMessage());
        log.info("PersoniumCoreException: " + e.getMessage());
        return false;
    } catch (Exception e) {
        log.info("Regist Entity Error: " + e.getMessage(), e.fillInStackTrace());
        String message = PersoniumCoreMessageUtils.getMessage("PL-BI-2003");
        writeOutputStream(true, "PL-BI-1004", entryName, message);
        return false;
    }
    return true;
}

From source file:com.fujitsu.dc.core.bar.BarFileReadRunner.java

/**
 * 00_$metadata_xml??????./*from  www.  ja v  a  2s. c om*/
 * @param entryName ??
 * @param inputStream 
 * @param davCmp Collection?
 * @return ????true
 */
protected boolean registUserSchema(String entryName, InputStream inputStream, DavCmpEsImpl davCmp) {
    EdmDataServices metadata = null;
    // XML(StAX,SAX,DOM)?InputStream???????????
    // ?????????????????
    try {
        InputStreamReader isr = new InputStreamReader(new CloseShieldInputStream(inputStream));
        // 00_$metadata.xml????
        XMLFactoryProvider2 provider = StaxXMLFactoryProvider2.getInstance();
        XMLInputFactory2 factory = provider.newXMLInputFactory2();
        XMLEventReader2 reader = factory.createXMLEventReader(isr);
        DcEdmxFormatParser parser = new DcEdmxFormatParser();
        metadata = parser.parseMetadata(reader);
    } catch (Exception ex) {
        log.info("XMLParseException: " + ex.getMessage(), ex.fillInStackTrace());
        String message = DcCoreMessageUtils.getMessage("PL-BI-2002");
        writeOutputStream(true, "PL-BI-1004", entryName, message);
        return false;
    } catch (StackOverflowError tw) {
        // ComplexType???StackOverFlowError??
        log.info("XMLParseException: " + tw.getMessage(), tw.fillInStackTrace());
        String message = DcCoreMessageUtils.getMessage("PL-BI-2002");
        writeOutputStream(true, "PL-BI-1004", entryName, message);
        return false;
    }
    // Entity/Property?
    // Property/ComplexProperty????ComplexType???????
    // ??ComplexType????EntityType?
    // DcODataProducer producer = davCmp.getODataProducer();
    try {
        createComplexTypes(metadata, davCmp);
        createEntityTypes(metadata, davCmp);
        createAssociations(metadata, davCmp);
    } catch (DcCoreException e) {
        writeOutputStream(true, "PL-BI-1004", entryName, e.getMessage());
        log.info("DcCoreException: " + e.getMessage());
        return false;
    } catch (Exception e) {
        log.info("Regist Entity Error: " + e.getMessage(), e.fillInStackTrace());
        String message = DcCoreMessageUtils.getMessage("PL-BI-2003");
        writeOutputStream(true, "PL-BI-1004", entryName, message);
        return false;
    }
    return true;
}