Re: Session expired drives me mad!

2010-03-08 Thread Cemal Bayramoglu
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 
 

Re: Session expired drives me mad!

2010-03-08 Thread James Carman
Are you using @SpringBean?

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 

RE: Session expired drives me mad!

2010-03-08 Thread Martin Asenov
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

Re: Session expired drives me mad!

2010-03-08 Thread James Carman
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

Re: Session expired drives me mad!

2010-03-08 Thread Ilja Pavkovic
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-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Session expired drives me mad!

2010-03-08 Thread Tomasz Dziurko
Check this one:
http://cwiki.apache.org/WICKET/spring.html , especially paragraph
Annotation-based Approach

Regards
-- 
Tomasz Dziurko

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



Re: Session expired drives me mad!

2010-03-08 Thread Sigmar Muuga
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.comwrote:

 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

RE: Session expired drives me mad!

2010-03-08 Thread Martin Asenov
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.comwrote:

 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

Re: Session expired drives me mad!

2010-03-08 Thread Martin Grigorov
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
 




RE: Session expired drives me mad!

2010-03-08 Thread Martin Asenov
Well I did see it, but not in that deep detail like this...

Regards,
Martin

-Original Message-
From: Martin Grigorov [mailto:mcgreg...@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