[jboss-user] [JBoss Portal] - log4j classcastexception with alfresco WAR

advaittrivedi do-not-reply at jboss.com
Wed Jun 20 06:36:12 EDT 2007


Hi,

I have alfresco war deployed. When I start server it gives following exception:
=========================================
16:03:29,799 ERROR [STDERR] log4j:ERROR Could not create level [TRACE]. Reported error follows.
16:03:29,799 ERROR [STDERR] java.lang.ClassCastException: org.jboss.logging.XLevel
16:03:29,799 ERROR [STDERR]     at org.apache.log4j.xml.DOMConfigurator.parseLevel(DOMConfigurator.java:512)
16:03:29,799 ERROR [STDERR]     at org.apache.log4j.xml.DOMConfigurator.parseChildrenOfLoggerElement(DOMConfigurator.java:428)
....
16:03:29,846 ERROR [STDERR] log4j:ERROR A "org.jboss.logging.util.OnlyOnceErrorHandler" object is not assignable to a "o
rg.apache.log4j.spi.ErrorHandler" variable.
16:03:29,846 ERROR [STDERR] log4j:ERROR The class "org.apache.log4j.spi.ErrorHandler" was loaded by
16:03:29,846 ERROR [STDERR] log4j:ERROR [WebappClassLoader
  delegate: false
  repositories:
    /WEB-INF/classes/
----------> Parent Classloader:
java.net.FactoryURLClassLoader at 19f768f
] whereas object of type
16:03:29,846 ERROR [STDERR] log4j:ERROR "org.jboss.logging.util.OnlyOnceErrorHandler" was loaded by [org.jboss.system.se
rver.NoAnnotationURLClassLoader at 1de3f2d].
16:03:29,924 ERROR [STDERR] log4j:ERROR Could not create an Appender. Reported error follows.
16:03:29,924 ERROR [STDERR] java.lang.ClassCastException: org.jboss.logging.appender.DailyRollingFileAppender
....
================================================

I dont have either log4j.jar or commons-logging.jar in alfresco/WEB-INF/lib.
I also tried adding this to WEB-INF/jboss-web.xml:

<?xml version="1.0"?>
<jboss-web>
	<class-loading java2ClassLoadingCompliance="true">
	<loader-repository>
	com.example:loader=alfresco.war
	<loader-repository-config>java2ParentDelegation=true</loader-repository-config>
	</loader-repository>
	</class-loading>
</jboss-web>

as well as this:
<?xml version="1.0"?>
<jboss-web>
	<class-loading java2ClassLoadingCompliance="false">
	<loader-repository>
	com.example:loader=alfresco.war
	<loader-repository-config>java2ParentDelegation=true</loader-repository-config>
	</loader-repository>
	</class-loading>
</jboss-web>

But to no avail, same exceptions still persist.

Thanks & Regards,
Advait Trivedi

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4055958#4055958

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4055958



More information about the jboss-user mailing list