The AJAX request path is correct, but the page prompts 404 error.

Source: Internet
Author: User

Last night Project upgrade, development environment, test environment all OK, a line, the page blank. Page console print 404. Check the following error in the background log report:,

Illegal mix of collations (utf8_unicode_ci,implicit) and (utf8_general_ci,implicit) for operation ' = '

Database: MySQL

Visible 404 is not necessarily the URL of the problem oh.

Solution to the problem:

Find the query statement related to the request, I did it with Spring JdbcTemplate, find the table that corresponds to SQL, execute the following statement in MySQL:

Show CREATE TABLE Tabel_name

There is something like this in the result set:

Charset=utf8 Collate=utf8_unicode_ci

Query data discovery is a collate problem, make the following changes: Execute SQL

ALTER TABLE table_name CONVERT to CHARACTER SET UTF8 COLLATE utf8_general_ci;

All the tables involved will be performed after the above operation, then verify that everything OK.

Solve the problem smoothly.

404 error is not necessarily the page URL problem oh.

The AJAX request path is correct, but the page prompts 404 error.

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.