Java 8 TransformerConfigurationException - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 TransformerConfigurationException class.

This code example shows how to use the following methods: getCause, getLocationAsString
						templates.put(key, t);
					} 
				} catch (IOException e1) {
					throw NSForwardException._runtimeExceptionForThrowable(e1);
				} catch (TransformerConfigurationException tce) {
					log.error("could not create template " + tce.getLocationAsString(), tce);
					log.error("  cause", tce.getCause());
					if (tce.getCause() != null && tce.getCause() instanceof org.xml.sax.SAXParseException) {
						org.xml.sax.SAXParseException e = (org.xml.sax.SAXParseException) tce.getCause();
						log.error("SAXParseException: line " + e.getLineNumber() + ", column " + e.getColumnNumber());
					} 
					log.error("this is the incorrect xsl:>>>" + s + "<<<");
					return null; 
				} 
			} 
 
			try { 
				return t.newTransformer();
			} catch (TransformerConfigurationException tce) {
				log.error("could not create template " + tce.getLocationAsString(), tce);
Full Snippet Info
7
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: getCause, getLocationAsString
						templates.put(key, t);
					} 
				} catch (IOException e1) {
					throw NSForwardException._runtimeExceptionForThrowable(e1);
				} catch (TransformerConfigurationException tce) {
					log.error("could not create template " + tce.getLocationAsString(), tce);
					log.error("  cause", tce.getCause());
					if (tce.getCause() != null && tce.getCause() instanceof org.xml.sax.SAXParseException) {
						org.xml.sax.SAXParseException e = (org.xml.sax.SAXParseException) tce.getCause();
						log.error("SAXParseException: line " + e.getLineNumber() + ", column " + e.getColumnNumber());
					} 
					log.error("this is the incorrect xsl:>>>" + s + "<<<");
					return null; 
				} 
			} 
 
			try { 
				return t.newTransformer();
			} catch (TransformerConfigurationException tce) {
				log.error("could not create template " + tce.getLocationAsString(), tce);
Full Snippet Info
6
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods:
        } 
 
        @Test(expected=XsltTransformationException.class)
        public void shouldThrowExceptionIfXslTransformerCanNotBeGenerated() throws Exception {
            when(templates.newTransformer())
                    .thenThrow(new TransformerConfigurationException());
 
            //TODO: review...is it possible that too much is being done during construction? 
            new SampleXslTransform(templates).getXslTransformerPool().borrowObject();
        } 
    } 
 
    static class SampleXslTransform extends AbstractXslTransform { 
        public SampleXslTransform(Templates _transformationTemplates) {
            super(_transformationTemplates);
        } 
    } 
} 
Full Snippet Info
5
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: getMessage
            final Templates templates = fac.newTemplates(new StreamSource(xslt));
            cache.store(xslt, templates, expiry);
            return templates;
 
        } catch (TransformerConfigurationException e) {
            LOG.error(e.getMessage(), e);
            throw new TransformationException("Failed to compile the follwoing XSLT template" + xslt
                    + " Check it exists in the file server", e);
        } 
    } 
} 
Full Snippet Info
5
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: printStackTrace
								"org/docx4j/convert/out/fo/renderers/AbstractFORenderer_POSTPROCESSING.xslt")); 
			xslt_POSTPROCESSING = XmlUtils.getTransformerTemplate(xsltSource);
		} catch (IOException e) {
			e.printStackTrace();
		} catch (TransformerConfigurationException e) {
			e.printStackTrace();
		} 
		 
	}	 
	 
 
} 
Full Snippet Info
5
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE

Related Java 8 TransformerConfigurationException Questions & Answers: