QuickTip: log4j:ERROR Could not instantiate class [org.jboss.logging.util.OnlyOnceErrorHandler].

Posted on Friday, January 29, 2010

4


Most probably you have included the jboss dependency in your log4j.xml like

<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
<errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
<param name="Target" value="System.out"/>

<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d{HH:mm:ss,SSS} %<span class=" />-5p [%c{1}] %m%n"/>
</layout>
</appender>

You would have to include a Jboss commons dependency along with the log4j dependency

               <dependency>
			<groupId>log4j</groupId>
			<artifactId>log4j</artifactId>
			<version>1.2.14</version>
		</dependency>

		<dependency>
			<groupId>jboss</groupId>
			<artifactId>jboss-common</artifactId>
			<version>4.2.3.GA</version>
		</dependency>
Advertisements
Posted in: Java