unexpected token: null near line 1, column 290

org.hibernate.hql.internal.ast.QuerySyntaxException: unexpected token: null near line 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 :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)]

这是我报的错误,报错的原因属于语法格式的错误,整个HQL语句也在这里,结合网上查找的解决办法,总结如下:

1、多余的空格;

2、字符串引号应该为单引号;

3、=:应该是在一起的,中间没有空格,‘like :’中介需要有空格,其实这里没这么严谨,只是以防万一;

4、括号,我出的问题就是左括号比右括号多了一个;

可能还有其他原因,希望对大家有帮助!

时间: 2024-08-28 02:33:06

unexpected token: null near line 1, column 290的相关文章

运行shell脚本提示“syntax error near unexpected token for((i=0;i<$length;i++))”

sh脚本如下: #!/usr/bin/env bash county="3 4 5 6 7 8 9 10 11 12 16 29 39 44 53 62 72 84 97 115 128 151 168 187 199 218 230 10079 10239 32478" array=($county) length=${#array[@]} for((i=0;i<$length;i++)) do $HIVE_HOME/bin/hive -e "select * fro

shell出现syntax error near unexpected token `&lt;&#39; 解决方法

最新在看一个shell资料时,按照教材,却出现如下错误,不能运行 如下,简单的脚本: #!/bin/bash cat |while read line do echo $line done < <(data.txt|awk '{print $0}') 运行时,却出现如下错误 [[email protected] shellcookbook]# sh while_test.sh while_test.sh: line 5: syntax error near unexpected token `

SSH框架-unexpected token: * near line 1, column 8 [select * from tb_chaper where course_id = 2];报错解决方法

SSH项目,访问jsp页面出现报错,控制台显示报错信息: org.springframework.orm.hibernate3.HibernateQueryException: unexpected token: * near line 1, column 8 [select * from tb_chaper where course_id = 2]; nested exception is org.hibernate.hql.ast.QuerySyntaxException: unexpect

jQuery解析JSON出现SyntaxError: JSON.parse: unexpected character at line 1 column 2 of the JSON data

SyntaxError: JSON.parse: unexpected character at line 1 column 2 of the JSON data 我在使用$.parseJSON解析后台返回的JSON的数据时,出现了这样的错误,我还以为返回的JSON格式出现了错误,因为JSON要求格式非常严格.最后发现JSON格式没有太明显的格式错误,我使用fastJSON来生成的JSON格式数据,原来是因为数据已经是一个JavaScript对象了,所以在进行解析就会出错了 我直接将这段数据al

syntax error, error in :&#39;e id=1?&#39;, expect QUES, actual QUES pos 66, line 1, column 66, token QUES错误

在查询数据库的时候报了下面的异常: syntax error, error in :'e id=1?', expect QUES, actual QUES pos 66, line 1, column 66, token QUES 是sql语法的错误: 最后删除=号后面的1,得以解决: syntax error, error in :'e id=1?', expect QUES, actual QUES pos 66, line 1, column 66, token QUES错误 原文地址:h

js - SyntaxError: JSON.parse: unexpected character at line 1 column 2 of the JSON data jquery-1.9.1.min.js:3:4315

FF中时不时报这个错, 就近段做项目来看,  一般是我通过 jquery获取form中的参数(或直接获取参数,并通过ajax进行异步请求的时候,如果有错,就抱该错误! 而对应的, 如果在 Google chrome中, 则会报: Uncaught SyntaxError: Unexpected token < 我觉得Google chrome的这个错, 有点不太准确. 虽然题目中的错误, 很泛, 但是就近段做项目来说, 大致就是这样. 其实可以分很多种类型的 "错误请求参数":包

java.lang.IllegalStateException: Expected a string but was BEGIN_ARRAY at line 1 column 296

先贴代码 public class ListDataRequest extends JsonRequest<ArrayList<Note>> { public ListDataRequest(int method, String url,Map<String,String> contentBody, Listener<ArrayList<Note>> listener, ErrorListener errorlistener) {  super(

关于报错“syntax error near unexpected token `”和回车换行

本来是很简单一个事情,转过来是因为打字机这事比较有趣-- http://blog.csdn.net/xyp84/archive/2009/08/11/4435899.aspx 摘要一下: 回车 换行 0D 0A <CR> <LF> Carriage Return Line Feed "/r" "/n" win32 0D 0D 0A unix 0D 0A ============淡定的分割线=============== 今天写了个shell脚

GitExtensions GitCredentialWinStore syntax error near unexpected token `(&#39;

之前不知道配置了什么,在Git Bash页面进行操作时报如下的错误: $ git fetch origin \"D:/Program Files (x86)/GitExtensions/GitCredentialWinStore/git-credential-wins tore.exe\" get: -c: line 0: syntax error near unexpected token `(' \"D:/Program Files (x86)/GitExtensions