You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by James Strachan <ja...@yahoo.co.uk> on 2002/02/26 04:16:39 UTC

[logging] minor patch applied for AccessControlException catching...

I've just committed a minor patch to the SimpleLog class that catches any
security exceptions thrown inside the class constructor (when accessing
system properties) which occur when using the commons-logging component
inside a container.

Now this patch has been applied commons-logging seems to work fine when used
inside, for example, the J2EE SDK server.

This shouldn't have any adverse affects on anyone - its pretty trivial to
reverse if this change causes anyone a problem.

James





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


Re: [logging] minor patch applied for AccessControlException catching...

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Mon, 25 Feb 2002 costinm@covalent.net wrote:

> Date: Mon, 25 Feb 2002 20:31:50 -0800 (PST)
> From: costinm@covalent.net
> Reply-To: Jakarta Commons Developers List <co...@jakarta.apache.org>
> To: Jakarta Commons Developers List <co...@jakarta.apache.org>
> Subject: Re: [logging] minor patch applied for AccessControlException
>     catching...
>
> On Tue, 26 Feb 2002, James Strachan wrote:
>
> > I've just committed a minor patch to the SimpleLog class that catches any
> > security exceptions thrown inside the class constructor (when accessing
> > system properties) which occur when using the commons-logging component
> > inside a container.
>
> Good catch ! I completely forgot the 'sandbox' case during the release.
>

This should also help running commons-logging based applets, where the
same issue applies.

> There is one more problem I found with the class loaders, we
> need to try Class.forName() if the thread loader fails.
>
> I doubt there are many other who'll notice this, but it's a
> valid use case and trivial fix. It happens if commons-logging
> is loaded in a child class loader, and the thread class loader
> is set to a different loader ( that will happen if the container
> is using commons-logging, and it uses a separate loader than
> the application )
>

+1

> Costin
>

Craig


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


Re: [logging] minor patch applied for AccessControlException catching...

Posted by co...@covalent.net.
On Tue, 26 Feb 2002, James Strachan wrote:

> I've just committed a minor patch to the SimpleLog class that catches any
> security exceptions thrown inside the class constructor (when accessing
> system properties) which occur when using the commons-logging component
> inside a container.

Good catch ! I completely forgot the 'sandbox' case during the release.

There is one more problem I found with the class loaders, we 
need to try Class.forName() if the thread loader fails.

I doubt there are many other who'll notice this, but it's a 
valid use case and trivial fix. It happens if commons-logging
is loaded in a child class loader, and the thread class loader
is set to a different loader ( that will happen if the container
is using commons-logging, and it uses a separate loader than
the application )

Costin



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