I am getting the error as mentioned below, while running the feed utility. I am trying to load an image "logo.png". The slf4j
jar file is also available in the runtime classpath. But still I am getting this error.
Oct 16, 2012 7:34:11 PM com.ibm.commerce.foundation.dataload.FeedRetriever invokeDataLoad SEVERE: An error occurred while performing data load. Throwable occurred: com.ibm.commerce.foundation.dataload.exception.DataLoadException: An error occurred while executing the data load. java.lang.NoClassDefFoundError: org.slf4j.LoggerFactory at com.ibm.commerce.foundation.dataload.DataLoaderMain.execute(DataLoaderMain.java:664) at com.ibm.commerce.content.commands.DataLoadInvoker.execute(DataLoadInvoker.java:101) at com.ibm.commerce.foundation.dataload.FeedRetriever.invokeDataLoad(FeedRetriever.java:244) at com.ibm.commerce.foundation.dataload.FeedRetriever.execute(FeedRetriever.java:172) at com.ibm.commerce.foundation.dataload.FeedRetriever.main(FeedRetriever.java:321) Caused by: java.lang.RuntimeException: java.lang.NoClassDefFoundError: org.slf4j.LoggerFactory at com.ibm.commerce.foundation.dataload.DataLoaderMain.execute(DataLoaderMain.java:488) ... 4 more Caused by: java.lang.NoClassDefFoundError: org.slf4j.LoggerFactory at org.apache.wink.client.ClientConfig.<clinit>(ClientConfig.java:52) at java.lang.J9VMInternals.initializeImpl(Native Method) at java.lang.J9VMInternals.initialize(J9VMInternals.java:200) at java.lang.J9VMInternals.initialize(J9VMInternals.java:167) at com.ibm.commerce.foundation.dataload.feedreader.AtomReader.getFeed(AtomReader.java:104) at com.ibm.commerce.foundation.dataload.feedreader.AtomReader.getEntries(AtomReader.java:147) at com.ibm.commerce.foundation.dataload.feedreader.AtomReader.getEntries(AtomReader.java:1) at com.ibm.commerce.foundation.dataload.feedreader.BaseFeedReader.init(BaseFeedReader.java:252) at com.ibm.commerce.foundation.dataload.AbstractBusinessObjectLoader.initializeDataReaders(AbstractBusinessObjectLoader.java:1344) at com.ibm.commerce.foundation.dataload.AbstractBusinessObjectLoader.init(AbstractBusinessObjectLoader.java:369) at com.ibm.commerce.foundation.dataload.BusinessObjectLoader.init(BusinessObjectLoader.java:65) at com.ibm.commerce.foundation.dataload.DataLoaderMain.execute(DataLoaderMain.java:431) ... 4 more Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory at java.lang.ClassNotFoundException.<init>(ClassNotFoundException.java:76) at java.net.URLClassLoader.findClass(URLClassLoader.java:396) at java.lang.ClassLoader.loadClass(ClassLoader.java:660) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:358) at java.lang.ClassLoader.loadClass(ClassLoader.java:626) ... 16 more Oct 16, 2012 7:34:11 PM com.ibm.commerce.foundation.dataload.FeedRetriever main SEVERE: An error occurred while performing data load. Throwable occurred: com.ibm.commerce.foundation.dataload.exception.DataLoadException: An error has occurred. If this problem persists, contact product support. at com.ibm.commerce.foundation.dataload.FeedRetriever.invokeDataLoad(FeedRetriever.java:247) at com.ibm.commerce.foundation.dataload.FeedRetriever.execute(FeedRetriever.java:172) at com.ibm.commerce.foundation.dataload.FeedRetriever.main(FeedRetriever.java:321)
The org. slf4j. Logger interface is the main user entry point of SLF4J API. It is expected that logging takes place through concrete implementations of this interface.
lang. NoClassDefFoundError, which means the Class Loader file responsible for dynamically loading classes can not find the . class file. So to remove this error, you should set your classpath to the location where your Class Loader is present.
Unlike log4j, SLF4J (Simple Logging Facade for Java) is not an implementation of logging framework, it is an abstraction for all those logging frameworks in Java similar to log4J. Therefore, you cannot compare both.
The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for log4j, logback and JDK 1.4 logging. Other implementations such as NOPLogger and SimpleLogger are also supported.
Add a SLF4J implementation (as you only have its API):
<dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-log4j12</artifactId> <version>1.7.26</version> </dependency>
You have to provide one of the various SLF4J implementation .jar files in the classpath, as well as the interface .jar file. This is documented.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With