Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Re: Q about AspectJ and Java 2 security

Hi Paul,

You need to grant the aspectj code the getClassloader permission. You
do this in the was.policy file, which is like a java policy file. This
file must be located in the META-INF directory of your ear. The
following is the URL to the documentation for Websphere v5 was.policy
file.
http://publib.boulder.ibm.com/infocenter/wasinfo/v5r1//index.jsp?topic=/com.ibm.websphere.base.doc/info/aes/ae/tsec_waspolicyfile.html

Websphere and also JDK ship with policy tools to help you write this permission.

Monal

On 8/7/07, Paul D Reiners <reiners@xxxxxxxxxx> wrote:
>
> I am running into java.security.AccessControlExceptions,
> when Java 2 security is turned on (for an IBM WebSphere server), with my
> code that uses AspectJ.
>
>  This is the stack trace:
>
>         Caused by: java.security.AccessControlException:
> Access denied (java.lang.RuntimePermission getClassLoader)
>                  at
> java.security.AccessController.checkPermission(AccessController.java:104)
>                  at
> java.lang.SecurityManager.checkPermission(SecurityManager.java:547)
>                  at
> com.ibm.ws.security.core.SecurityManager.checkPermission(SecurityManager.java:189)
>                  at java.lang.Class.getClassLoader(Class.java:234)
>                  at
> org.aspectj.runtime.reflect.Factory.<init>(Factory.java:71)
>
>  Does anyone happen to know how to solve this problem?
>
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>
>


Back to the top