camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Diesler (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CAMEL-10783) XSLT transform cannot use default DTM
Date Fri, 03 Feb 2017 10:37:51 GMT

    [ https://issues.apache.org/jira/browse/CAMEL-10783?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15851317#comment-15851317
] 

Thomas Diesler commented on CAMEL-10783:
----------------------------------------

The XMLReaderPool currently uses a OneTimeXMLReader, which prevents setter access after the
parse method has been called.

The JDK's DTMManagerDefault however attempts to reset handlers in a finally clause

{code}
        } finally {
          // Reset the ContentHandler, DTDHandler, ErrorHandler to the DefaultHandler
          // after creating the DTM.
          if (reader != null && !(m_incremental && incremental)) {
            reader.setContentHandler(m_defaultHandler);
            reader.setDTDHandler(m_defaultHandler);
            reader.setErrorHandler(m_defaultHandler);
            
            // Reset the LexicalHandler to null after creating the DTM.
            try {
              reader.setProperty("http://xml.org/sax/properties/lexical-handler", null);
            }
            catch (Exception e) {}
          }
          releaseXMLReader(reader);
        }
{code}

> XSLT transform cannot use default DTM
> -------------------------------------
>
>                 Key: CAMEL-10783
>                 URL: https://issues.apache.org/jira/browse/CAMEL-10783
>             Project: Camel
>          Issue Type: Bug
>    Affects Versions: 2.18.2
>            Reporter: Thomas Diesler
>             Fix For: 2.18.3, 2.19.0
>
>
> {code}
> Caused by: java.lang.IllegalStateException: OneTimeXMLReader.parse() can only be used
once!
> 	at org.apache.camel.converter.jaxp.XMLReaderPool$OneTimeXMLReader.checkValid(XMLReaderPool.java:132)
> 	at org.apache.camel.converter.jaxp.XMLReaderPool$OneTimeXMLReader.setContentHandler(XMLReaderPool.java:178)
> 	at org.apache.xml.dtm.ref.DTMManagerDefault.getDTM(DTMManagerDefault.java:461)
> 	at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:701)
> 	at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1275)
> 	at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1253)
> 	at org.apache.camel.builder.xml.XsltBuilder.process(XsltBuilder.java:141)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message