ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Goli, Srikanth" <sg210...@exchange.DAYTONOH.NCR.com>
Subject RE: Integration : Access Control Problem
Date Fri, 16 Mar 2001 19:54:08 GMT
Thanks Jesse

I am using weblogic's default policy file. I added a permission in it as

permission java.lang.RuntimePermission "getProtectionDomain";

Then everything works fine..

-Srikanth Goli



> -----Original Message-----
> From:	Jesse Glick [SMTP:Jesse.Glick@netbeans.com]
> Sent:	Friday, March 16, 2001 8:40 AM
> To:	ant-dev@jakarta.apache.org
> Subject:	Re: Integration : Access Control Problem
> 
> Probably the WebLogic classloader does not grant permissions to classes it
> loads; it will need to, in order for the script to do much (access files
> etc.). In this case it looks like the Ant code which grants permissions to
> dynamically loaded tasks (and so on) matching what Ant has (which is
> generally
> needed if Ant is run inside some container), is itself not permitted by
> the
> WebLogic classloader for some reason--perhaps it grants some but not all
> permissions.
> 
> Try putting Ant in the server's startup classpath, if you have no control
> over
> the special classloader--this should (hopefully) force it to be loaded by
> the
> application classloader which should have the right permissions. Or patch
> AntClassLoader, commenting out the static initializer which defines
> defineClassProtectionDomain; this might help, or it might not.
> 
> -Jesse
> 
> "Goli, Srikanth" wrote:
> > I am getting the following AccessControlException exception when I call
> ant
> > in my application. I am using Ant1.3 and Weblogic 5.1 Server. All my
> jars
> > are in weblogic.class.path. I guess all the classes are loaded by
> Weblogic's
> > ServerClassLoader. Interestingly Ant is still creating the jar after
> this
> > exception and deploying.
> > 
> > java.io.IOException: java.security.AccessControlException: access denied
> > (java.l
> > ang.RuntimePermission getProtectionDomain)
> >         at
> > org.apache.tools.ant.AntClassLoader.getClassFromStream(AntClassLoader
> > .java:439)
> 
> -- 
> Jesse Glick   <mailto:Jesse.Glick@netbeans.com>
> NetBeans, Open APIs  <http://www.netbeans.org/>
> tel (+4202) 3300-9161 Sun Micro x49161 Praha CR

Mime
View raw message