cancel
Showing results for 
Search instead for 
Did you mean: 

Activit without Spring

omni_ok
Champ in-the-making
Champ in-the-making
Can someone help me on following points?

1. I need to implement Activiti without Spring. I want to use simple Servet-JSP code. However, I could not find much help on this.

2. Using simple Servlet-JSP code, I am getting the following exception related to slf4j

Failed to instantiate SLF4J LoggerFactory
Reported exception:
java.lang.NoClassDefFoundError: org/apache/log4j/Level
       at org.slf4j.LoggerFactory.bind(LoggerFactory.java:129)
       at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:108)
       at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:302)
       at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:276)
       at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:288)
       at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.<clinit>(ProcessEngineConfigurationImpl.java:219)
       at org.activiti.engine.ProcessEngineConfiguration.createStandaloneProcessEngineConfiguration(ProcessEngineConfiguration.java:197)
       at com.activiti.Servlet1.doPost(Servlet1.java:40)
       at com.activiti.Servlet1.doGet(Servlet1.java:25)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
       at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
       at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
       at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.apache.log4j.Level
       at java.net.URLClassLoader$1.run(Unknown Source)
       at java.net.URLClassLoader$1.run(Unknown Source)
       at java.security.AccessController.doPrivileged(Native Method)
       at java.net.URLClassLoader.findClass(Unknown Source)
       at java.lang.ClassLoader.loadClass(Unknown Source)
       at java.lang.ClassLoader.loadClass(Unknown Source)
       … 23 more
Feb 26, 2014 12:32:35 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet Servlet1 threw exception
java.lang.ClassNotFoundException: org.apache.log4j.Level
       at java.net.URLClassLoader$1.run(Unknown Source)
       at java.net.URLClassLoader$1.run(Unknown Source)
       at java.security.AccessController.doPrivileged(Native Method)
       at java.net.URLClassLoader.findClass(Unknown Source)
       at java.lang.ClassLoader.loadClass(Unknown Source)
       at java.lang.ClassLoader.loadClass(Unknown Source)
       at org.slf4j.LoggerFactory.bind(LoggerFactory.java:129)
       at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:108)
       at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:302)
       at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:276)
       at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:288)
       at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.<clinit>(ProcessEngineConfigurationImpl.java:219)
       at org.activiti.engine.ProcessEngineConfiguration.createStandaloneProcessEngineConfiguration(ProcessEngineConfiguration.java:197)
       at com.activiti.Servlet1.doPost(Servlet1.java:40)
       at com.activiti.Servlet1.doGet(Servlet1.java:25)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
       at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
       at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
       at java.lang.Thread.run(Unknown Source)


3. Last point : Configuring MYSQL database. I have put the MYSQL jar files in web-app/lib of my application and configured the db.properties file. Also the new MYSQL JDBC connection is mentioned in my code. However,  I cannot proceed without the resolving the above exception. How do I verify if MYSQL is configured correctly with Activiti.

Thank you in advance !!!
14 REPLIES 14

omni_ok
Champ in-the-making
Champ in-the-making
I have proceeded to initiate a new process of my own. This is working fine.
When I write the below code, I get the exception which ins mentioned following the code:

TaskService taskService = processEngine.getTaskService();
List<Task> tasks = taskService.createTaskQuery().taskAssignee("kermit").list();
for (Task task : tasks) {
   System.out.println("id "+task.getId()+" name "+task.getName());
}

Exception:
org.apache.ibatis.exceptions.PersistenceException:
### Error querying database.  Cause: org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'limitBefore' in 'class org.activiti.engine.impl.TaskQueryImpl'
### Cause: org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'limitBefore' in 'class org.activiti.engine.impl.TaskQueryImpl'
       at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:23)
       at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:107)
       at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:98)
       at org.activiti.engine.impl.db.DbSqlSession.selectListWithRawParameter(DbSqlSession.java:286)
       at org.activiti.engine.impl.db.DbSqlSession.selectList(DbSqlSession.java:277)
       at org.activiti.engine.impl.persistence.entity.TaskEntityManager.findTasksByQueryCriteria(TaskEntityManager.java:113)
       at org.activiti.engine.impl.TaskQueryImpl.executeList(TaskQueryImpl.java:551)
       at org.activiti.engine.impl.AbstractQuery.execute(AbstractQuery.java:139)
       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.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.AbstractQuery.list(AbstractQuery.java:113)
       at com.activiti.ApprovalServlet.doGet(ApprovalServlet.java:44)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
       at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
       at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
       at java.lang.Thread.run(Unknown Source)
Caused by: org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'limitBefore' in 'class org.activiti.engine.impl.TaskQueryImpl'
       at org.apache.ibatis.reflection.Reflector.getGetInvoker(Reflector.java:377)
       at org.apache.ibatis.reflection.MetaClass.getGetInvoker(MetaClass.java:167)
       at org.apache.ibatis.reflection.wrapper.BeanWrapper.getBeanProperty(BeanWrapper.java:149)
       at org.apache.ibatis.reflection.wrapper.BeanWrapper.get(BeanWrapper.java:45)
       at org.apache.ibatis.reflection.MetaObject.getValue(MetaObject.java:113)
       at org.apache.ibatis.scripting.xmltags.DynamicContext$ContextMap.get(DynamicContext.java:89)
       at org.apache.ibatis.scripting.xmltags.DynamicContext$ContextAccessor.getProperty(DynamicContext.java:107)
       at org.apache.ibatis.ognl.OgnlRuntime.getProperty(OgnlRuntime.java:1657)
       at org.apache.ibatis.ognl.ASTProperty.getValueBody(ASTProperty.java:92)
       at org.apache.ibatis.ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:170)
       at org.apache.ibatis.ognl.SimpleNode.getValue(SimpleNode.java:210)
       at org.apache.ibatis.ognl.Ognl.getValue(Ognl.java:333)
       at org.apache.ibatis.ognl.Ognl.getValue(Ognl.java:413)
       at org.apache.ibatis.ognl.Ognl.getValue(Ognl.java:395)
       at org.apache.ibatis.scripting.xmltags.OgnlCache.getValue(OgnlCache.java:45)
       at org.apache.ibatis.scripting.xmltags.TextSqlNode$BindingTokenParser.handleToken(TextSqlNode.java:50)
       at org.apache.ibatis.parsing.GenericTokenParser.parse(GenericTokenParser.java:50)
       at org.apache.ibatis.scripting.xmltags.TextSqlNode.apply(TextSqlNode.java:31)
       at org.apache.ibatis.scripting.xmltags.MixedSqlNode.apply(MixedSqlNode.java:29)
       at org.apache.ibatis.scripting.xmltags.DynamicSqlSource.getBoundSql(DynamicSqlSource.java:37)
       at org.apache.ibatis.mapping.MappedStatement.getBoundSql(MappedStatement.java:265)
       at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:79)
       at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:104)
       … 27 more

Please help me in this !!!

martin_grofcik
Confirmed Champ
Confirmed Champ
mapping file is not in synch with code.
Did you upgrade code or database? Were upgrades synchronized?

omni_ok
Champ in-the-making
Champ in-the-making
Which mapping file?
I have not upgraded anything explicitly. I am using MYSQL5.5.9  and Activiti 5.14 right from the start of this application!

omni_ok
Champ in-the-making
Champ in-the-making
Which mapping file?
I have not upgraded anything explicitly. I am using MYSQL5.5.9  and Activiti 5.14 right from the start of this application!

martin_grofcik
Confirmed Champ
Confirmed Champ
org/activiti/db/mapping/entity/Task.xml