lishufenggreat
渺万里层云
2015-03-13 07:39

java+Spring+mybatis 查询sql报错:无效的序列号!

  • 序列号
  • java
  • mybatis
  • 数据库

java+Spring+mybatis+lucens+达梦数据库。应该能判断和数据库和lucen没关系。,着急在线等!
mybatis:

SELECT COUNT(*) FROM "user_task"


"title" like '%"#{title}"%'


And "status"=#{status}

And "group_id" LIKE '%"#{item}"%'



如下报错
三月 13, 2015 3:17:47 下午 cn.com.people.data.pds.framework.filter.UrlFilter doFilter
信息: ====>URI : /bmcms/admin/column/dm
org.springframework.jdbc.UncategorizedSQLException:

Error querying database. Cause: java.sql.SQLException: 序列号无效

The error may exist in cn/com/people/data/pds/user/dao/UserTaskMapper.xml

The error may involve cn.com.people.data.pds.user.dao.UserTaskMapper.countByGroup-Inline

The error occurred while setting parameters

SQL: SELECT COUNT(*) FROM "user_task" WHERE "title" like '%"?"%' And "status"=? And ( "group_id" LIKE '%"?"%' OR "group_id" LIKE '%"?"%' OR "group_id" LIKE '%"?"%')

Cause: java.sql.SQLException: 序列号无效

; uncategorized SQLException for SQL []; SQL state [HY093]; error code [6010]; 序列号无效; nested exception is java.sql.SQLException: 序列号无效
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:83)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:73)
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:371)
at com.sun.proxy.$Proxy16.selectOne(Unknown Source)
at org.mybatis.spring.SqlSessionTemplate.selectOne(SqlSessionTemplate.java:163)
at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:63)
at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:43)
at com.sun.proxy.$Proxy44.countByGroup(Unknown Source)
at cn.com.people.data.pds.library.controller.ColumnController.countByUserId(ColumnController.java:72)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:215)
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132)
。。。
。。。
。。。
Caused by: java.sql.SQLException: 序列号无效
at dm.jdbc.dbaccess.DBError.throwSQLException(DBError.java:52)
at dm.jdbc.driver.DmdbPreparedStatement_bs.checkIndexInner(DmdbPreparedStatement_bs.java:145)
at dm.jdbc.driver.DmdbPreparedStatement_bs.paramBindPrepare(DmdbPreparedStatement_bs.java:153)
at dm.jdbc.driver.DmdbPreparedStatement_bs.setInt(DmdbPreparedStatement_bs.java:999)
at dm.jdbc.driver.DmdbPreparedStatement.setInt(DmdbPreparedStatement.java:308)
at org.apache.ibatis.type.IntegerTypeHandler.setNonNullParameter(IntegerTypeHandler.java:28)
at org.apache.ibatis.type.IntegerTypeHandler.setNonNullParameter(IntegerTypeHandler.java:23)
at org.apache.ibatis.type.BaseTypeHandler.setParameter(BaseTypeHandler.java:46)
at org.apache.ibatis.type.UnknownTypeHandler.setNonNullParameter(UnknownTypeHandler.java:42)
at org.apache.ibatis.type.BaseTypeHandler.setParameter(BaseTypeHandler.java:46)
at org.apache.ibatis.scripting.defaults.DefaultParameterHandler.setParameters(DefaultParameterHandler.java:77)
at org.apache.ibatis.executor.statement.PreparedStatementHandler.parameterize(PreparedStatementHandler.java:77)
at org.apache.ibatis.executor.statement.RoutingStatementHandler.parameterize(RoutingStatementHandler.java:58)
at org.apache.ibatis.executor.SimpleExecutor.prepareStatement(SimpleExecutor.java:71)
at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:56)
at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:259)
at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:132)
at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:105)
at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:81)
at sun.reflect.GeneratedMethodAccessor71.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.ibatis.plugin.Invocation.proceed(Invocation.java:46)
at cn.com.people.data.pds.framework.orm.mybatis.pageable.MyBatisPageableInterceptor.intercept(MyBatisPageableInterceptor.java:104)
at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:57)
at com.sun.proxy.$Proxy33.query(Unknown Source)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:104)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:98)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectOne(DefaultSqlSession.java:62)
at sun.reflect.GeneratedMethodAccessor86.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:358)
... 90 more

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

4条回答