You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "Owen Nichols (JIRA)" <ji...@apache.org> on 2019/04/24 22:23:13 UTC
[jira] [Closed] (GEODE-6540) Allow the cache XSD to be resolvable
through HTTPS
[ https://issues.apache.org/jira/browse/GEODE-6540?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Owen Nichols closed GEODE-6540.
-------------------------------
> Allow the cache XSD to be resolvable through HTTPS
> --------------------------------------------------
>
> Key: GEODE-6540
> URL: https://issues.apache.org/jira/browse/GEODE-6540
> Project: Geode
> Issue Type: Improvement
> Components: configuration
> Affects Versions: 1.8.0
> Reporter: John Blum
> Assignee: Jacob S. Barrett
> Priority: Critical
> Labels: CacheXML, HTTP, HTTPS, XSD
> Fix For: 1.9.0
>
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> Currently, when configuring Apache Geode with {{cache.xml}}, the {{cache}} declaration can be specified using...
> {code:xml}
> <?xml version="1.0" encoding="UTF-8"?>
> <cache xmlns="http://geode.apache.org/schema/cache"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://geode.apache.org/schema/cache https://geode.apache.org/schema/cache/cache-1.0.xsd"
> version="1.0">
> ...
> {code}
> Notice the use of the HTTPS protocol to resolve the XSD for the namespace (URI) {{"http://geode.apache.org/schema/cache"}}.
> However, when starting a Geode node (e.g. server) with this {{cache.xml}}, the following Exception is thrown...
> {code:java}
> ...
> Caused by: org.apache.geode.cache.CacheXmlException: Error while parsing XML, caused by org.xml.sax.SAXParseException; lineNumber: 5; columnNumber: 19; cvc-elt.1: Cannot find the declaration of element 'cache'.
> at org.apache.geode.internal.cache.xmlcache.CacheXml.error(CacheXml.java:896)
> at org.apache.geode.internal.cache.xmlcache.CacheXmlParser$DefaultHandlerDelegate.error(CacheXmlParser.java:3454)
> at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:137)
> at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:396)
> at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:327)
> at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:284)
> at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:1901)
> at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:741)
> at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:374)
> at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDriver.scanRootElementHook(XMLNSDocumentScannerImpl.java:613)
> at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:3132)
> at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:852)
> at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:602)
> at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:112)
> at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:505)
> at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:842)
> at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:771)
> 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:643)
> at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:327)
> at javax.xml.parsers.SAXParser.parse(SAXParser.java:195)
> at org.apache.geode.internal.cache.xmlcache.CacheXmlParser.parse(CacheXmlParser.java:223)
> at org.apache.geode.internal.cache.GemFireCacheImpl.loadCacheXml(GemFireCacheImpl.java:4273)
> at org.springframework.data.gemfire.CacheFactoryBean.lambda$loadCacheXml$10(CacheFactoryBean.java:518)
> at java.util.Optional.ifPresent(Optional.java:159)
> at org.springframework.data.gemfire.CacheFactoryBean.loadCacheXml(CacheFactoryBean.java:515)
> at org.springframework.data.gemfire.CacheFactoryBean.postProcess(CacheFactoryBean.java:491)
> at org.springframework.data.gemfire.CacheFactoryBean.init(CacheFactoryBean.java:269)
> ... 55 more
> Caused by: org.xml.sax.SAXParseException; lineNumber: 5; columnNumber: 19; cvc-elt.1: Cannot find the declaration of element 'cache'.
> at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:203)
> at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:134)
> ... 81 more
> {code}
> While the XSD should resolve locally, this seems to be thwarted by the fact that Geode is incorrectly passing the URL as the {{systemId}} rather than the URI/URN, as can be seen here...
> https://github.com/apache/geode/blob/rel/v1.8.0/geode-core/src/main/java/org/apache/geode/internal/cache/xmlcache/GeodeEntityResolver.java#L48
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)