Figured this one out, thanks Igor.
Our pages extended from a base page that was manually injecting
services -- I'm not sure why -- so the components were getting the
proxy and pages were getting the direct instance. I fixed this and
things work perfectly now.
Thanks for your help.
On Fri, Jun 26
I'm not sure this will help - but thought I'd post how I'm configuring
Guice. I've *not* had a serialization problem in my pages.
There are several ways to configure Guice and Wicket, I am configuring Guice
as a Module. I've tried to build up the example from xml configuration to
Guice Module to D
it is wicket-guice module that wraps the service that is retrieved
from guice with a serializable proxy, not guice itself.
this module treats pages and components exactly the same way because
page IS A component. i am not sure why pages work differently for you
if you use the same @Inject annotati
But the nice thing about Guice/Wicket is that you don't have to
concern yourself with the serialization problem. And for my non-page
components, injection works perfectly. (This is because Guice injects
a *serializable* proxy not an actual instance of the service itself.
On detach/serialization, th
If this is the case then why aren't components effected?
D/
On 6/25/09 2:04 PM, "Mauro Ciancio" wrote:
On Wed, Jun 24, 2009 at 1:38 PM, Aaron Dixon wrote:
>
> org.apache.wicket.util.io.SerializableChecker$WicketNotSerializableException:
> Unable to serialize class:
> com.mycompany.dao.MyDao$
On Wed, Jun 24, 2009 at 1:38 PM, Aaron Dixon wrote:
>
> org.apache.wicket.util.io.SerializableChecker$WicketNotSerializableException:
> Unable to serialize class:
> com.mycompany.dao.MyDao$$EnhancerByGuice$$3e6e9f94
> Field hierarchy is:
> 2 [class=com.mycompany.pages.MyPage, path=2]
>privat
For what it's worth ... I use Guice injection across the entire codebase.
Pages get Services
Services get Daos
Daos get connections ... etc
I even inject utility classes as needed and can't say I've had any problems.
-Luther
On Wed, Jun 24, 2009 at 11:38 AM, Aaron Dixon wrote:
> Hello, all
Hello, all -
Guice/Wicket integration is excellent, but doesn't seem to work properly
when I use @Inject-ed services on my *page* classes. It only seems to work
when I inject services on components of my pages. I get
WicketNotSerializableExceptions for services that I inject on my page class
insta