Skip to content

Provide ability to make aop:scoped-proxy prototypes and singletons truely serializable [SPR-2121] #6812

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
spring-projects-issues opened this issue Jun 9, 2006 · 10 comments
Assignees
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

spring-projects-issues commented Jun 9, 2006

Mike Youngstrom opened SPR-2121 and commented

It would be nice if there were a way to make singleton and prototype scoped-proxies truely serializable where if the proxy is serialized the target is retrieved from a BeanFactory instead of being serialized with the proxy (similar to how request and session scoped-proxies work).

I believe the complexity of this functionality is in the locating of a BeanFactory when it is unserialized. Rather than providing some way for the correct BeanFactory to always magically be found all I'm looking for is perhaps some way for the application writer to provide hints about where to find the current bean factory though the use of a BeanFactoryLocator or if the application writer figured the bean would only be used in a web context they chould use the WebApplicationContextUtils to obtain the current BeanFactory. Something like that.

I was thinking of modifying creating a new target source similar to AbstractBeanFactoryBasedTargetSource that took a BeanFactoryLocator instead of a BeanFactory and modify the scope utilities to optionally provide a BeanFactoryLocator. Would something like that work? I'm more than happy to create a patch if I thought I was heading down the right direction and that my patch would eventually be accepted.

Mike


Affects: 2.0 M5

Issue Links:

5 votes, 9 watchers

@spring-projects-issues
Copy link
Collaborator Author

Davide Baroncelli commented

Has anything been done in this regard? I think something similar has been built by the wicket-spring project: since wicket serializes the pages, all injected objects would be lost. They have built a proxying mechanism so that the pages actually get a proxy which is able to get the actual bean out of the factory upon deserialization. I believe a "standard Spring" solution to this problem would be great!

@spring-projects-issues
Copy link
Collaborator Author

Mike Youngstrom commented

It is unfortunate that this has slipped to 3.1. I believe springs inability to address injection into serializable beans is a rather major shortcoming of Spring today. This is compounded with the fact that this is not a problem for several competing frameworks. Most notably:

Guice has its "Provider" injection pattern.
Seam uses interceptor based injection (which sucks but does avoid this problem)
WebBeans will use a scoped adapter/proxy concept

Spring Webflow itself adds a few new scopes that should be serializable. Any scope that could serialize a bean currently cannot have anything injected into it (except possibly beans of the same scope). That is a huge limitation IMHO. I hope you can reconsider this functionality for Spring 3.0 as this is currently a major spring pain point for my organization.

Mike

@spring-projects-issues
Copy link
Collaborator Author

Juergen Hoeller commented

This is finally making its way into Spring 3.0 now! We are storing a serialization id only for any DefaultListableBeanFactory being serialized, when running within an ApplicationContext... This id is equivalent to the ApplicationContext's id (as configurable via the setId method).

This solves a large group of problems: Not only are scoped proxies generally serializable now; the aop:scoped-proxy element gets a proper use for singletons as well, defining a serialization reference for that target singleton. Also, any beans that are BeanFactoryAware can be serializable now as well.

In terms of static state cleanup, we register a BeanFactory by id only for an ApplicationContext, and deregister it when the ApplicationContext shuts down. Furthermore, the BeanFactory is registered using a weak reference, for cases where an ApplicationContext instance is simply left to the garbage collector.

Juergen

@spring-projects-issues
Copy link
Collaborator Author

Mike Youngstrom commented

Excellent!!!! I cannot wait to try it out deprecate my custom solution.

Mike

@spring-projects-issues
Copy link
Collaborator Author

Andreas Petersson commented

i just tried this out with spring 3 RC1. unfortunately it does not seem to work out-of the box.
in the class KontaktverwaltungBean (session-scoped, serializable) we hold a reference to KundenDao (singleton scoped, not serializable).
in appCont.xml KundenDao is defined as

<bean id="kundenDao" class="at.co.mbi.evolution.mbi.kunde.dao.KundenDao">
	<aop:scoped-proxy/>
	<property name="sessionFactory">
		<ref local="sessionFactory"/>
	</property>
</bean>

without the aop:scoped proxy config, serialization fails earlier with the following stacktrace:

Cannot serialize session attribute KontaktverwaltungBean for session 2CE927F2B35173DA239969DD388F2E77
java.io.NotSerializableException: at.co.mbi.evolution.mbi.kunde.dao.KundenDao

  • field (class "at.co.mbi.evolution.mbi.klient.KontaktverwaltungBean", name: "kundenDao", type: "class at.co.mbi.evolution.mbi.kunde.dao.KundenDao")
  • root object (class "at.co.mbi.evolution.mbi.klient.KontaktverwaltungBean", at.co.mbi.evolution.mbi.klient.KontaktverwaltungBean@25c6e8)
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1153)
    at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)
    at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474)
    at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
    at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
    at org.apache.catalina.session.StandardSession.writeObject(StandardSession.java:1478)
    at org.apache.catalina.session.StandardSession.writeObjectData(StandardSession.java:948)
    at org.apache.catalina.session.StandardManager.doUnload(StandardManager.java:517)
    ...

with aop:scoped-proxy enabled KundenDao proxy starts to serialize itself, but fails in DefaultListableBeanFactory which holds a field autowireCandidateResolver to an instance of QualifierAnnotationAutowireCandidateResolver

is it correct that serialization should look that deep into spring? for me it looks like a bug in handling the proxys.

Cannot serialize session attribute KundenSucheController for session 44479BC944988DB073B725FE428E6950
java.io.NotSerializableException: org.springframework.beans.factory.annotation.QualifierAnnotationAutowireCandidateResolver

  • field (class "org.springframework.beans.factory.support.DefaultListableBeanFactory", name: "autowireCandidateResolver", type: "interface org.springframework.beans.factory.support.AutowireCandidateResolver")
  • object (class "org.springframework.beans.factory.support.DefaultListableBeanFactory", org.springframework.beans.factory.support.DefaultListableBeanFactory@3813c: defining beans [webappContextResourceLoader,menuUtil,........]; root of factory hierarchy)
  • field (class "org.springframework.aop.scope.DefaultScopedObject", name: "beanFactory", type: "interface org.springframework.beans.factory.config.ConfigurableBeanFactory")
  • object (class "org.springframework.aop.scope.DefaultScopedObject", org.springframework.aop.scope.DefaultScopedObject@a866d6)
  • field (class "org.springframework.aop.support.DelegatingIntroductionInterceptor", name: "delegate", type: "class java.lang.Object")
  • object (class "org.springframework.aop.support.DelegatingIntroductionInterceptor", org.springframework.aop.support.DelegatingIntroductionInterceptor@1938132)
  • field (class "org.springframework.aop.support.DefaultIntroductionAdvisor", name: "advice", type: "interface org.aopalliance.aop.Advice")
  • object (class "org.springframework.aop.support.DefaultIntroductionAdvisor", DefaultIntroductionAdvisor: advice [org.springframework.aop.support.DelegatingIntroductionInterceptor@1938132]; interfaces [org.springframework.aop.scope.ScopedObject, java.io.Serializable])
  • element of array (index: 0)
  • array (class "[Lorg.springframework.aop.Advisor;", size: 1)
  • field (class "org.springframework.aop.framework.AdvisedSupport", name: "advisorArray", type: "class [Lorg.springframework.aop.Advisor;")
  • object (class "org.springframework.aop.framework.ProxyFactory", org.springframework.aop.framework.ProxyFactory: 3 interfaces [org.springframework.aop.scope.ScopedObject, java.io.Serializable, org.springframework.aop.framework.AopInfrastructureBean]; 1 advisors [DefaultIntroductionAdvisor: advice [org.springframework.aop.support.DelegatingIntroductionInterceptor@1938132]; interfaces [org.springframework.aop.scope.ScopedObject, java.io.Serializable]]; targetSource [SimpleBeanTargetSource for target bean 'scopedTarget.kundenDao' of type [at.co.mbi.evolution.mbi.kunde.dao.KundenDao]]; proxyTargetClass=true; optimize=false; opaque=false; exposeProxy=false; frozen=false)
  • field (class "org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor", name: "advised", type: "class org.springframework.aop.framework.AdvisedSupport")
  • object (class "org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor", org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor@4b8be6)
  • field (class "at.co.mbi.evolution.mbi.kunde.dao.KundenDao$$EnhancerByCGLIB$$22dabae6", name: "CGLIB$CALLBACK_0", type: "interface net.sf.cglib.proxy.MethodInterceptor")
  • object (class "at.co.mbi.evolution.mbi.kunde.dao.KundenDao$$EnhancerByCGLIB$$22dabae6", at.co.mbi.evolution.mbi.kunde.dao.KundenDao@8b61a3)
  • field (class "at.co.mbi.evolution.mbi.klient.KontaktverwaltungBean", name: "kundenDao", type: "class at.co.mbi.evolution.mbi.kunde.dao.KundenDao")
  • object (class "at.co.mbi.evolution.mbi.klient.KontaktverwaltungBean", at.co.mbi.evolution.mbi.klient.KontaktverwaltungBean@29f594)
  • field (class "at.co.mbi.evolution.mbi.kunde.beans.GotoKundeBean", name: "kontaktverwaltungBean", type: "class at.co.mbi.evolution.mbi.klient.KontaktverwaltungBean")
  • object (class "at.co.mbi.evolution.mbi.kunde.beans.GotoKundeBean", at.co.mbi.evolution.mbi.kunde.beans.GotoKundeBean@50c91f)
  • field (class "at.co.mbi.evolution.mbi.kunde.beans.KundenSucheControllerBean", name: "gotoKundeBean", type: "class at.co.mbi.evolution.mbi.kunde.beans.GotoKundeBean")
  • root object (class "at.co.mbi.evolution.mbi.kunde.beans.KundenSucheControllerBean", at.co.mbi.evolution.mbi.kunde.beans.KundenSucheControllerBean@68ef2)
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1153)
    at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)
    at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474)
    at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
    at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)
    at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474)
    at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
    at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)
    at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474)
    at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
    at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)
    at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474)
    at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
    at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338)
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1146)
    at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)
    at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474)
    at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
    at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)
    at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474)
    at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
    at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)
    at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474)
    at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
    at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)
    at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474)
    at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
    at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)
    at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474)
    at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
    at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)
    at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474)
    at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
    at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
    at org.apache.catalina.session.StandardSession.writeObject(StandardSession.java:1478)

