AnsweredAssumed Answered

[SOLVED] Module developpement & libs

Question asked by pounard on Jul 19, 2007
Latest reply on Jul 20, 2007 by pounard
Hi,

I'm currently developping a authentication component module for Alfresco, to use authentication from a proprietary framework, I have some question about Alfresco.

The framework I use need some libraries, including log4j, dom4j and others common libs. I need also to use proprietary libraries from my company. I did put the framework's libs in the tomcat/shared/libs dir, so my module can find it, the problem is:
Alfresco seems to use log4j to, but when I start it with my module, my module can't find log4j (I think this is a ClassLoader problem), so I dropped a copy of the log4j jar into the same dir, but I have many errors from log4j when Alfresco starting (not exceptions, just some errors):
log4j:ERROR A "org.apache.log4j.ConsoleAppender" object is not assignable to a "org.apache.log4j.Appender" var
iable.
log4j:ERROR The class "org.apache.log4j.Appender" was loaded by
log4j:ERROR [org.apache.catalina.loader.StandardClassLoader@12f9ee] whereas object of type
log4j:ERROR "org.apache.log4j.ConsoleAppender" was loaded by [WebappClassLoader
  delegate: false
  repositories:
    /WEB-INF/classes/
———-> Parent Classloader:
org.apache.catalina.loader.StandardClassLoader@12f9ee
].
log4j:ERROR Could not instantiate appender named "Console".
log4j:ERROR A "org.apache.log4j.DailyRollingFileAppender" object is not assignable to a "org.apache.log4j.Appe
nder" variable.
log4j:ERROR The class "org.apache.log4j.Appender" was loaded by
log4j:ERROR [org.apache.catalina.loader.StandardClassLoader@12f9ee] whereas object of type
log4j:ERROR "org.apache.log4j.DailyRollingFileAppender" was loaded by [WebappClassLoader
  delegate: false
  repositories:
    /WEB-INF/classes/
———-> Parent Classloader:
org.apache.catalina.loader.StandardClassLoader@12f9ee
].
log4j:ERROR Could not instantiate appender named "File".
log4j:WARN No appenders could be found for logger (com.XXXXXX).
log4j:WARN Please initialize the log4j system properly.
XXX authentication module has been loaded
(I masked the company proprietary framework name)

I think tomcat/shared/libs is not the right place to put my libs, where should I drop them ?

PS: Ah, and another question, where Alfresco drop his output and exceptions, a log file ? where?
EDIT: I found alfresco.log :) - But it seems that my errors with log4j disable all alfresco logging cause I dont have any more logs after I had these errors.

Outcomes