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/03/08 16:36:14 UTC

Session expired drives me mad!

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


RE: Session expired drives me mad!

Posted by Martin Asenov <mA...@velti.com>.
Thank you all for the help!

-----Original Message-----
From: Sigmar Muuga [mailto:meediake@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
<jc...@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 <mA...@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: cemal@jweekend.com [mailto:cemal@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 <mA...@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-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
> >
> >
>
> ---------------------------------------------------------------------
> 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: Session expired drives me mad!

Posted by Sigmar Muuga <me...@gmail.com>.
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
<jc...@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 <mA...@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: cemal@jweekend.com [mailto:cemal@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 <mA...@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-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
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: Session expired drives me mad!

Posted by James Carman <jc...@carmanconsulting.com>.
No, you need to use the @SpringBean annotation:

http://cwiki.apache.org/WICKET/spring.html#Spring-AnnotationbasedApproach


2010/3/8 Martin Asenov <mA...@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: cemal@jweekend.com [mailto:cemal@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 <mA...@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-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
>
>

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


Re: Session expired drives me mad!

Posted by Tomasz Dziurko <td...@gmail.com>.
Check this one:
http://cwiki.apache.org/WICKET/spring.html , especially paragraph
Annotation-based Approach

Regards
-- 
Tomasz Dziurko

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


RE: Session expired drives me mad!

Posted by Martin Asenov <mA...@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: cemal@jweekend.com [mailto:cemal@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 <mA...@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-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: Session expired drives me mad!

Posted by Cemal Bayramoglu <jW...@cabouge.com>.
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 <mA...@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-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


RE: Session expired drives me mad!

Posted by Martin Asenov <mA...@velti.com>.
Well I did see it, but not in that deep detail like this...

Regards,
Martin

-----Original Message-----
From: Martin Grigorov [mailto:mcgregory@e-card.bg] 
Sent: Monday, March 08, 2010 6:25 PM
To: users@wicket.apache.org
Subject: Re: Session expired drives me mad!

On Mon, 2010-03-08 at 17:36 +0200, Martin Asenov wrote:
> 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]]
This is an ERROR! 
You had to see it long time before enabling DEBUG. 
Unless you disable everything but FATALs.
>    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-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: Session expired drives me mad!

Posted by Martin Grigorov <mc...@e-card.bg>.
On Mon, 2010-03-08 at 17:36 +0200, Martin Asenov wrote:
> 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]]
This is an ERROR! 
You had to see it long time before enabling DEBUG. 
Unless you disable everything but FATALs.
>    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-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Session expired drives me mad!

Posted by Ilja Pavkovic <il...@binaere-bauten.de>.
Hi,

> 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$WicketNotSerializableExcepti
> on: Unable to serialize class:
> org.springframework.orm.jpa.AbstractEntityManagerFactoryBean$ManagedEntity
> ManagerFactoryInvocationHandler 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]
Wicket (or better: your model implementations) should not serialize your 
entity objects. They are managed by spring orm, therefore use a specialized 
LoadableDetachableModel in MyFormPanel that dynamically load your objects if 
needed.

Best Regards,
	Ilja Pavkovic

-- 
binaere bauten gmbh · tempelhofer ufer 1a · 10961 berlin

   +49 · 171 · 9342 465

Handelsregister: HRB 115854 - Amtsgericht Charlottenburg
Geschäftsführer: Dipl.-Inform. Ilja Pavkovic, Dipl.-Inform. Jost Becker

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


Re: Session expired drives me mad!

Posted by James Carman <jc...@carmanconsulting.com>.
Are you using @SpringBean?

2010/3/8 Martin Asenov <mA...@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-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org