@spring-projects-issues
Copy link
Collaborator Author

Andreas Petersson commented

the above output was generated with -Dsun.io.serialization.extendedDebugInfo=true

@spring-projects-issues
Copy link
Collaborator Author

Andreas Petersson commented

i just tried this out with interfaces only + JDK-proxies, with a slightly different output but the same result.

settings:

<bean id="kundenDao" class="at.co.mbi.evolution.mbi.kunde.dao.KundenDaoImpl">
	<aop:scoped-proxy proxy-target-class="false"/>
	<property name="sessionFactory">
		<ref local="sessionFactory"/>
	</property>
</bean>

stacktrace:
java.io.NotSerializableException: org.springframework.beans.factory.support.SimpleAutowireCandidateResolver

  • field (class "org.springframework.beans.factory.support.DefaultListableBeanFactory", name: "autowireCandidateResolver", type: "interface org.springframework.beans.factory.support.AutowireCandidateResolver")
  • object (class "org.springframework.beans.factory.xml.XmlBeanFactory", org.springframework.beans.factory.xml.XmlBeanFactory@1fd360b: defining beans [webappContextResourceLoader,menuUtil,klientAktivitaetHelper,KlientendatenBean,KlientenDetailBean,KontaktverwaltungBean,GotoKundeBean,SimpleKundenSuche,AdvancedKundenSuche,KundenSucheController,PrivateBrokerStrukturBean,TranslateAssistBean,MyReportsBean,IntAbrechBean,ErrorBean,InterventionFeedbackBean,TeamControllingBean,InterventionBean,ServiceKontrollListeBean,KlientensucheBean,LocaleManager,PerformanceBean,TeamuebersichtBean,ProdMonatBean,WelcomeLetterBean,KlientendetailInterceptorBean,VertragDetailBean,VertraghistorieBean,miniSearchAktivitaet,miniSearchFactsheet,aktivitaetBean,AnhangNotizAttachmentBean,PlanstellenZuordnungBean,BestandUploadBean,PlanstellenZuordnungPbBean,PlanstellenDetailBean,PipelineBean,PipelineFeedbackBean,BestandSucheBean,TerminBean,wellbehavingExecutor,TerminverwaltungBean,terminverwaltungDataBean,IcalBean,GeburtstagslisteBean,GeburtstagslisteDetailBean,InterventionHomeBean,BbfkListBean,AblaeuferBean,AblaeuferDetailBean,UnbetreuteKlientenBean,UnbetreuteKlientenDetailBean,SettingsBean,BecomeUserBean,MissingTranslateBean,ActiveSessionsBean,StatistikBean,statistikDataBean,TeamwochenplanBean,teamwochenplanDataBean,EingabesperreBean,TerminverwaltungInterceptorBean,KlientensuchePopupBean,TranslateMaskeBean,AktivitaetInterceptorBean,AreaSucheBean,NachrichtPopupInterceptorBean,NachrichtPopupBean,TerminFeedbackBean,InterventionFilesBean,InterventionFilesInterceptorBean,SyncKategorisierungBean,TeamwochenplanInterceptorBean,StatistikInterceptorBean,TarifKategorienBean,inputStreamFromHttp,TarifSucheBean,TarifProvisionEingangBean,TarifProvisionAusgangBean,OnlineBean,OnlineDetailBean,BbfkUebersichtBean,BbfkDetailBean,BbfkDetailstatistikPopupBean,DoppelteKlientenMeldenBean,DoppelteKlientenMergeBean,FsUebersichtBean,TeamFsBean,TeamFsBeanCopy,fsErstellenEnricher,aktivitaetEnricher,FsErstellenBean,StammdatenAktualisierungBean,SmsPopupBean,StammdatenInformationBean,StammdatenAktivierungBean,FreigabelisteBean,FreigabedetailBean,RechteUebersichtBean,RechtDetailBean,RechtezuordnungBean,RechtevergabeUserBean,RechtevergabeUserInterceptorBean,RechteKopierenUserBean,RechteKopierenUserInterceptorBean,RechtVonUsernBean,PbLizenzBean,PbLizenzInterceptorBean,ZertifikatDruckBean,tlb,ReportBean,NutzungsbedingungenBean,PasswordForgetBean,ReloadBean,TarifErfassungBean,TarifDetailBean,TarifUebersichtBean,htmlTemplateUtil,searchStringClassificator,reloadManager,scopedTarget.kundenDao,kundenDao,myReportsLogDao,queryUtil,translateAssister,profiler,sessionLister,interventionStatistikDao,profilerList,actionStatistics,userBean,perfRendererStyleBean,intAbrechDao,oracleDataSource,queryDataSource,scDataSource,sessionFactory,abrechnungSperreLoader,checkAbrechnungSperreJobDetailBean,checkAbrechnungsSperreCronTrigger,checkSessionsJob,checkSessionsCronTrigger,nonclusteredScheduler,clusteredScheduler,myJobFactory,klientJobBean,evolution:type=HibernateStatistics,jmxExporter,partnerDAO,produktDAO,berufDAO,titelDAO,intcodeDAO,intergebnisDAO,vplanstellenplzjspDAO,cmspageDAO,klientAktivitaetDAO,klientAnhangDAO,pipelineDAO,bestandSucheDAO,lookupsDAO,callReportDao,prodmonatDAO,vertragDAO,interventionFallDao,interventionDAO,settingsDAO,klientDAO,klientAktivitaetAnhangDAO,geburtstagslisteDAO,interventionBenachrichtigungDAO,di1FunctionsDAO,passwortDAO,da1FunctionsDAO,mbiFunctionsDAO,webnotizDAO,bpLizenzDAO,cmsoldsearchDAO,webtraceDAO,printqueueDAO,vPrintJobsJspDAO,strukturDAO,laendercodeDAO,cmstemplateDAO,seminarDAO,gewerbescheinDAO,mitarbeiterDao,ablaeuferDAO,teamwochenplanDAO,unbetreuteKlientenDAO,smscontactsDAO,smsgroupsDAO,smsSendDao,scriptRunner,databaseUpgradeScripts,evoDeployedScriptsDAO,statistikDAO,abrechDAO,benutzerDAO,onlineDao,translateDao,interventionFilesDao,synckategorisierungDao,facesDao,tarifAusgangDAO,tarifEingangDAO,personDAO,personCoreDAO,errorHandlingDAO,vSprachenMergedDAO,userInfoDAO,welcomeLetterLogDao,fsJdbcDAO,fsHibernateDAO,rechteJdbcDAO,rechteHibernateDAO,userInfoWartungDao,mitarbeiterPictureDao,mitarbeiterKorrespondenzDao,zertifikatJdbcDAO,strukturPosTableCellRenderer,beschaeftigungsartenDAO,interventionsFeedbackDetailDao,interventionsFeedbackNoteDao,interventionsFeedbackVertragDao,intfbErgebnisseDao,intfbUebermittlungsartenDao,intfbFilesDao,intfbFeedbackDao,intfbFeedbackNkDao,connDumper,missingTopTen,planstellenDAO,planstelleDao,webArtifactsContainer,errorCollector,reportDao,languageContainer,nutzungsbedingungenDao,evoEnvironment]; root of factory hierarchy)
  • field (class "org.springframework.aop.scope.DefaultScopedObject", name: "beanFactory", type: "interface org.springframework.beans.factory.config.ConfigurableBeanFactory")
  • object (class "org.springframework.aop.scope.DefaultScopedObject", org.springframework.aop.scope.DefaultScopedObject@1342f5b)
  • field (class "org.springframework.aop.support.DelegatingIntroductionInterceptor", name: "delegate", type: "class java.lang.Object")
  • object (class "org.springframework.aop.support.DelegatingIntroductionInterceptor", org.springframework.aop.support.DelegatingIntroductionInterceptor@1a8e53c)
  • field (class "org.springframework.aop.support.DefaultIntroductionAdvisor", name: "advice", type: "interface org.aopalliance.aop.Advice")
  • object (class "org.springframework.aop.support.DefaultIntroductionAdvisor", DefaultIntroductionAdvisor: advice [org.springframework.aop.support.DelegatingIntroductionInterceptor@1a8e53c]; interfaces [java.io.Serializable, org.springframework.aop.scope.ScopedObject])
  • element of array (index: 0)
  • array (class "[Lorg.springframework.aop.Advisor;", size: 1)
  • field (class "org.springframework.aop.framework.AdvisedSupport", name: "advisorArray", type: "class [Lorg.springframework.aop.Advisor;")
  • object (class "org.springframework.aop.framework.ProxyFactory", org.springframework.aop.framework.ProxyFactory: 6 interfaces [at.co.mbi.evolution.mbi.kunde.dao.KundenDao, at.co.mbi.evolution.framework.model.dao.GenericDAO, org.springframework.beans.factory.InitializingBean, java.io.Serializable, org.springframework.aop.scope.ScopedObject, org.springframework.aop.framework.AopInfrastructureBean]; 1 advisors [DefaultIntroductionAdvisor: advice [org.springframework.aop.support.DelegatingIntroductionInterceptor@1a8e53c]; interfaces [java.io.Serializable, org.springframework.aop.scope.ScopedObject]]; targetSource [SimpleBeanTargetSource for target bean 'scopedTarget.kundenDao']; proxyTargetClass=false; optimize=false; opaque=false; exposeProxy=false; frozen=false)
  • field (class "org.springframework.aop.framework.JdkDynamicAopProxy", name: "advised", type: "class org.springframework.aop.framework.AdvisedSupport")
  • object (class "org.springframework.aop.framework.JdkDynamicAopProxy", org.springframework.aop.framework.JdkDynamicAopProxy@433bb52e)
  • field (class "java.lang.reflect.Proxy", name: "h", type: "interface java.lang.reflect.InvocationHandler")
  • root object (class "$Proxy0", at.co.mbi.evolution.mbi.kunde.dao.KundenDaoImpl@cd927d)
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1153)

