lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephane Gamard (JIRA)" <j...@apache.org>
Subject [jira] [Created] (SOLR-3974) Disabling External entity resolution when using XSL in DIH
Date Mon, 22 Oct 2012 10:10:12 GMT
Stephane Gamard created SOLR-3974:
-------------------------------------

             Summary: Disabling External entity resolution when using XSL in DIH
                 Key: SOLR-3974
                 URL: https://issues.apache.org/jira/browse/SOLR-3974
             Project: Solr
          Issue Type: Improvement
          Components: contrib - DataImportHandler
    Affects Versions: 4.0, 4.1
            Reporter: Stephane Gamard


When using XSL transformation in DIH Solr tries to resolve DTD and fails when missing. This
is similar to SOLR-3895 (which is solely intended to the RequestHandler). 

Sample data-config.xml:
{code:xml}
<entity name="sample" 
			processor="FileListEntityProcessor" 
			baseDir="/Volumes/data/datasets/sample" 
			fileName="^.*\.xml$" 
			recursive="true" 
			rootEntity="false"
			dataSource="null">
			
            <entity name="article" 
					stream="false"
					xsl="xslt/toDocument.xslt" 
					processor="XPathEntityProcessor" 
					url="${sample.fileAbsolutePath}" 
					useSolrAddSchema="true">
			</entity>
        </entity>
{code}

Import will fail with the following error: 
{code}
Caused by: org.apache.solr.handler.dataimport.DataImportHandlerException: Exception in applying
XSL Transformeation Processing Document # 1
	at org.apache.solr.handler.dataimport.DataImportHandlerException.wrapAndThrow(DataImportHandlerException.java:71)
	at org.apache.solr.handler.dataimport.XPathEntityProcessor.initQuery(XPathEntityProcessor.java:304)
	at org.apache.solr.handler.dataimport.XPathEntityProcessor.fetchNextRow(XPathEntityProcessor.java:224)
	at org.apache.solr.handler.dataimport.XPathEntityProcessor.nextRow(XPathEntityProcessor.java:204)
	at org.apache.solr.handler.dataimport.EntityProcessorWrapper.nextRow(EntityProcessorWrapper.java:243)
	at org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:472)
	at org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:498)
	at org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:411)
	... 5 more
Caused by: javax.xml.transform.TransformerException: javax.xml.transform.TransformerException:
com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: /opt/solr/archivearticle3.dtd
(No such file or directory)
	at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:735)
	at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:336)
	at org.apache.solr.handler.dataimport.XPathEntityProcessor.initQuery(XPathEntityProcessor.java:299)
	... 11 more
Caused by: javax.xml.transform.TransformerException: com.sun.org.apache.xml.internal.utils.WrappedRuntimeException:
/opt/solr/archivearticle3.dtd (No such file or directory)
	at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.getDOM(TransformerImpl.java:564)
	at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:725)
	... 13 more
Caused by: com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: /opt/solr/archivearticle3.dtd
(No such file or directory)
	at com.sun.org.apache.xalan.internal.xsltc.dom.XSLTCDTMManager.getDTM(XSLTCDTMManager.java:460)
	at com.sun.org.apache.xalan.internal.xsltc.dom.XSLTCDTMManager.getDTM(XSLTCDTMManager.java:248)
	at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.getDOM(TransformerImpl.java:542)
	... 14 more
{code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message