jeesite + sqlserver2000 + tomcat 启动报错 ja?400报错-问答-阿里云开发者社区-阿里云

开发者社区> 问答> 正文

jeesite + sqlserver2000 + tomcat 启动报错 ja?400报错

爱吃鱼的程序员 2020-06-08 16:01:20 129

知道是sqlserver2000 不支持 row_number 函数 ,但是 找不到sql语句在什么地方 求大神指导指导

 

 

2017-03-25 15:29:27,383 ERROR [activiti.engine.impl.jobexecutor.AcquireJobsRunnableImpl] - exception during job acquisition: 
### Error querying database.  Cause: java.sql.SQLException: 'row_number' 不是可以识别的 函数名。
### The error may exist in org/activiti/db/mapping/entity/Job.xml
### The error may involve org.activiti.engine.impl.persistence.entity.JobEntity.selectNextJobsToExecute-Inline
### The error occurred while setting parameters
### SQL: SELECT SUB.* FROM (     select       RES.* , row_number() over (ORDER BY RES.ID_ asc) rnk FROM ( select distinct RES.*            from ACT_RU_JOB RES          LEFT OUTER JOIN ACT_RU_EXECUTION PI ON PI.ID_ = RES.PROCESS_INSTANCE_ID_     where (RES.RETRIES_ > 0)       and (RES.DUEDATE_ is null or RES.DUEDATE_ <= ?)       and (RES.LOCK_OWNER_ is null or RES.LOCK_EXP_TIME_ <= ?)      and (         (RES.EXECUTION_ID_ is null)        or         (PI.SUSPENSION_STATE_ = 1)       )       )RES ) SUB WHERE SUB.rnk >= ? AND SUB.rnk < ?
### Cause: java.sql.SQLException: 'row_number' 不是可以识别的 函数名。
org.apache.ibatis.exceptions.PersistenceException: 
### Error querying database.  Cause: java.sql.SQLException: 'row_number' 不是可以识别的 函数名。
### The error may exist in org/activiti/db/mapping/entity/Job.xml
### The error may involve org.activiti.engine.impl.persistence.entity.JobEntity.selectNextJobsToExecute-Inline
### The error occurred while setting parameters
### SQL: SELECT SUB.* FROM (     select       RES.* , row_number() over (ORDER BY RES.ID_ asc) rnk FROM ( select distinct RES.*            from ACT_RU_JOB RES          LEFT OUTER JOIN ACT_RU_EXECUTION PI ON PI.ID_ = RES.PROCESS_INSTANCE_ID_     where (RES.RETRIES_ > 0)       and (RES.DUEDATE_ is null or RES.DUEDATE_ <= ?)       and (RES.LOCK_OWNER_ is null or RES.LOCK_EXP_TIME_ <= ?)      and (         (RES.EXECUTION_ID_ is null)        or         (PI.SUSPENSION_STATE_ = 1)       )       )RES ) SUB WHERE SUB.rnk >= ? AND SUB.rnk < ?
### Cause: java.sql.SQLException: 'row_number' 不是可以识别的 函数名。
    at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:26)
    at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:111)
    at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:102)
    at org.activiti.engine.impl.db.DbSqlSession.selectListWithRawParameter(DbSqlSession.java:443)
    at org.activiti.engine.impl.db.DbSqlSession.selectList(DbSqlSession.java:434)
    at org.activiti.engine.impl.db.DbSqlSession.selectList(DbSqlSession.java:429)
    at org.activiti.engine.impl.db.DbSqlSession.selectList(DbSqlSession.java:412)
    at org.activiti.engine.impl.persistence.entity.JobEntityManager.findNextJobsToExecute(JobEntityManager.java:150)
    at org.activiti.engine.impl.cmd.AcquireJobsCmd.execute(AcquireJobsCmd.java:50)
    at org.activiti.engine.impl.cmd.AcquireJobsCmd.execute(AcquireJobsCmd.java:33)
    at org.activiti.engine.impl.interceptor.CommandInvoker.execute(CommandInvoker.java:24)
    at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:57)
    at org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:47)
    at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133)
    at org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:45)
    at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:31)
    at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:40)
    at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:35)
    at org.activiti.engine.impl.jobexecutor.AcquireJobsRunnableImpl.run(AcquireJobsRunnableImpl.java:54)
    at java.lang.Thread.run(Thread.java:724)
Caused by: java.sql.SQLException: 'row_number' 不是可以识别的 函数名。
    at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:372)
    at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2988)
    at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2421)
    at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:671)
    at net.sourceforge.jtds.jdbc.JtdsStatement.processResults(JtdsStatement.java:613)
    at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQL(JtdsStatement.java:572)
    at net.sourceforge.jtds.jdbc.JtdsPreparedStatement.execute(JtdsPreparedStatement.java:784)
    at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_execute(FilterChainImpl.java:2931)
    at com.alibaba.druid.filter.FilterEventAdapter.preparedStatement_execute(FilterEventAdapter.java:440)
    at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_execute(FilterChainImpl.java:2929)
    at com.alibaba.druid.proxy.jdbc.PreparedStatementProxyImpl.execute(PreparedStatementProxyImpl.java:131)
    at com.alibaba.druid.pool.DruidPooledPreparedStatement.execute(DruidPooledPreparedStatement.java:493)
    at org.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:59)
    at org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:73)
    at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:60)
    at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:267)
    at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:137)
    at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:96)
    at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:77)
    at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:108)
    ... 18 more

SQL 应用服务中间件
分享到
取消 提交回答
全部回答(1)
  • 爱吃鱼的程序员
    2020-06-08 16:01:38

    你用了activiti的。这个函数是用于物理分页的,你可以把数据库备份还原到2008上面去,就可以使用了回复<aclass="referer"target="_blank">@蓝水晶飞机:除了换数据库,没有其他的办法了吗?回复<aclass="referer"target="_blank">@os_haoran:肯定是Activiti内部使用了row_number()的,Activiti这么做就不支持SQLServer2000了。我们公司以前也是2000的数据库,后来把2000的数据库备份还原到2008的数据库服务器,完美升级。后来我也在上面跑Activiti没有问题呢。我知道是sqlserver2000不支持这个row_number函数,但是我这边必须得用sqlserver2000,我找了和activity所有相关的文件,但是没有找到用row_number函数的sql语句,大神能不能指导下具体是哪里的问题

    没有找到解决办法只能先暂停使用activity工作流

    在 spring-context-activiti.xml配置文件中关闭JobExecutor


          <propertyname="jobExecutorActivate"value="false"/>

    设置好这个之后,启动不在报错。

    如果哪位大神有什么好的方法欢迎解答

    0 0
数据库
使用钉钉扫一扫加入圈子
+ 订阅

分享数据库前沿,解构实战干货,推动数据库技术变革

推荐文章
相似问题