You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Martin Asenov <mA...@velti.com> on 2010/01/29 08:38:39 UTC

java heap space IAuthorizationStrategy

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)

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: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: java heap space IAuthorizationStrategy

Posted by Martin Grigorov <mc...@e-card.bg>.
On Fri, 2010-01-29 at 09:38 +0200, 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)
> 
> 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();
Move this to be a local variable in #isInstantiationAuthorized(Class).
This is not the cause of OOM but the session (respectively the context)
should be get per request.
> 	
> 	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: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


RE: java heap space IAuthorizationStrategy

Posted by Martin Asenov <mA...@velti.com>.
Hello Thomas (and Martin :))

It's obviously an endless loop, but accessdeniedpage is not a subclass of neither domainrequiredpage, administrationpage, nor BaseFrame, which is my base page.

Unfortunately I can't find where this loop is coming from...

Thanks and regards,
Martin

-----Original Message-----
From: Thomas Kappler [mailto:thomas.kappler@isb-sib.ch] 
Sent: Friday, January 29, 2010 10:36 AM
To: users@wicket.apache.org
Subject: Re: java heap space IAuthorizationStrategy

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: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>


-- 
-------------------------------------------------------------------
   Thomas Kappler                        thomas.kappler@isb-sib.ch
   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: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: java heap space IAuthorizationStrategy

Posted by Thomas Kappler <th...@isb-sib.ch>.
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: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>


-- 
-------------------------------------------------------------------
   Thomas Kappler                        thomas.kappler@isb-sib.ch
   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: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: PagingNavigator css tags

Posted by Igor Vaynberg <ig...@gmail.com>.
see imarkupsettings#setDefault(Before|After)DisabledLink()

-igor

On Thu, Feb 4, 2010 at 8:29 AM, Andreas Lüdtke <sa...@t-online.de> wrote:
> Hi,
>
> I've just started with css and I would like to know the tag names of the
> paging navigator. I had a look in the wicket source code, but my css file
> doesn't work. I mean the area in the upper right corner like
>
>        <<  <  1  2  3  4  5  >  >>
>
> I don't like the italic font-weight. Any help is much appreciated.
>
> Andreas
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


PagingNavigator css tags

Posted by Andreas Lüdtke <sa...@t-online.de>.
Hi,

I've just started with css and I would like to know the tag names of the
paging navigator. I had a look in the wicket source code, but my css file
doesn't work. I mean the area in the upper right corner like

	<<  <  1  2  3  4  5  >  >>

I don't like the italic font-weight. Any help is much appreciated.

Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org