关注JEECG发展历程 关注最新动态和版本, 记录JEECG成长点滴 更新日志 - 技术支持 - 招聘英才

JEECG最新版本下载 JEECG智能开发平台 - 显著提高开发效率 常见问题 - 入门视频 - 参与开源团队

商务QQ: 69893005、3102411850 商务热线(5*8小时): 010-64808099 官方邮箱: jeecgos@163.com

查看: 6283|回复: 0

minidao demo 执行错误

[复制链接]
发表于 2017-5-8 22:08:26 | 显示全部楼层 |阅读模式
运行环境: jdk 1.8 +tomcat 7 + mysql 5.7.17

点开 常用示例—— minidao列表 ,正常显示列表;点击 查询 ,也可正常显示,后台eclipse运行日志报错:

[2017-05-08 21:54:01] [ERROR] [org.jeecgframework.core.common.exception.GlobalExceptionResolver:86] 全局处理异常捕获:
org.hibernate.hql.internal.ast.QuerySyntaxException: JeecgListDemoEntity is not mapped [from JeecgListDemoEntity where 1!=1   or name like '%111%' ]
        at org.hibernate.hql.internal.ast.util.SessionFactoryHelper.requireClassPersister(SessionFactoryHelper.java:180)


(1)
输入“名称” 查询,报错,但是前台可正常显示查询结果:

org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [select * from ( SELECT * FROM jeecg_demo WHERE 1=1 and name = ?) sel_tab00 limit -20,10]; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-20,10' at line 1
        at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:231)


[2017-05-08 22:05:38] [ERROR] [org.jeecgframework.core.common.exception.GlobalExceptionResolver:86] 全局处理异常捕获:
org.hibernate.hql.internal.ast.QuerySyntaxException: JeecgListDemoEntity is not mapped [from JeecgListDemoEntity where 1!=1   or name like '%1212%' ]
        at org.hibernate.hql.internal.ast.util.SessionFactoryHelper.requireClassPersister(SessionFactoryHelper.java:180)

(2)
点击年龄,查询和运行正常

(3)选择“部门”下拉列表,查询 报错:
org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [select * from ( SELECT * FROM jeecg_demo WHERE 1=1 and dep_id = ?) sel_tab00 limit -20,10]; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-20,10' at line 1
        at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:231)
        at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:73)








您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

快速回复 返回顶部 返回列表