Rookie error (IV) Spring and DWR integration, profile error

Source: Internet
Author: User

Background introduction:

The project is a city credit Office system, before it seems to be a company in Shijiazhuang responsible. I belong to the halfway take over. After getting the source code, the project was set up according to the instructions they gave Jane (Shao) (de) Ming (ke) (lian). As a result, the project file is red. So we start to solve these mistakes, but many of them are similar. After some tinkering, most of the bugs were resolved, with a spring and DWR integration configuration error with the error message as follows:

Multiple annotations found at this line:

-schema_reference.4:failed to read schema document ' Http://www.directwebremoting.org/schema/spring-dwr-2.0.xsd ', Because 1) could not find the document;

2) The document could not is read; 3) The root element of the document is not <xsd:schema>.

-Cvc-complex-type.2.4.c:the matching wildcard is strict, but no declaration can being found for element ' Dwr:remote '.

Resolution process:

The first step must be to find a solution on the Internet if you encounter a mistake you've never seen before. So Baidu, Google two-pronged approach, but found a lot of similar wrong solution, one by one tried seemingly in my here does not work.

But I remembered that we had just finished the project, using the DWR, so I found the dwr in charge of this piece of the small partner, to ask him for help. After he had seen the specific questions, he said that we were not in the same way, but with the other, he recommended me to the official website to look for. Then I went to Dwr's official website, found the part that was integrated with spring, and then found the ' dwr:remote ' tag, and finally found no special place. Later, because the time is later, and spent a long time on this issue, I am a little annoyed, decided to ignore it, and then get it tomorrow.

The next morning, after learning English I sat in front of the computer, looking at the wrong hint, I thought: the solution found on the internet did not help me solve the problem, it is probably I and their error performance similar, but the cause of this performance is not the same? So I think it is serious to read those lines of error tips. It was later found that the corresponding schema file could not be found. Although the IDE will first go to the jar bag to find, if not found will be based on your configuration to find online. But it may also be because of the problem, which leads to the two roads are out of line. So I thought, if so, why don't I manually add a local schema file to you?

Then addressed, thinking about it, I downloaded a schema file and added it to the IDE manually. Bingo! The error message disappears and the problem is solved. Overjoyed, Xi Dapu rush Ah!

Add the schema file manually by adding the following methods:

1, select: Windwos->preferences->myeclipse->files and Editors->xml->xmlcatalog

2, point "Add", in the window that appears, select "File System" in location, then choose the spring-beans-2.0.xsd that you download, file

3, back to the setting window, do not rush to close the window, you should change the key type in the window to schema location,

4,key changed to Http://www.directwebremoting.org/schema/spring-dwr-2.0.xsd

Summarize:

Back to the column page: http://www.bianceng.cnhttp://www.bianceng.cn/Programming/Java/

The power of the network is very strong, the help of people around is also very important, but most of the time to rely on their own. When a problem bothers you for a long time, may wish to stop your footsteps, turn around and change direction, change the angle of thinking. A lot of time to think differently, there will be a completely different result.

When we encounter problems do not put it in the following way to solve:

While (encountering a problem) {   
    if (previously encountered) {if (before) {) {   
        solve the problem based on your own memory or previous notes;   
    } else if (never encountered) {   
        find solution online;   
    } else if (unable to find an or online method can not be resolved) {   
        Help the person around you;   
    } else if (people around you can not solve) {   
        stop and jump out of the way before;   
        Careful analysis of error messages;   
        Think from another angle;   
    

Usually, the above steps will solve your problem. If the above steps still don't solve your problem, congratulations, you are likely to encounter a very difficult problem. This is the time when you are making progress. You may need to respond to your project manager and assemble more people to solve it.

Author: cnblogs Liu Shui

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.