We are doing the "annotation based approach" described in this link
(https://cwiki.apache.org/WICKET/spring.html).  At least, we think we are.

We get:
[6/3/13 8:26:00:907 EDT] 00000023 SystemOut     O ERROR [WebContainer : 0]
(RequestCycle.java:1521) - Could not deserialize object using
`org.apache.wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory`
object factory
java.lang.RuntimeException: Could not deserialize object using
`org.apache.wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory`
object factory
        at 
org.apache.wicket.util.lang.Objects.byteArrayToObject(Objects.java:435)
        at
org.apache.wicket.protocol.http.pagestore.AbstractPageStore.deserializePage(AbstractPageStore.java:234)
        at
org.apache.wicket.protocol.http.pagestore.DiskPageStore.getPage(DiskPageStore.java:735)
        at
org.apache.wicket.protocol.http.SecondLevelCacheSessionStore$SecondLevelCachePageMap.get(SecondLevelCacheSessionStore.java:310)
        at org.apache.wicket.Session.getPage(Session.java:779)
        at
org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRenderedPage(AbstractRequestCycleProcessor.java:458)
        at
org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:144)
        at org.apache.wicket.RequestCycle.step(RequestCycle.java:1310)
        at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1428)
        at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
        at
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:479)
        at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:312)
        at
com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
[trimmed for brevity]
Caused by: 
*java.io.InvalidClassException: gov.usdoj.afms.umc.services.LogTransService;
could not resolve class [gov.usdoj.afms.umc.services.LogTransService] when
deserializing proxy*    at
org.apache.wicket.proxy.LazyInitProxyFactory$ProxyReplacement.readResolve(LazyInitProxyFactory.java:236)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[trimmed for brevity]
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:365)
        at 
org.apache.wicket.util.lang.Objects.byteArrayToObject(Objects.java:413)
        ... 39 more

I thought this might be because that particular service is in the parent
page object and annotated there as well, but I moved it to the child class
and saw no change in behavior.  It is a hibernate service and is annotated
in the page like so:

        @SpringBean(name="LogTransService")
        private LogTransService userTransService;       

The exception happens when I go to the page, do a few things (which involve
submitting and redisplaying the page), and then hit the browser back button. 
This, as I understand it, causes wicket to deserialize the page from memory. 
But shouldn't it see the @SpringBean and re-inject a new service?

Out app object does this:
            addComponentInstantiationListener(new SpringComponentInjector(this,
ctx, true));

Ideas?



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Injecting-proxy-services-in-page-tp4659209.html
Sent from the Users forum mailing list archive at Nabble.com.

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

Reply via email to