Thank you all for the help! -----Original Message----- From: Sigmar Muuga [mailto:meedi...@gmail.com] Sent: Monday, March 08, 2010 5:50 PM To: users@wicket.apache.org Subject: Re: Session expired drives me mad!
I have had no problems with @SpringBean Also try to use them like this: @SpringBean(name="yourBeanName") This way you can avoid some mess that may occur in the future :) On Mon, Mar 8, 2010 at 5:46 PM, James Carman <jcar...@carmanconsulting.com>wrote: > No, you need to use the @SpringBean annotation: > > http://cwiki.apache.org/WICKET/spring.html#Spring-AnnotationbasedApproach > > > 2010/3/8 Martin Asenov <mase...@velti.com>: > > Hello, > > > > Well, I do use Spring Beans, and as shown in the stack trace, there is a > field relation to the beans themselves. I don't think I can avoid it, do I? > I create the beans by casting from the ApplicationContext. > > > > Thank you, > > Martin > > > > -----Original Message----- > > From: ce...@jweekend.com [mailto:ce...@jweekend.com] On Behalf Of Cemal > Bayramoglu > > Sent: Monday, March 08, 2010 5:39 PM > > To: users > > Subject: Re: Session expired drives me mad! > > > > Martin, > > > > It looks like your page is holding on to Spring benas. > > Are you using @SpringBean to inject Spring beans into your pages? That > > way you would get a proxy to the beans so you don't need to worry > > about them being serialisable. > > > > Regards - Cemal > > jWeekend > > OO & Java Technologies, Wicket > > Consulting, Development, Training > > http://jWeekend.com > > > > > > 2010/3/8 Martin Asenov <mase...@velti.com>: > >> Hello everyone! > >> > >> The session expired problem really drives me mad, because it's been > couple of months or so since it started bothering me. Please advice me on > what to do, because I'm despaired. Wicket tries to serialize every single > class in my opinion. > >> > >> I enabled the DEBUG of Wicket and messages like the following one are > flooding the log. Here it is: > >> > >> 08-03-2010 17:30:03,445 ERROR > org.apache.wicket.util.lang.Objects.objectToByteArray:1134 - Error > serializing object class com.mycompany.myapp.ui.users.Users [object=[Page > class = com.mycompany.myapp.ui.users.Users, id = 21, version = 0]] > >> > org.apache.wicket.util.io.SerializableChecker$WicketNotSerializableException: > Unable to serialize class: > org.springframework.orm.jpa.AbstractEntityManagerFactoryBean$ManagedEntityManagerFactoryInvocationHandler > >> Field hierarchy is: > >> 21 [class=com.mycompany.myapp.ui.users.Users, path=21] > >> private java.lang.Object org.apache.wicket.MarkupContainer.children > [class=[Ljava.lang.Object;] > >> protected java.lang.Object > com.mycompany.myapp.ui.MyFormPanel.model[15] > [class=org.apache.wicket.markup.html.WebMarkupContainer, path=21:holder] > >> private java.lang.Object > org.apache.wicket.MarkupContainer.children [class=[Ljava.lang.Object;] > >> private java.lang.Object > org.apache.wicket.MarkupContainer.children[0] > [class=com.mycompany.myapp.ui.users.Users$2, path=21:holder:view] > >> private java.lang.Object > org.apache.wicket.MarkupContainer.children [class=[Ljava.lang.Object;] > >> private java.lang.Object > org.apache.wicket.MarkupContainer.children[0] > [class=org.apache.wicket.markup.repeater.Item, path=21:holder:view:1] > >> private java.lang.Object > org.apache.wicket.MarkupContainer.children > [class=org.apache.wicket.markup.repeater.RepeatingView, > path=21:holder:view:1:cols] > >> private java.lang.Object > org.apache.wicket.MarkupContainer.children > [class=org.apache.wicket.markup.repeater.Item, path=21:holder:view:1:cols:2] > >> java.lang.Object org.apache.wicket.Component.data > [class=com.mycompany.myapp.ui.users.SortedUsersProvider$1] > >> final > com.mycompany.myapp.ui.users.SortedUsersProvider > com.mycompany.myapp.ui.users.SortedUsersProvider$1.this$0 > [class=com.mycompany.myapp.ui.users.SortedUsersProvider] > >> private com.mycompany.myapp.session.UserContext > com.mycompany.myapp.ui.users.SortedUsersProvider.context > [class=com.mycompany.myapp.session.UserContext] > >> private com.mycompany.myapp.ui.util.Utilities > com.mycompany.myapp.session.UserContext.utilities > [class=com.mycompany.myapp.ui.util.Utilities] > >> private > com.mycompany.myapp.admin.ManagementBean > com.mycompany.myapp.ui.util.Utilities.domainAndUsersManagement > [class=com.mycompany.myapp.admin.ManagementBean$$EnhancerByCGLIB$$b016b4a] > >> private > net.sf.cglib.proxy.MethodInterceptor > com.mycompany.myapp.admin.ManagementBean$$EnhancerByCGLIB$$b016b4a.CGLIB$CALLBACK_0 > [class=org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor] > >> private > org.springframework.aop.framework.AdvisedSupport > org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.advised > [class=org.springframework.aop.framework.ProxyFactory] > >> private > org.springframework.aop.Advisor[] > org.springframework.aop.framework.AdvisedSupport.advisorArray > [class=[Lorg.springframework.aop.Advisor;] > >> private > org.springframework.aop.Advisor[] > org.springframework.aop.framework.AdvisedSupport.advisorArray[0] > [class=org.springframework.transaction.interceptor.BeanFactoryTransactionAttributeSourceAdvisor] > >> private org.aopalliance.aop.Advice > org.springframework.aop.support.AbstractBeanFactoryPointcutAdvisor.advice > [class=org.springframework.transaction.interceptor.TransactionInterceptor] > >> private > org.aopalliance.aop.Advice > org.springframework.aop.support.AbstractBeanFactoryPointcutAdvisor.advice[write:1] > [class=org.springframework.orm.jpa.JpaTransactionManager] > >> private > javax.persistence.EntityManagerFactory > org.springframework.orm.jpa.JpaTransactionManager.entityManagerFactory > [class=$Proxy29] > >> protected > java.lang.reflect.InvocationHandler java.lang.reflect.Proxy.h > [class=org.springframework.orm.jpa.AbstractEntityManagerFactoryBean$ManagedEntityManagerFactoryInvocationHandler] > <----- field that is not serializable > >> > >> Thank you in advance! > >> > >> Regards, > >> Martin > >> > >> > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > > For additional commands, e-mail: users-h...@wicket.apache.org > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > > For additional commands, e-mail: users-h...@wicket.apache.org > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org