You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@tika.apache.org by Chaitali Patel <ch...@net4nuts.com> on 2009/08/17 06:46:41 UTC

Error while using AutoDetectParser

Hi,
 
I am trying to use AutoDetectParser for parsing files dynamically, but i
am getting following exception. I tried to google it but didnt get
proper solution to this.. please help..
 
 
Exception in AutoExtractor : java.lang.IllegalStateException: Unable to
create a
 XmlRootExtractor
java.lang.IllegalStateException: Unable to create a XmlRootExtractor
        at org.apache.tika.mime.MimeTypes.<init>(MimeTypes.java:135)
        at
org.apache.tika.mime.MimeTypesFactory.create(MimeTypesFactory.java:58)
        at
org.apache.tika.mime.MimeTypesFactory.create(MimeTypesFactory.java:75)
        at
org.apache.tika.mime.MimeTypesFactory.create(MimeTypesFactory.java:90)
        at org.apache.tika.config.TikaConfig.<init>(TikaConfig.java:96)
        at org.apache.tika.config.TikaConfig.<init>(TikaConfig.java:85)
        at org.apache.tika.config.TikaConfig.<init>(TikaConfig.java:76)
        at
org.apache.tika.config.TikaConfig.getDefaultConfig(TikaConfig.java:173)
        at
org.apache.tika.parser.AutoDetectParser.<init>(AutoDetectParser.java:47)
Caused by: org.xml.sax.SAXNotRecognizedException: Feature
'http://javax.xml.XMLC
onstants/feature/secure-processing' is not recognized.
        at
org.apache.xerces.parsers.AbstractSAXParser.setFeature(Unknown Source)
        at org.apache.xerces.jaxp.SAXParserImpl.setFeatures(Unknown
Source)
        at org.apache.xerces.jaxp.SAXParserImpl.<init>(Unknown Source)
        at
org.apache.xerces.jaxp.SAXParserFactoryImpl.newSAXParserImpl(UnknownSour
ce)
        at
org.apache.xerces.jaxp.SAXParserFactoryImpl.setFeature(Unknown Source)
        at
org.apache.tika.detect.XmlRootExtractor.<init>(XmlRootExtractor.java:47)
        at org.apache.tika.mime.MimeTypes.<init>(MimeTypes.java:133)
 
 

Re: Error while using AutoDetectParser

Posted by Jukka Zitting <ju...@gmail.com>.
Hi,

On Mon, Aug 17, 2009 at 6:46 AM, Chaitali Patel<ch...@net4nuts.com> wrote:
> I am trying to use AutoDetectParser for parsing files dynamically, but i am
> getting following exception. I tried to google it but didnt get proper
> solution to this.. please help..
> [...]
> Caused by: org.xml.sax.SAXNotRecognizedException: Feature
> 'http://javax.xml.XMLC
> onstants/feature/secure-processing' is not recognized.

Tika sets the "secure-processing" feature to avoid problems with
malicious input. The JAXP documentation requires that all parser
implementations support this feature, but apparently the XML library
you're using does not.

Can you please file a bug report about this so we can make Tika behave
more gracefully in such situations. Meanwhile, as a workaround you may
want to look at upgrading or replacing the XML parser library you have
in your classpath.

BR,

Jukka Zitting