AnsweredAssumed Answered

Activit without Spring

Question asked by omni.ok on Feb 26, 2014
Latest reply on Feb 27, 2014 by martin.grofcik
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 !!!

Outcomes