Java spring XSD

Source: Internet
Author: User
A problem occurs when spring2 application is not connected to the Internet recently:

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) cocould not find the document; 2) the document cocould 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 (defadocumentdocumentloader. Java: 75)
At org. springframework. Beans. Factory. xml. xmlbeandefinitionreader. doloadbeandefinitions (xmlbeandefinitionreader. Jav
A: 396)

After debugging, I found that I had to go down the XSD from the Internet, so I modified the problem. First download the XSD and other files used, and then specify the files in the local directory, such:

<Beans xmlns = "http://www.springframework.org/schema/beans" xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance"
Xmlns: AOP = "The http://www.springframework.org/schema/aop" xmlns: Tx = "The 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">
......

In struts. XML, if it is set to type = "Redirect-action", the value in form will be lost, including the value of the button.

Another problem is that if JDBC of mssqlserver2005 is used, it cannot be executed in. jar after packaging. The following error occurs:
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)

Unpack the package and execute it again.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.