You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by Em...@scisys.co.uk on 2003/01/27 18:29:18 UTC

Using log4j with applets

Hi there,
I am currently developing a java applet that uses existing code that itself
uses log4j.

When running the applet as an application I have no problems, however when
I try to run the applet from an HTML page any call to LogFactory.getLog()
fails with the exception:

org.apache.commons.logging.LogConfigurationException: java.lang.NullPointerException

I have checked that the class name being passed into the function is valid.
Is the problem related to the fact that the applet will not have access to a log4j.properties file and if so is there any way round this?
Is there any way of disabling logging so that the problem will not occur?

There shouldn't be any security issues relating to logging as the applet and all the code it uses is signed.

Any help with this issue would be gratefully received.
Regards,
Emlyn J Purvis



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


Re: Using log4j with applets

Posted by Jacob Kjome <ho...@visi.com>.
Hello Emlyn,

This is not a bug in Log4j. It is a bug in commons-logging.  Please as
their list about your problems.  You might also want to read this:

http://qos.ch/logging/thinkAgain.html

Jake

Monday, January 27, 2003, 11:29:18 AM, you wrote:

EPscu> Hi there,
EPscu> I am currently developing a java applet that uses existing code that itself
EPscu> uses log4j.

EPscu> When running the applet as an application I have no problems, however when
EPscu> I try to run the applet from an HTML page any call to LogFactory.getLog()
EPscu> fails with the exception:

EPscu> org.apache.commons.logging.LogConfigurationException: java.lang.NullPointerException

EPscu> I have checked that the class name being passed into the function is valid.
EPscu> Is the problem related to the fact that the applet will not have access to a log4j.properties file and if so is there any way round this?
EPscu> Is there any way of disabling logging so that the problem will not occur?

EPscu> There shouldn't be any security issues relating to logging as the applet and all the code it uses is signed.

EPscu> Any help with this issue would be gratefully received.
EPscu> Regards,
EPscu> Emlyn J Purvis



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



-- 
Best regards,
 Jacob                            mailto:hoju@visi.com


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