AnsweredAssumed Answered

Activiti initial fail when deploy war to JBoss 6.2

Question asked by huntter on Mar 31, 2015
Latest reply on Apr 1, 2015 by huntter
I'm trying to deploy an activiti based bpm application to JBoss 6.2, but unfortunately when start JBoss, it is failed due to the sql statement


13:50:35,867 INFO  [stdout] (Thread-94) ### Cause: com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near the keyword 'where'.
13:50:35,867 INFO  [stdout] (Thread-94) org.apache.ibatis.exceptions.PersistenceException:
13:50:35,867 INFO  [stdout] (Thread-94) ### Error querying database.  Cause: com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near the keyword 'where'.
13:50:35,868 INFO  [stdout] (Thread-94) ### The error may exist in org/activiti/db/mapping/entity/Job.xml
13:50:35,868 INFO  [stdout] (Thread-94) ### The error may involve org.activiti.engine.impl.persistence.entity.JobEntity.selectNextJobsToExecute-Inline
13:50:35,868 INFO  [stdout] (Thread-94) ### The error occurred while setting parameters
13:50:35,868 INFO  [stdout] (Thread-94) ### SQL: select * from ( select a.*, ROWNUM rnum from (     select       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)       )         ) a where ROWNUM < ?) where rnum  >= ?
13:50:35,869 INFO  [stdout] (Thread-94) ### Cause: com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near the keyword 'where'.
13:50:35,870 INFO  [stdout] (Thread-94)         at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:23) ~[mybatis-3.2.5.jar:3.2.5]
13:50:35,870 INFO  [stdout] (Thread-94)         at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:107) ~[mybatis-3.2.5.jar:3.2.5]
13:50:35,870 INFO  [stdout] (Thread-94)         at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:98) ~[mybatis-3.2.5.jar:3.2.5]
13:50:35,871 INFO  [stdout] (Thread-94)         at org.activiti.engine.impl.db.DbSqlSession.selectListWithRawParameter(DbSqlSession.java:416) ~[activiti-engine-5.16.1.jar:5.16.1]
13:50:35,871 INFO  [stdout] (Thread-94)         at org.activiti.engine.impl.db.DbSqlSession.selectList(DbSqlSession.java:407) ~[activiti-engine-5.16.1.jar:5.16.1]
13:50:35,871 INFO  [stdout] (Thread-94)         at org.activiti.engine.impl.db.DbSqlSession.selectList(DbSqlSession.java:402) ~[activiti-engine-5.16.1.jar:5.16.1]
13:50:35,872 INFO  [stdout] (Thread-94)         at org.activiti.engine.impl.db.DbSqlSession.selectList(DbSqlSession.java:389) ~[activiti-engine-5.16.1.jar:5.16.1]
13:50:35,872 INFO  [stdout] (Thread-94)         at org.activiti.engine.impl.persistence.entity.JobEntityManager.findNextJobsToExecute(JobEntityManager.java:97) ~[activiti-engine-5.16.1.jar:5.16.1]


And this application running well in tomcat 7.

Outcomes