ehcache with Spring. google code xsd file not found
Asked Answered
P

3

7

I am using ehcache with Spring. Noticed the below error recently. Also the XSD file is missing now at http://ehcache-spring-annotations.googlecode.com/svn/schema/ehcache-spring/ehcache-spring-1.1.xsd.

Please let me know if there is a workaround to load the XSD locally.

org.xml.sax.SAXParseException; lineNumber: 164; columnNumber: 59; schema_reference.4: Failed to read schema document 'http://ehcache-spring-annotations.googlecode.com/svn/schema/ehcache-spring/ehcache-spring-1.1.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
  at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
  at org.apache.xerces.util.ErrorHandlerWrapper.warning(Unknown Source)
  at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
  at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
  at org.apache.xerces.impl.xs.traversers.XSDHandler.reportSchemaWarning(Unknown Source)
  at org.apache.xerces.impl.xs.traversers.XSDHandler.getSchemaDocument1(Unknown Source)
  at org.apache.xerces.impl.xs.traversers.XSDHandler.getSchemaDocument(Unknown Source)
  at org.apache.xerces.impl.xs.traversers.XSDHandler.parseSchema(Unknown Source)
  at org.apache.xerces.impl.xs.XMLSchemaLoader.loadSchema(Unknown Source)
  at org.apache.xerces.impl.xs.XMLSchemaValidator.findSchemaGrammar(Unknown Source)
  at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source)
  at org.apache.xerces.impl.xs.XMLSchemaValidator.emptyElement(Unknown Source)
  at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
  at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
  at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
  at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
  at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
  at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
  at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
  at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
  at org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:75)
  at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:388)
  at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)
  at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)
  at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:174)
  at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:209)
  at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:180)
  at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:125)
  at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:94)
  at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130)
  at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:537)
  at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:451)
  at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:410)
  at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
  at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
  at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5016)
  at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5524)
  at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
  at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1575)
  at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1565)
  at java.util.concurrent.FutureTask.run(Unknown Source)
  at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
  at java.lang.Thread.run(Unknown Source)

Caused by: java.io.FileNotFoundException: http://ehcache-spring-annotations.googlecode.com/svn/schema/ehcache-spring/ehcache-spring-1.1.xsd at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source) at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source) at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown Source) at org.apache.xerces.impl.xs.opti.SchemaParsingConfig.parse(Unknown Source) at org.apache.xerces.impl.xs.opti.SchemaParsingConfig.parse(Unknown Source) at org.apache.xerces.impl.xs.opti.SchemaDOMParser.parse(Unknown Source) ... 38 more

Periodontics answered 12/5, 2016 at 15:15 Comment(0)
M
7

The problem is that the URL you are requesting was served directly from a Google Code source repository. Google announced it was shutting down Google Code in March of last year, and earlier this week Google started actually shutting down its source hosting services.

You'll need to find a new host for that file. e.g. DropBox, GoogleDrive, etc. If you need a copy of the old version, see the archived version at:

https://code.google.com/archive/p/ehcache-spring-annotations/source/default/source

Mythicize answered 12/5, 2016 at 16:0 Comment(2)
i have download and host file ehcache-spring-1.1.xsd. to DropBox and now same issue again.Can you guide me how i can access this file.Salta
You only need change the absolute path url to code.google.com with new url where you upload the xsd file. Its work!Gyno
P
0

Chris Smith's answer lead me in the right direction, for my issue with a version slightly higher ehcache-spring-1.2.xsd. Your version, my version and 1.0 are all older and no longer hosted as Chris stated.

If you don't trust other hosts, then I'd recommend downloading the archive, unzipping it and adding the necessary files to your project and referencing the files via relative path.

For more details, you can read my related question/answers in How to Configure Eclipse to Work with `ehcache` and How to Reference Local XSD File By Relative Path

Penurious answered 14/7, 2017 at 16:21 Comment(0)
S
0

Recently came across the same problem with a POJLP (Plain Old Java/JEE Legacy Project... ^^) and resorted to use the "straight-to-point" plain GitHub URL: https://raw.githubusercontent.com/agentgt/ehcache-spring-annotations/master/core/src/main/resources/com/googlecode/ehcache/annotations/ehcache-spring-1.1.xsd ...and it works!™.

Sidonius answered 18/5, 2022 at 13:12 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.