- 浏览: 25284 次
- 性别:
- 来自: 沈阳
文章分类
- 全部博客 (21)
- Android (1)
- Websphere (1)
- DB2 (1)
- j2SE (1)
- weblogic (2)
- J2EE (1)
- Oracle (2)
- oracle 导入导出 (1)
- oracle 查询技巧 (1)
- jquery ajax 跨域 (1)
- 读后感 (1)
- Hibernate 遇到一对多关系映射 (0)
- 遇到的问题 (0)
- Hibernate (3)
- 买电脑被骗大家引以为鉴 (0)
- oracle 三层分页原理 (1)
- 数据库 (1)
- IBM 的东西好难找 (1)
- Linux 性能调优 (1)
- Linux java 系统问题排查 (1)
- Linux (1)
- java (1)
- Spring quartz (1)
最新评论
DB2 Hibernate 查询 SQLCODE: -418, SQLSTATE: 42610, SQLERRMC: null
- 博客分类:
- DB2
环境是 tomcat+DB2 9.5
首先在网上查找了一下 SQLCODE: -418, SQLSTATE: 42610, SQLERRMC: null 状态码,没有很好的提示。
然后根据报错的类,反编译了代码来看,后来发现 at org.hibernate.engine.query.HQLQueryPlan.performList HQL 解析成为 SQL时出错了(其实仔细看上面能够看得出)
这个HQL 转义成SQL 时出问题了。
SELECT new map(f.pin,f.pushCode) FROM com.techown.proxy.entity.Flow as f WHERE (f.createTime between ? AND ? ) AND (f.status=? OR f.status=?) AND (lower(f.osType)=lower(?) AND (f.pushTime <=:date))
仔细检查发现lower(f.osType)=lower(?) 有问题,因此修改为lower(f.osType)=?
问题解决
10:21:44.083 [org.springframework.scheduling.quartz.SchedulerFactoryBean#0_Worker-1] DEBUG o.h.hql.ast.util.JoinProcessor - Using FROM fragment [flow flow0_] 10:21:44.083 [org.springframework.scheduling.quartz.SchedulerFactoryBean#0_Worker-1] DEBUG o.h.hql.antlr.HqlSqlBaseWalker - select >> end [level=1, statement=select] 10:21:44.083 [org.springframework.scheduling.quartz.SchedulerFactoryBean#0_Worker-1] DEBUG org.hibernate.hql.ast.AST - --- SQL AST --- \-[SELECT] QueryNode: 'SELECT' querySpaces (flow) +-[SELECT_CLAUSE] SelectClause: '{select clause}' | \-[CONSTRUCTOR] ConstructorNode: '(' | +-[IDENT] IdentNode: 'map' {originalText=map} | +-[DOT] DotNode: 'flow0_.pin' {propertyName=pin,dereferenceType=4,propertyPath=pin,path=f.pin,tableAlias=flow0_,className=com.techown.proxy.entity.Flow,classAlias=f} | | +-[ALIAS_REF] IdentNode: 'flow0_.flowId' {alias=f, className=com.techown.proxy.entity.Flow, tableAlias=flow0_} | | \-[IDENT] IdentNode: 'pin' {originalText=pin} | +-[SELECT_COLUMNS] SqlNode: ' as col_0_0_' | +-[DOT] DotNode: 'flow0_.pushCode' {propertyName=pushCode,dereferenceType=4,propertyPath=pushCode,path=f.pushCode,tableAlias=flow0_,className=com.techown.proxy.entity.Flow,classAlias=f} | | +-[ALIAS_REF] IdentNode: 'flow0_.flowId' {alias=f, className=com.techown.proxy.entity.Flow, tableAlias=flow0_} | | \-[IDENT] IdentNode: 'pushCode' {originalText=pushCode} | \-[SELECT_COLUMNS] SqlNode: ' as col_1_0_' +-[FROM] FromClause: 'FROM' FromClause{level=1, fromElementCounter=1, fromElements=1, fromElementByClassAlias=[f], fromElementByTableAlias=[flow0_], fromElementsByPath=[], collectionJoinFromElementsByPath=[], impliedElements=[]} | \-[FROM_FRAGMENT] FromElement: 'flow flow0_' FromElement{explicit,not a collection join,not a fetch join,fetch non-lazy properties,classAlias=f,role=null,tableName=flow,tableAlias=flow0_,origin=null,colums={,className=com.techown.proxy.entity.Flow}} \-[WHERE] SqlNode: 'WHERE' \-[AND] SqlNode: 'AND' +-[AND] SqlNode: 'AND' | +-[BETWEEN] BetweenOperatorNode: 'between' | | +-[DOT] DotNode: 'flow0_.createTime' {propertyName=createTime,dereferenceType=4,propertyPath=createTime,path=f.createTime,tableAlias=flow0_,className=com.techown.proxy.entity.Flow,classAlias=f} | | | +-[ALIAS_REF] IdentNode: 'flow0_.flowId' {alias=f, className=com.techown.proxy.entity.Flow, tableAlias=flow0_} | | | \-[IDENT] IdentNode: 'createTime' {originalText=createTime} | | +-[PARAM] ParameterNode: '?' {ordinal=0, expectedType=org.hibernate.type.TimestampType@e890d3} | | \-[PARAM] ParameterNode: '?' {ordinal=1, expectedType=org.hibernate.type.TimestampType@e890d3} | \-[OR] SqlNode: 'OR' | +-[EQ] BinaryLogicOperatorNode: '=' | | +-[DOT] DotNode: 'flow0_.status' {propertyName=status,dereferenceType=4,propertyPath=status,path=f.status,tableAlias=flow0_,className=com.techown.proxy.entity.Flow,classAlias=f} | | | +-[ALIAS_REF] IdentNode: 'flow0_.flowId' {alias=f, className=com.techown.proxy.entity.Flow, tableAlias=flow0_} | | | \-[IDENT] IdentNode: 'status' {originalText=status} | | \-[PARAM] ParameterNode: '?' {ordinal=2, expectedType=org.hibernate.type.IntegerType@1c22e0} | \-[EQ] BinaryLogicOperatorNode: '=' | +-[DOT] DotNode: 'flow0_.status' {propertyName=status,dereferenceType=4,propertyPath=status,path=f.status,tableAlias=flow0_,className=com.techown.proxy.entity.Flow,classAlias=f} | | +-[ALIAS_REF] IdentNode: 'flow0_.flowId' {alias=f, className=com.techown.proxy.entity.Flow, tableAlias=flow0_} | | \-[IDENT] IdentNode: 'status' {originalText=status} | \-[PARAM] ParameterNode: '?' {ordinal=3, expectedType=org.hibernate.type.IntegerType@1c22e0} \-[AND] SqlNode: 'AND' +-[EQ] BinaryLogicOperatorNode: '=' | +-[METHOD_CALL] MethodNode: '(' | | +-[METHOD_NAME] IdentNode: 'lower' {originalText=lower} | | \-[EXPR_LIST] SqlNode: 'exprList' | | \-[DOT] DotNode: 'flow0_.osType' {propertyName=osType,dereferenceType=4,propertyPath=osType,path=f.osType,tableAlias=flow0_,className=com.techown.proxy.entity.Flow,classAlias=f} | | +-[ALIAS_REF] IdentNode: 'flow0_.flowId' {alias=f, className=com.techown.proxy.entity.Flow, tableAlias=flow0_} | | \-[IDENT] IdentNode: 'osType' {originalText=osType} | \-[METHOD_CALL] MethodNode: '(' | +-[METHOD_NAME] IdentNode: 'lower' {originalText=lower} | \-[EXPR_LIST] SqlNode: 'exprList' | \-[PARAM] ParameterNode: '?' {ordinal=4, expectedType=null} \-[LE] BinaryLogicOperatorNode: '<=' +-[DOT] DotNode: 'flow0_.pushTime' {propertyName=pushTime,dereferenceType=4,propertyPath=pushTime,path=f.pushTime,tableAlias=flow0_,className=com.techown.proxy.entity.Flow,classAlias=f} | +-[ALIAS_REF] IdentNode: 'flow0_.flowId' {alias=f, className=com.techown.proxy.entity.Flow, tableAlias=flow0_} | \-[IDENT] IdentNode: 'pushTime' {originalText=pushTime} \-[NAMED_PARAM] ParameterNode: '?' {name=date, expectedType=org.hibernate.type.TimestampType@e890d3} 10:21:44.083 [org.springframework.scheduling.quartz.SchedulerFactoryBean#0_Worker-1] DEBUG org.hibernate.hql.ast.ErrorCounter - throwQueryException() : no errors 10:21:44.084 [org.springframework.scheduling.quartz.SchedulerFactoryBean#0_Worker-1] DEBUG o.h.hql.ast.QueryTranslatorImpl - HQL: SELECT new map(f.pin,f.pushCode) FROM com.techown.proxy.entity.Flow as f WHERE (f.createTime between ? AND ? ) AND (f.status=? OR f.status=?) AND (lower(f.osType)=lower(?) AND (f.pushTime <=:date)) 10:21:44.084 [org.springframework.scheduling.quartz.SchedulerFactoryBean#0_Worker-1] DEBUG o.h.hql.ast.QueryTranslatorImpl - SQL: select flow0_.pin as col_0_0_, flow0_.pushCode as col_1_0_ from flow flow0_ where (flow0_.createTime between ? and ?) and (flow0_.status=? or flow0_.status=?) and lower(flow0_.osType)=lower(?) and flow0_.pushTime<=? 10:21:44.084 [org.springframework.scheduling.quartz.SchedulerFactoryBean#0_Worker-1] DEBUG org.hibernate.hql.ast.ErrorCounter - throwQueryException() : no errors [2014-06-04 10:21:44.084][DEBUG][org.springframework.scheduling.quartz.SchedulerFactoryBean#0_Worker-1] - Retrieved value [org.springframework.orm.hibernate3.SessionHolder@197593b] for key [org.hibernate.impl.SessionFactoryImpl@229bb] bound to thread [org.springframework.scheduling.quartz.SchedulerFactoryBean#0_Worker-1] 10:21:44.084 [org.springframework.scheduling.quartz.SchedulerFactoryBean#0_Worker-1] DEBUG org.hibernate.jdbc.AbstractBatcher - about to open PreparedStatement (open PreparedStatements: 0, globally: 0) 10:21:44.084 [org.springframework.scheduling.quartz.SchedulerFactoryBean#0_Worker-1] DEBUG org.hibernate.SQL - select flow0_.pin as col_0_0_, flow0_.pushCode as col_1_0_ from flow flow0_ where (flow0_.createTime between ? and ?) and (flow0_.status=? or flow0_.status=?) and lower(flow0_.osType)=lower(?) and flow0_.pushTime<=? [2014-06-04 10:21:44.131][DEBUG][org.springframework.scheduling.quartz.SchedulerFactoryBean#0_Worker-1] - com.mchange.v2.c3p0.impl.NewPooledConnection@6470a6 handling a throwable. com.ibm.db2.jcc.b.SqlException: DB2 SQL error: SQLCODE: -418, SQLSTATE: 42610, SQLERRMC: null at com.ibm.db2.jcc.b.hh.c(hh.java:1662) at com.ibm.db2.jcc.b.hh.d(hh.java:1650) at com.ibm.db2.jcc.b.hh.a(hh.java:1219) at com.ibm.db2.jcc.c.db.g(db.java:139) at com.ibm.db2.jcc.c.db.a(db.java:39) at com.ibm.db2.jcc.c.t.a(t.java:34) at com.ibm.db2.jcc.c.sb.f(sb.java:142) at com.ibm.db2.jcc.b.hh.n(hh.java:1190) at com.ibm.db2.jcc.b.ih.eb(ih.java:1997) at com.ibm.db2.jcc.b.ih.d(ih.java:2439) at com.ibm.db2.jcc.b.ih.V(ih.java:492) at com.ibm.db2.jcc.b.ih.executeQuery(ih.java:475) at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewProxyPreparedStatement.java:116) at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:208) at org.hibernate.loader.Loader.getResultSet(Loader.java:1808) at org.hibernate.loader.Loader.doQuery(Loader.java:697) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:259) at org.hibernate.loader.Loader.doList(Loader.java:2228) at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2125) at org.hibernate.loader.Loader.list(Loader.java:2120) at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:401) at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:361) at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196) at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1148) at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102) at com.techown.proxy.dao.PushDaoImpl$3.doInHibernate(PushDaoImpl.java:117) at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:419) at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:339) at com.techown.proxy.dao.PushDaoImpl.queryAndroidPushByTime(PushDaoImpl.java:101) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy4.queryAndroidPushByTime(Unknown Source) at com.techown.server.dao.DataManagerImpl.getPushListForPush(DataManagerImpl.java:201) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy19.getPushListForPush(Unknown Source) at com.techown.server.scheduler.service.secondary.CommandPushPorcess.doProcess(CommandPushPorcess.java:24) at com.techown.server.scheduler.service.secondary.ResultHandlerContext.doProcess(ResultHandlerContext.java:45) at com.techown.server.scheduler.service.secondary.ResultHandlerContext$$FastClassByCGLIB$$7baefe8.invoke(<generated>) at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:191) at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:700) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:635) at com.techown.server.scheduler.service.secondary.ResultHandlerContext$$EnhancerByCGLIB$$40f3b5f9.doProcess(<generated>) at com.techown.server.scheduler.service.CommandProcessServiceImpl.doPush(CommandProcessServiceImpl.java:46) at com.techown.server.scheduler.service.CommandProcessServiceImpl.commandProcess(CommandProcessServiceImpl.java:35) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy30.commandProcess(Unknown Source) at com.techown.server.scheduler.CommmandHandleJob.executeInternal(CommmandHandleJob.java:41) at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:86) at org.quartz.core.JobRunShell.run(JobRunShell.java:202) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:529) [2014-06-04 10:21:44.131][DEBUG][org.springframework.scheduling.quartz.SchedulerFactoryBean#0_Worker-1] - Attempted to convert SQLException to SQLException. Leaving it alone. [SQLState: 42610; errorCode: -418] com.ibm.db2.jcc.b.SqlException: DB2 SQL error: SQLCODE: -418, SQLSTATE: 42610, SQLERRMC: null at com.ibm.db2.jcc.b.hh.c(hh.java:1662) at com.ibm.db2.jcc.b.hh.d(hh.java:1650) at com.ibm.db2.jcc.b.hh.a(hh.java:1219) at com.ibm.db2.jcc.c.db.g(db.java:139) at com.ibm.db2.jcc.c.db.a(db.java:39) at com.ibm.db2.jcc.c.t.a(t.java:34) at com.ibm.db2.jcc.c.sb.f(sb.java:142) at com.ibm.db2.jcc.b.hh.n(hh.java:1190) at com.ibm.db2.jcc.b.ih.eb(ih.java:1997) at com.ibm.db2.jcc.b.ih.d(ih.java:2439) at com.ibm.db2.jcc.b.ih.V(ih.java:492) at com.ibm.db2.jcc.b.ih.executeQuery(ih.java:475) at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewProxyPreparedStatement.java:116) at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:208) at org.hibernate.loader.Loader.getResultSet(Loader.java:1808) at org.hibernate.loader.Loader.doQuery(Loader.java:697) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:259) at org.hibernate.loader.Loader.doList(Loader.java:2228) at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2125) at org.hibernate.loader.Loader.list(Loader.java:2120) at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:401) at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:361) at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196) at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1148) at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102) at com.techown.proxy.dao.PushDaoImpl$3.doInHibernate(PushDaoImpl.java:117) at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:419) at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:339) at com.techown.proxy.dao.PushDaoImpl.queryAndroidPushByTime(PushDaoImpl.java:101) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy4.queryAndroidPushByTime(Unknown Source) at com.techown.server.dao.DataManagerImpl.getPushListForPush(DataManagerImpl.java:201) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy19.getPushListForPush(Unknown Source) at com.techown.server.scheduler.service.secondary.CommandPushPorcess.doProcess(CommandPushPorcess.java:24) at com.techown.server.scheduler.service.secondary.ResultHandlerContext.doProcess(ResultHandlerContext.java:45) at com.techown.server.scheduler.service.secondary.ResultHandlerContext$$FastClassByCGLIB$$7baefe8.invoke(<generated>) at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:191) at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:700) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:635) at com.techown.server.scheduler.service.secondary.ResultHandlerContext$$EnhancerByCGLIB$$40f3b5f9.doProcess(<generated>) at com.techown.server.scheduler.service.CommandProcessServiceImpl.doPush(CommandProcessServiceImpl.java:46) at com.techown.server.scheduler.service.CommandProcessServiceImpl.commandProcess(CommandProcessServiceImpl.java:35) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy30.commandProcess(Unknown Source) at com.techown.server.scheduler.CommmandHandleJob.executeInternal(CommmandHandleJob.java:41) at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:86) at org.quartz.core.JobRunShell.run(JobRunShell.java:202) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:529)
首先在网上查找了一下 SQLCODE: -418, SQLSTATE: 42610, SQLERRMC: null 状态码,没有很好的提示。
然后根据报错的类,反编译了代码来看,后来发现 at org.hibernate.engine.query.HQLQueryPlan.performList HQL 解析成为 SQL时出错了(其实仔细看上面能够看得出)
这个HQL 转义成SQL 时出问题了。
SELECT new map(f.pin,f.pushCode) FROM com.techown.proxy.entity.Flow as f WHERE (f.createTime between ? AND ? ) AND (f.status=? OR f.status=?) AND (lower(f.osType)=lower(?) AND (f.pushTime <=:date))
仔细检查发现lower(f.osType)=lower(?) 有问题,因此修改为lower(f.osType)=?
问题解决
相关推荐
在DB2中,错误码通常由SQLCODE和SQLSTATE两部分组成: - **SQLCODE**:是一个整数值,用来表示错误或警告的状态。正数表示警告,负数表示错误。 - **SQLSTATE**:是一个五字符的字符串,用来提供关于错误或警告的更...
4. **配置问题**:DB2的安全策略或配置设置可能过于严格,导致某些正常操作无法执行。 **解决方法** 1. **检查权限**:首先,你需要确认用户是否拥有执行所需操作的适当权限。可以使用`DB2 Authorization`命令来...
DB2SQLError: SQLCODE=-290, SQLSTATE=55039, SQLERRMC=null, DRIVER=3.50.152 消息:不允许访问表空间。SQLCODE=-290, SQLSTATE=55039, DRIVER=3.50.152 ``` 此错误提示中的`SQLCODE=-290`和`SQLSTATE=55039`表明...
因此,本文旨在整理 DB2 的 SQL、sqlcode、sqlstate 错误码大全,提供详细的错误码说明和用户响应方法,帮助用户快速解决问题,提高工作效率。 SQL0000 - SQL0099 在 DB2 中,SQL0000 - SQL0099 错误码系列主要...
以上所述是小编给大家介绍的详解DB2 sqlstate 57016 SQLCODE=-668 原因码 “7”错误的快速解决办法,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对软件开发网网站...
db2 数据库错误对照文档,错误分析及解决办法,常见的都有。db2数据库开发者最好的帮助文档。
DB2通过返回`sqlcode`和`sqlstate`来告知用户具体的错误信息,帮助开发者和管理员理解并解决问题。`sqlcode`是一个整数值,通常负值表示错误,正值表示警告,而`sqlstate`则是一个五位的字母数字代码,提供了更详细...
本文将详细介绍一系列常见的SQLCODE和SQLState错误信息及其含义,旨在帮助用户更好地理解这些错误,并能够自行分析问题的原因。 #### SQL CODE和SQL State简介 SQL CODE和SQL State是DB2中用于表示SQL语句执行状态...
这些错误提示通常包含一个SQLCODE和SQLSTATE值,用来指示具体发生了什么类型的错误。理解这些错误码的意义对于快速定位问题、解决问题至关重要。下面我们将详细解释一些常见的DB2错误码及其含义。 #### 00000 - SQL...
总之,DB2的错误代码,特别是sqlcode和sqlstate的组合,为数据库管理员和开发者提供了一种机制,以识别和解决数据库执行过程中遇到的各种问题。一个经验丰富和细心的数据库管理员,将能够利用这些信息迅速有效地诊断...
在使用过程中,用户可能会遇到各种错误,其中“SQLCODE”是DB2返回的一种错误代码,用于指示查询或操作失败的具体原因。本篇文章将深入探讨DB2数据库错误解决代码SQLCODE的相关知识点,帮助你更好地理解和处理这些...
12. 字符串无法翻译设置为NULL:SQLCODE为+331 SQLSTATE为01520,表示由于字符集转换问题,无法翻译的字符串被设置为NULL。 13. 优化提示选择访问路径:SQLCODE为+394 SQLSTATE为01629,表示使用优化提示来决定查询...
本文档旨在全面解析DB2数据库中的各类错误信息,涵盖了SQLCODE与SQLSTATE及其对应的错误描述。通过这些信息可以帮助DB2用户快速定位并解决问题。 #### 一、SQLCODE与SQLSTATE简介 在DB2中,SQLCODE和SQLSTATE是用来...
在SQL数据库操作中,我们可能会遇到各种错误代码,其中SQLSTATE=57016 SQLCODE=-668是一个常见的错误,特别是在IBM DB2数据库系统中。这个错误通常表示一个操作无法执行,因为对象(如表)正被其他事务占用或者处于...
- **异常描述**:DB2版本不支持某些功能。 - **常见原因**: - 使用了当前DB2版本不支持的功能。 - **解决方案**: - 升级到支持所需功能的DB2版本。 - **SQLCODE +4450, SQLSTATE 1004** - **异常描述**:值...
涵盖所有常见DB2 sqlcode sqlstate的信息中文解释大全。 是进行DB2相关学习和工作的必备参考资料! 内容粗览: DB2错误信息(按sqlcode排序) sqlcode sqlstate 说明 000 00000 SQL语句成功完成 01xxx SQL语句成功...
在使用DB2时,可能会遇到各种异常情况,这些异常通常通过SQLCODE(一个整数值)和SQLSTATE(五位字母数字代码)来标识。这些错误代码帮助开发者和DBA理解并解决系统中的问题。以下是一些常见的DB2 SQLCODE异常及其...
本资源“db2 sqlcode大全下载,db2报错下载”提供了全面的DB2错误代码信息,对理解和解决DB2数据库中的错误非常有帮助。 DB2 SQLCODE错误代码通常是一个三位数,负值表示错误,正值表示警告。这些代码包含了关于...
在建立索引时如果没有包含NULL值的处理,当使用WHERE NOT NULL条件进行查询时,该条件会被自动忽略,不会对查询结果产生影响。 #### 三、权限及安全性错误码 **SQLCODE:** +551 **SQLSTATE:** 01548 **说明:** ...