Error getting started

Hi,

I am getting started with flowable and I am following the tutorial of chapter 2.

At step 2.3.1 I am not able to run the HolidayRequest because of this error:

Failed to instantiate SLF4J LoggerFactory
Reported exception:
java.lang.NoClassDefFoundError: org/apache/log4j/Level
 at org.slf4j.LoggerFactory.bind(LoggerFactory.java:150)
 at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:124)
 at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:412)
 at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:357)
 at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:383)
 at org.flowable.engine.common.AbstractEngineConfiguration.<clinit>(AbstractEngineConfiguration.java:55)
 at org.flowable.HolidayRequest.main(HolidayRequest.java:11)
Caused by: java.lang.ClassNotFoundException: org.apache.log4j.Level
 at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
 at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
 ... 7 more
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/log4j/Level
 at org.slf4j.LoggerFactory.bind(LoggerFactory.java:150)
 at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:124)
 at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:412)
 at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:357)
 at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:383)
 at org.flowable.engine.common.AbstractEngineConfiguration.<clinit>(AbstractEngineConfiguration.java:55)
 at org.flowable.HolidayRequest.main(HolidayRequest.java:11)
Caused by: java.lang.ClassNotFoundException: org.apache.log4j.Level
 at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
 at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
 ... 7 more

Apparently Level class from Log4j is missing. I am not used to Maven so I need some help to fix this issue.

Tks

Hi,

Just add the Log4j dependency to your Maven pom file. There will be plenty of examples on how to do it on stackoverflow or other sites.

Best regards,

Tijs

I am sorry I didn’t mentioned it. I have already tried to add this to the pom:

<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>2.0</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.0</version>
</dependency>

Nothing changes.

Tks