On 01/29/10 08:38, Martin Asenov wrote:
Hello guys! Very strange exception occurred yesterday when trying to set 
IAuthorizationStrategy to my webapp. Here's the exception:

SEVERE: An exception or error occurred in the container during the request 
processing
java.lang.OutOfMemoryError: Java heap space at 
java.util.Arrays.copyOfRange(Arrays.java:3209)

Looks like an endless loop. Get a compelte stacktrace to confirm that.

Maybe your AccessDeniedPage is a subclass of AdministrationPage or DomainRequiredPage? Then a non-authenticated user would try to access a page, would be redirected to the AccessDeniedPage which would not be allowed, redirect, repeat.


these are the first 2 lines of the exception. Here's my MyAythStrategy class:

public class MyAuthStrategy implements IAuthorizationStrategy {
        
        private UserContext context = ((AppSession)Session.get()).getContext();
        
        public MyAuthStrategy() {}
        
        public boolean isActionAuthorized(Component arg0, Action arg1)
        {
                return true;
        }
        
        public<T extends Component>  boolean isInstantiationAuthorized(Class<T> 
 componentClass)
        {

                if (BaseFrame.class.isAssignableFrom(componentClass)) {
                        
                        if 
(AdministrationPage.class.isAssignableFrom(componentClass)) {
                                if (context.getRole().equals(Role.ROOT) || 
context.getRole().equals(Role.ADMIN))
                                        return true;
                                else
                                        throw new 
RestartResponseAtInterceptPageException(AccessDeniedPage.class);
                        } else if 
(DomainRequiredPage.class.isAssignableFrom(componentClass)) {
                                if (context.getDomain() == null)
                                        throw new 
RestartResponseAtInterceptPageException(AccessDeniedPage.class);
                                else
                                        return true;
                        }                               
                }
                return true;
                
        }
        
}

AdministrationPage and DomainRequiredPage are my tagging interfaces.

When I set that strategy to my webapp I get the above mentioned exception.

Hope someone helps!

Thanks,
Martin

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



--
-------------------------------------------------------------------
  Thomas Kappler                        [email protected]
  Swiss Institute of Bioinformatics         Tel: +41 22 379 51 89
  CMU, rue Michel Servet 1
  1211 Geneve 4
  Switzerland                              http://www.uniprot.org
-------------------------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to