geode-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Barry Oglesby (JIRA)" <j...@apache.org>
Subject [jira] [Created] (GEODE-2972) An incorrectly named lucene element in xml throws a ClassCastException
Date Tue, 23 May 2017 00:23:04 GMT
Barry Oglesby created GEODE-2972:
------------------------------------

             Summary: An incorrectly named lucene element in xml throws a ClassCastException
                 Key: GEODE-2972
                 URL: https://issues.apache.org/jira/browse/GEODE-2972
             Project: Geode
          Issue Type: Bug
          Components: lucene
            Reporter: Barry Oglesby


If a region is defined like this:
{noformat}
<region name="data" refid="PARTITION_REDUNDANT">
	<lucene:indexxx name="index">
		<lucene:field name="Agency"/>
	</lucene:indexxx>
</region>
{noformat}
Then the {{lucene:indexxx}}  element is ignored, and a {{ClassCastException}} like below is
thrown when the {{lucene:field}} element is processed rather than a {{SAXParseException}}
(or maybe a more specific exception).
{noformat}

Exception in thread "main" org.apache.geode.cache.CacheXmlException: While reading Cache XML
file:/Users/boglesby/Dev/Tests/client-server/lucene/nyc-311/geode-lucene/config/gemfire-server.xml.
While parsing XML, caused by java.lang.ClassCastException: org.apache.geode.internal.cache.xmlcache.RegionCreation
cannot be cast to org.apache.geode.cache.lucene.internal.xml.LuceneIndexCreation
 	at org.apache.geode.internal.cache.xmlcache.CacheXmlParser.parse(CacheXmlParser.java:267)
 	at org.apache.geode.internal.cache.GemFireCacheImpl.loadCacheXml(GemFireCacheImpl.java:4282)
 	at org.apache.geode.internal.cache.GemFireCacheImpl.initializeDeclarativeCache(GemFireCacheImpl.java:1390)
 	at org.apache.geode.internal.cache.GemFireCacheImpl.initialize(GemFireCacheImpl.java:1195)
 	at org.apache.geode.internal.cache.GemFireCacheImpl.basicCreate(GemFireCacheImpl.java:758)
 	at org.apache.geode.internal.cache.GemFireCacheImpl.create(GemFireCacheImpl.java:745)
 	at org.apache.geode.cache.CacheFactory.create(CacheFactory.java:173)
 	at org.apache.geode.cache.CacheFactory.create(CacheFactory.java:212)
 	at TestBase.initializeServerCache(TestBase.java:22)
Caused by: java.lang.ClassCastException: org.apache.geode.internal.cache.xmlcache.RegionCreation
cannot be cast to org.apache.geode.cache.lucene.internal.xml.LuceneIndexCreation
 	at org.apache.geode.cache.lucene.internal.xml.LuceneXmlParser.startField(LuceneXmlParser.java:59)
 	at org.apache.geode.cache.lucene.internal.xml.LuceneXmlParser.startElement(LuceneXmlParser.java:50)
 	at org.apache.geode.internal.cache.xmlcache.CacheXmlParser.startElement(CacheXmlParser.java:2748)
 	at org.apache.geode.internal.cache.xmlcache.CacheXmlParser$DefaultHandlerDelegate.startElement(CacheXmlParser.java:3369)
 	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:509)
 	at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:182)
 	at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.emptyElement(XMLSchemaValidator.java:780)
 	at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:356)
 	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2786)
 	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)
 	at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:117)
 	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
 	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848)
 	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)
 	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
 	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
 	at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:649)
 	at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:333)
 	at javax.xml.parsers.SAXParser.parse(SAXParser.java:195)
 	at org.apache.geode.internal.cache.xmlcache.CacheXmlParser.parse(CacheXmlParser.java:224)
 	... 9 more
{noformat}




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

Mime
View raw message