commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erik Hatcher" <jakarta-comm...@ehatchersolutions.com>
Subject Re: [betwixt / logging] SecurityException being thrown
Date Tue, 02 Jul 2002 13:09:59 GMT
James - thanks for your quick reply.

I've upgraded to last nights Commons Logging build and still have the same
problem.  I'm using all the version dependencies (except maven.jar, which
I'm assuming is only needed to build Betwixt :) listed here, except for the
nightly upgrade of Commons Logging:

    http://jakarta.apache.org/commons/betwixt/dependencies.html


I've tried setting the logging implementation this way:

-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.NoOpLog

(I'm launching the offending program from a custom Ant task, so I set the
above in ANT_OPTS).

So.... any other ideas what I could be doing wrong, or what Commons Logging
is possibly doing wrong?  The SecurityManager needs to be stringent, but it
seems that Commons Logging should be able to accomodate, at least by falling
back to no-op.  This prevents me from using any API's which use Commons
Logging in this particular case, unfortunately, so it would be nice to find
a solution.

Thanks,
    Erik


----- Original Message -----
From: "James Strachan" <james_strachan@yahoo.co.uk>
To: "Jakarta Commons Developers List" <commons-dev@jakarta.apache.org>
Sent: Tuesday, July 02, 2002 3:25 AM
Subject: Re: [betwixt / logging] SecurityException being thrown


> This sounds like an old problem in commons-logger - I thought this got
fixed
> some time ago. Maybe its time to do another release of commons-logging?
>
> There's some documentation to describe configuring commons-logger here
>
>
http://jakarta.apache.org/commons/logging/api/org/apache/commons/logging/imp
> l/LogFactoryImpl.html
>
http://jakarta.apache.org/commons/logging/api/org/apache/commons/logging/imp
> l/SimpleLog.html
>
> often system properties are used though I think commons-logger uses the
> META-INF/services/* mechanism like JAXP.
>
> You could try just adding log4j to your classpath and seeing if that fixes
> your problem?
>
> James
> ----- Original Message -----
> From: "Erik Hatcher" <jakarta-commons@ehatchersolutions.com>
> To: "Jakarta Commons Developers" <commons-dev@jakarta.apache.org>
> Sent: Tuesday, July 02, 2002 4:37 AM
> Subject: [betwixt / logging] SecurityException being thrown
>
>
> > I'm attempting to use Betwixt in an environment where there is a fairly
> > strict custom SecurityManager in use (I don't know the specifics of it,
> just
> > that it prevent Betwixt from working).  Here is the exception I'm
getting:
> >
> > java.lang.SecurityException: attempt to add a Permission to a readonly
> > Permissions object
> >    at java.security.Permissions.add(Permissions.java:90)
> >    at java.net.URLClassLoader.getPermissions(URLClassLoader.java:468)
> >    at sun.misc.Launcher$AppClassLoader.getPermissions(Launcher.java:294)
> >    at
> >
>
java.security.SecureClassLoader.getProtectionDomain(SecureClassLoader.java:1
> >    at
> > java.security.SecureClassLoader.defineClass(SecureClassLoader.java:111)
> >    at java.net.URLClassLoader.defineClass(URLClassLoader.java:248)
> >    at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
> >    at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
> >    at java.security.AccessController.doPrivileged(NativeMethod)
> >    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
> >    at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
> >    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
> >    at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
> >    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
> >    at
org.apache.commons.betwixt.io.BeanWriter.<init>(BeanWriter.java:144)
> >
> > The issue appears to come from the use of Commons Logging, as Betwixt
> > instantiates this instance variable:
> >
> >     private Log log = LogFactory.getLog( BeanWriter.class );
> >
> > Has anyone encountered this type of scenario and found a way to address
> it?
> > Is there some way I can configure it to not attempt risky things and
> somehow
> > let me use the no-op logger.  All I want is a bean to turn into XML, and
> I'm
> > not interested in any of the possible logging output.
> >
> > Thanks,
> >     Erik
> >
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:commons-dev-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail:
> <mailto:commons-dev-help@jakarta.apache.org>
> >
>
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>
>
> --
> To unsubscribe, e-mail:
<mailto:commons-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
<mailto:commons-dev-help@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message