引起:java.lang.ClassNotFoundException:运行时的org.slf4j.LoggerFactory

时间:2017-03-30 14:34:12

标签: java websphere slf4j

将以下Jars添加到项目的classPath中:

SLF4J-API-1.6.3.jar SLF4J-was.jar

在Java类中:

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

private static Logger LOGGER = LoggerFactory.getLogger(myClass.class);

在运行时,我遇到以下异常:

Caused by: java.lang.NoClassDefFoundError: org.slf4j.LoggerFactory
at com.ibm.beans.session.myClass.<clinit>(myClass.java:99)
at java.lang.J9VMInternals.initializeImpl(Native Method)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:236)
... 130 more

0 个答案:

没有答案