JAVA Spring的xsd问题
来源:互联网 发布:流量话费充值分销源码 编辑:程序博客网 时间:2024/05/16 19:10
近日搞 SPRING2 的 APPLICATION,不连接INTERNET的时候,出现一个问题:
WARN [main] XmlBeanDefinitionReader.warning(47) | Ignored XML validation warning
org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema document 'http://www.springframework.org/schema/b
eans/spring-beans-2.0.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.getSchema(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.startElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(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.DTDConfiguration.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.jav
a:396)
调试了好些时候,发现是要从网上DOWN xsd ,于是修改这个问题。先下载用到的 xsd 等的文件,再指定本地目录的文件上,如:
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/beans _xsd/spring-beans-2.0.xsd
http://www.springframework.org/schema/aop _xsd/spring-aop-2.0.xsd
http://www.springframework.org/schema/tx _xsd/spring-tx-2.0.xsd"
default-lazy-init="true">
……
struts.xml中,配置成 type="redirect-action"就会把form中的值丢掉了,包括button的值
还有一个状况,如果使用了 MSSQLSERVER2005的 JDBC ,打包后,不可以在 .jar 里面执行,出现:
Exception in thread "main" java.lang.SecurityException: invalid SHA1 signature file digest for com/microsoft/sqlserver/jdb
c/CharacterStreamSetterArgs.class
at sun.security.util.SignatureFileVerifier.verifySection(Unknown Source)
at sun.security.util.SignatureFileVerifier.processImpl(Unknown Source)
at sun.security.util.SignatureFileVerifier.process(Unknown Source)
at java.util.jar.JarVerifier.processEntry(Unknown Source)
at java.util.jar.JarVerifier.update(Unknown Source)
at java.util.jar.JarFile.initializeVerifier(Unknown Source)
at java.util.jar.JarFile.getInputStream(Unknown Source)
at sun.misc.URLClassPath$JarLoader$1.getInputStream(Unknown Source)
at sun.misc.Resource.cachedInputStream(Unknown Source)
at sun.misc.Resource.getByteBuffer(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
解包出来,再执行就一切正常。
WARN [main] XmlBeanDefinitionReader.warning(47) | Ignored XML validation warning
org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema document 'http://www.springframework.org/schema/b
eans/spring-beans-2.0.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.getSchema(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.startElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(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.DTDConfiguration.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.jav
a:396)
调试了好些时候,发现是要从网上DOWN xsd ,于是修改这个问题。先下载用到的 xsd 等的文件,再指定本地目录的文件上,如:
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/beans _xsd/spring-beans-2.0.xsd
http://www.springframework.org/schema/aop _xsd/spring-aop-2.0.xsd
http://www.springframework.org/schema/tx _xsd/spring-tx-2.0.xsd"
default-lazy-init="true">
……
struts.xml中,配置成 type="redirect-action"就会把form中的值丢掉了,包括button的值
还有一个状况,如果使用了 MSSQLSERVER2005的 JDBC ,打包后,不可以在 .jar 里面执行,出现:
Exception in thread "main" java.lang.SecurityException: invalid SHA1 signature file digest for com/microsoft/sqlserver/jdb
c/CharacterStreamSetterArgs.class
at sun.security.util.SignatureFileVerifier.verifySection(Unknown Source)
at sun.security.util.SignatureFileVerifier.processImpl(Unknown Source)
at sun.security.util.SignatureFileVerifier.process(Unknown Source)
at java.util.jar.JarVerifier.processEntry(Unknown Source)
at java.util.jar.JarVerifier.update(Unknown Source)
at java.util.jar.JarFile.initializeVerifier(Unknown Source)
at java.util.jar.JarFile.getInputStream(Unknown Source)
at sun.misc.URLClassPath$JarLoader$1.getInputStream(Unknown Source)
at sun.misc.Resource.cachedInputStream(Unknown Source)
at sun.misc.Resource.getByteBuffer(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
解包出来,再执行就一切正常。
- JAVA Spring的xsd问题
- spring 4.0 xsd文件的问题
- spring xsd 文件找不到问题
- spring加载xsd的过程
- 一个JAVA的XSD解析问题的解决
- spring配置文件中xsd引用问题
- 关于spring加载xsd文件有关问题
- spring配置文件中xsd引用问题
- Spring配置文件中xsd校验问题
- 解决Spring找不到http://www.springframework.org/schema/beans/spring-beans-2.5.xsd的问题
- 关于CXF整合Spring时出现jaxws.xsd无法找到的问题
- 关于SPRING的XSD位置读取
- 指定Spring的xml xsd验证
- spring配置文件xsd报错的解决方法
- XSD属性以数字开头的问题
- XML XSD 元素无序的问题
- 关于spring mvc加载本地xsd文件问题
- Xsd文件验证xml的java实现
- Expression Tree Picture
- J2EE系统中影响性能的一些因素
- 转载:网络趣文 2008年最幸福的人是谁?
- 学习.net
- 中文乱码解决方案
- JAVA Spring的xsd问题
- 杀软10强
- Java日期时间处理
- VC 6.0 用IPicture接口显示JPEG图片代码
- 用orca修改msi文件以取消安装路径选择
- 学习笔记のsendRedirect &forward
- linux 中命令yum的用法
- 各种类型转换Version2
- 虚拟文件系统[6]