首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >在春季初始化过程中如何避免从internet下载模式文件

在春季初始化过程中如何避免从internet下载模式文件
EN

Stack Overflow用户
提问于 2010-02-19 00:59:59
回答 1查看 7.2K关注 0票数 3

我有一个web应用程序运行在一个生产服务器,不允许公共互联网访问。初始化失败,错误如下

代码语言:javascript
运行
复制
2010-02-18 15:21:33,150 **WARN**  [SimpleSaxErrorHandler.java:47] Ignored XML validation warning
org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema document 'https://jax-ws.dev.java.net/spring/servlet.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 com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195)
 ...

2010-02-18 15:21:33,154 **ERROR** [ContextLoader.java:215] Context initialization failed
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 9 in XML document from ServletContext resource [/WEB-INF/app.xml] is invalid; nested exception is org.xml.sax.SAXPar
seException: cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'wss:binding'.
    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:389)

第一个警告似乎表明应用程序未能下载架构文件,这导致了第二个错误。

我的问题是:

  1. 我觉得这是合理的,我应该能够运行一个应用程序w/o必须有互联网接入。如何让xml解析器使用本地模式文件而不是从internet下载的副本。我知道XML目录具有这样的功能。我用的是猫和弹簧。有配置XML目录的方法吗?是否还有其他机制可以达到同样的目的?
  2. 如果不能将解析器重定向为使用本地架构文件。我可以禁用xml模式验证吗?同样,我想在不接触代码的情况下配置行为。
EN

Stack Overflow用户

发布于 2010-02-19 01:55:35

将您需要的模式放到类路径中,然后使用解析器来使用它。

票数 3
EN
查看全部 1 条回答
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/2293415

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档