You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Saimon Moore <sa...@yahoo.co.uk> on 2002/03/22 00:54:02 UTC

commons-logging:InstantiationException for factory implementations

Hi,

I decide to check out commons-logging because I liked the idea of having 
a generic interface to other logging solutions.

It was quite easy to setup, set the 
org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JCategoryLog 

(Saved in commons-logging.properties under WEB-INF), get a Log from the 
LogFactory and off you go...

I have stuck the commons-logging jar under WEB-INF /lib but when my 
servlet initialises, although the props file is being found as are the 
classes in the commons-logging jar, I'm getting an 
InstantiationException when trying to instantiate the factory 
implementations ( I tried SimpleLog and the Log4JCategoryLog).

I'm sorry I don't have the stack trace available here but the exception 
appeared when executing LogFactory.getFactory()...

I'm quite baffled by this since the factory impl classes are within the 
same jar as the classes trying to instantiate them...(I checked...)

Has anyone run into this before?

Any kind of pointer will be appreciated...

Thanks...

Saimon...

(btw the problem is in a servlet I've written that generates pdf on the 
fly using <a href="http://itext.sourceforge.net">iText</a> and Velocity- 
I thought I'd mention it seeing as there has been talk about generating 
pdf docs for the jakarta site. I'd thoroughly recommend iText for the job.)


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>