Unexpected token:null near line 1, column 290

Source: Internet
Author: User

org.hibernate.hql.internal.ast.QuerySyntaxException:unexpected token:null 1, column 290 [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:us Ername and T.status =:status and NOT EXISTS (select B.user from Cn.com.sample.entity.UserRole b where B.role.id =:roleid an D b.user.id = t.id)]

This is my report of the error, the cause of the error is a syntax format errors, the entire HQL statement is here, combined with online search solutions, summarized as follows:

1, the extra space;

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

3, =: should be together, there is no space, ' like: ' Intermediary need to have space, in fact, here is not so rigorous, just in case;

4, brackets, my problem is that the left parenthesis more than the right parenthesis one;

There may be other reasons, hope to help you!

Unexpected token:null near line 1, column 290

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.