that used to happen only if you used wicket's special serializer. it
was the default one for a little while, but is not default any longer.

-igor

On Wed, Dec 10, 2008 at 1:19 AM, David Leangen <[EMAIL PROTECTED]> wrote:
>
> I just briefly scanned your message, but this did remind me of something.
> Not sure if it's related or not...
>
> As far as I could tell from the Wicket code, for some reason proxy classes
> do not get serialized. I've been meaning to ask about this myself, as it's
> been causing me problems.
>
>
> Cheers,
> Dave
>
>
>
>> -----Original Message-----
>> From: miro [mailto:[EMAIL PROTECTED]
>> Sent: 8 December 2008 02:55
>> To: users@wicket.apache.org
>> Subject: spring proxy for my model causes notSerializable exception
>>
>>
>>
>> I am  creating a spring  proxy for my model before attaching it
>> to the form
>> and i get notserializable exception
>>
>> here is the code
>>       protected Object getproxy(){
>>               ProxyFactory factory = new ProxyFactory(new
>> ReassignGrantsOfficerDTO());
>>               factory.addAdvisor(new WorkflowMetaDataAdvisor());
>>           factory.setProxyTargetClass(true);
>>           Advised  advised=(Advised)factory.getProxy();
>>           advised.setExposeProxy(true);
>>           System.out.println(advised instanceof  WorkflowMetaData );
>>           System.out.println(advised instanceof
>> ReassignGrantsOfficerDTO );
>>           return  advised;
>>       }
>>        private class ReassignGrantsOfficerForm  extends Form{
>>
>>                public ReassignGrantsOfficerForm() {
>>                               super("reassignGrantsOfficerForm", new
>> CompoundPropertyModel(getproxy()));
>>
>>
>> here the exception
>>
>> - Error serializing object class
>> gov.hhs.acf.web.pages.auditprog.ReassignGrantsOfficerPage [object=[Page
>> class = gov.hhs.acf.web.pages.auditprog.ReassignGrantsOfficerPage, id = 3,
>> version = 0]]
>> org.apache.wicket.util.io.SerializableChecker$WicketNotSerializabl
>> eException:
>> Unable to serialize class:
>> gov.hhs.acf.dto.ReassignGrantsOfficerDTO$$EnhancerByCGLIB$$4657904b
>> Field hierarchy is:
>>   3 [class=gov.hhs.acf.web.pages.auditprog.ReassignGrantsOfficerPage,
>> path=3]
>>     private java.lang.Object org.apache.wicket.MarkupContainer.children
>> [class=[Ljava.lang.Object;]
>>       java.lang.Object org.apache.wicket.Component.data[2]
>> [class=org.apache.wicket.markup.html.WebMarkupContainer,
>> path=3:reassignGrantsOfficerContainer]
>>         private java.lang.Object
>> org.apache.wicket.MarkupContainer.children
>> [class=[Ljava.lang.Object;]
>>           private java.lang.Object
>> org.apache.wicket.MarkupContainer.children[0]
>> [class=gov.hhs.acf.web.pages.auditprog.ReassignGrantsOfficerPage$R
>> eassignGrantsOfficerForm,
>> path=3:reassignGrantsOfficerContainer:reassignGrantsOfficerForm]
>>             java.lang.Object org.apache.wicket.Component.data
>> [class=org.apache.wicket.model.CompoundPropertyModel]
>>               private java.lang.Object
>> org.apache.wicket.model.CompoundPropertyModel.target
>> [class=gov.hhs.acf.dto.ReassignGrantsOfficerDTO$$EnhancerByCGLIB$$
>> 4657904b]
>> <----- field that is not serializable
>>       at
>> org.apache.wicket.util.io.SerializableChecker.check(SerializableCh
>> ecker.java:342)
>>       at
>> org.apache.wicket.util.io.SerializableChecker.checkFields(Serializ
>> ableChecker.java:610)
>>       at
>> org.apache.wicket.util.io.SerializableChecker.check(SerializableCh
>> ecker.java:533)
>>       at
>> org.apache.wicket.util.io.SerializableChecker.checkFields(Serializ
>> ableChecker.java:610)
>>       at
>> org.apache.wicket.util.io.SerializableChecker.check(SerializableCh
>> ecker.java:533)
>>       at
>> org.apache.wicket.util.io.SerializableChecker.check(SerializableCh
>> ecker.java:388)
>>       at
>> org.apache.wicket.util.io.SerializableChecker.checkFields(Serializ
>> ableChecker.java:610)
>>       at
>> org.apache.wicket.util.io.SerializableChecker.check(SerializableCh
>> ecker.java:533)
>>       at
>> org.apache.wicket.util.io.SerializableChecker.check(SerializableCh
>> ecker.java:388)
>>       at
>> org.apache.wicket.util.io.SerializableChecker.checkFields(Serializ
>> ableChecker.java:610)
>>       at
>> org.apache.wicket.util.io.SerializableChecker.check(SerializableCh
>> ecker.java:533)
>>       at
>> org.apache.wicket.util.io.SerializableChecker.writeObjectOverride(
>> SerializableChecker.java:678)
>>       at
>> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:322)
>>       at
>> org.apache.wicket.util.io.IObjectStreamFactory$2.writeObjectOverri
>> de(IObjectStreamFactory.java:125)
>>       at
>> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:322)
>>       at
>> org.apache.wicket.util.lang.Objects.objectToByteArray(Objects.java:1091)
>>       at
>> org.apache.wicket.protocol.http.pagestore.AbstractPageStore.serial
>> izePage(AbstractPageStore.java:197)
>>       at
>> org.apache.wicket.protocol.http.pagestore.DiskPageStore.storePage(
>> DiskPageStore.java:811)
>>       at
>> org.apache.wicket.protocol.http.SecondLevelCacheSessionStore$Secon
>> dLevelCachePageMap.put(SecondLevelCacheSessionStore.java:332)
>>       at org.apache.wicket.Session.requestDetached(Session.java:1370)
>>       at org.apache.wicket.RequestCycle.detach(RequestCycle.java:1085)
>>       at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1372)
>>       at org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
>>       at
>> org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:355)
>>       at
>> org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.
>> java:124)
>>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
>>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
>>       at
>> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:502)
>>       at
>> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(Serv
>> letHandler.java:1124)
>>       at
>> org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilte
>> r(FilterChainProxy.java:264)
>>       at
>> org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFi
>> lter(HttpSessionContextIntegrationFilter.java:229)
>>       at
>> org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilte
>> r(FilterChainProxy.java:274)
>>       at
>> org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.
>> java:148)
>>       at
>> org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProx
>> y.java:98)
>>       at
>> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(Serv
>> letHandler.java:1115)
>>       at
>> org.springframework.orm.hibernate3.support.OpenSessionInViewFilter
>> .doFilterInternal(OpenSessionInViewFilter.java:198)
>>       at
>> org.springframework.web.filter.OncePerRequestFilter.doFilter(OnceP
>> erRequestFilter.java:76)
>>       at
>> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(Serv
>> letHandler.java:1115)
>>       at
>> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:361)
>>       at
>> org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.
>> java:216)
>>       at
>> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
>>       at
>> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
>>       at
>> org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:417)
>>       at
>> org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextH
>> andlerCollection.java:230)
>>       at
>> org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollecti
>> on.java:114)
>>       at
>> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
>>       at org.mortbay.jetty.Server.handle(Server.java:324)
>>       at
>> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:534)
>>       at
>> org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(Htt
>> pConnection.java:864)
>>       at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:533)
>>       at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:207)
>>       at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:403)
>>       at
>> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint
>> .java:409)
>>       at
>> org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPoo
>> l.java:499)
>> Caused by: java.io.NotSerializableException:
>> gov.hhs.acf.dto.ReassignGrantsOfficerDTO$$EnhancerByCGLIB$$4657904b
>>       at
>> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1156)
>>       at
>> java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.j
>> ava: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.j
>> ava:1509)
>>       at
>> java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:416)
>>       at org.apache.wicket.Component.writeObject(Component.java:4216)
>>       at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
>>       at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAc
>> cessorImpl.java:25)
>>       at java.lang.reflect.Method.invoke(Method.java:597)
>>       at
>> java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
>>       at
>> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1461)
>>       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.j
>> ava: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.j
>> ava: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.wicket.util.io.IObjectStreamFactory$2.writeObjectOverri
>> de(IObjectStreamFactory.java:117)
>>       ... 40 more
>>
>>
>> please help me resolve this ?
>> --
>> View this message in context:
> http://www.nabble.com/spring-proxy---for-my-model-causes-notSerializable-exc
> eption-tp20883658p20883658.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to