Unexpected token: null near line 1, column 290, unexpectedtoken

Source: Internet
Author: User

Unexpected token: null near line 1, column 290, unexpectedtoken

Org. hibernate. hql. internal. ast. querySyntaxException: unexpected token: null near line 1, colum290 [select count (*) from cn.com. taiji. sample. entity. user t where 1 = 1 and (t. name like: userName or t. namePy like: userName or t. loginName like: userName and t. status =: status and not exists (select B. user from cn.com. sample. entity. userRole B where B. role. id =: roleId and B. user. id = t. id)]

This is an error I reported. The cause of the error is a syntax format error. The entire HQL statement is also here. Combined with the online search solution, it is summarized as follows:

1. Extra Spaces;

2. the string quotation marks should be single quotation marks;

3. =: there should be no spaces in the middle. 'Like: 'The intermediary must have spaces. In fact, this is not so rigorous, Just in case;

4. Brackets. The problem I encountered was that the left bracket had one more than the right bracket;

There may be other reasons, and I hope to help you!

Related Article

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.