@spring-projects-issues
Copy link
Collaborator Author

RSKB commented

I have a bean declared as below :

<bean id="sessionBean" class="com.test.SessionBean" scope="session">
<aop:scoped-proxy/>
</bean>

I see following errors written to SystemOut logs.

Miscellaneous data: Attribute "org.springframework.web.context.request.ServletRequestAttributes.DESTRUCTION_CALLBACK.scopedTarget"
is declared to be serializable but is found to generate exception "java.io.NotSerializableException" with message Fix the application so that the attribute
"org.springframework.web.context.request.ServletRequestAttributes.DESTRUCTION_CALLBACK.scopedTarget"
is correctly serializable at runtime.

@spring-projects-issues
Copy link
Collaborator Author

RSKB commented

I have a bean declared as below :

<bean id="sessionBean" class="com.test.SessionBean" scope="session">
<aop:scoped-proxy/>
</bean>

I see following errors written to SystemOut logs.

Miscellaneous data: Attribute "org.springframework.web.context.request.ServletRequestAttributes.DESTRUCTION_CALLBACK.scopedTarget"
is declared to be serializable but is found to generate exception "java.io.NotSerializableException" with message Fix the application so that the attribute
"org.springframework.web.context.request.ServletRequestAttributes.DESTRUCTION_CALLBACK.scopedTarget"
is correctly serializable at runtime.

@spring-projects-issues
Copy link
Collaborator Author

Chris Beams commented

@RSKB, please open a new issue about this problem and mention this issue ID when doing so. Also please consider submitting a reproduction issue to speed up the process. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants