You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by leok <le...@gmail.com> on 2007/09/06 15:23:54 UTC

@SpringBean and serialization checker

Hi,

I'm using the @SpringBean + SpringComponentInjector to inject daos in my
Wicket web pages. With Wicket 1.3b3, I'm noticing the following exception in
my Tomcat (v6.0.13) logs:

org.apache.wicket.util.io.SerializableChecker$WicketNotSerializableException:
Unable to serialize class: org.apache.commons.dbcp.BasicDataSource 

This exception occurs randomly and emerges from different page objects while
browsing my webapp (probably SecondLevelSessionCache behavior?) and, if
session persistence is enabled, at app shutdown. Nowhere in my application
am I using the BasicDataSource class explicitly except in my beans.xml
datasource configuration. 

My understanding was that a LazyInitProxyFactory would be serialized in
place of the dao if the @SpringBean annotation were used. The page in which
this occurred has a single "@SpringBean private MyDao myDao;" member field
in it. I have no daos -- injected or otherwise -- in my WebSession
instances.

Is there some other configuration issue I'm missing? Or is this expected
behavior? I'm relatively new to Spring and Wicket so the former is likely
possible.

Thanks!
leo

-- 
View this message in context: http://www.nabble.com/%40SpringBean-and-serialization-checker-tf4392171.html#a12522589
Sent from the Wicket - User mailing list archive at Nabble.com.


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


Re: @SpringBean and serialization checker

Posted by Johan Compagner <jc...@gmail.com>.
the custom serialization is already off by default for quite some time
the
org.apache.wicket.util.io.SerializableChecker$WicketNotSerializableException:
only kicks in (so also for the default) when an IOException happens with
writeObject
So that you get a nice trace which field it exactly is of what object.

johan




On 9/6/07, Igor Vaynberg <ig...@gmail.com> wrote:
>
> i dont think our custom serialization works right with proxies yet is the
> thing
>
> -igor
>
>
> On 9/6/07, leok <le...@gmail.com> wrote:
> >
> >
> > It's a little hard for me to tear out all the @SpringBean declarations
> in
> > my
> > webapp. I could try using the standard serialization method you speak of
> > and
> > monitor the behavior. It seemed a little strange that this Exception
> would
> > pop up with such a basic config so I figured that I was missing
> something.
> >
> >
> > igor.vaynberg wrote:
> > >
> > > so if you remove @SpringBean dao the errors go away?
> > >
> > > it def shouldnt be happening, maybe its a problem in wicket's custom
> > > serialization. there is a way to make wicket use standard
> > > serialization...cant remember off the top of my head right now...
> > >
> > > -igor
> > >
> > > On 9/6/07, leok <le...@gmail.com> wrote:
> > >>
> > >>
> > >> Hi,
> > >>
> > >> I'm using the @SpringBean + SpringComponentInjector to inject daos in
> > my
> > >> Wicket web pages. With Wicket 1.3b3, I'm noticing the following
> > exception
> > >> in
> > >> my Tomcat (v6.0.13) logs:
> > >>
> > >>
> > >>
> >
> org.apache.wicket.util.io.SerializableChecker$WicketNotSerializableException:
> > >> Unable to serialize class: org.apache.commons.dbcp.BasicDataSource
> > >>
> > >> This exception occurs randomly and emerges from different page
> objects
> > >> while
> > >> browsing my webapp (probably SecondLevelSessionCache behavior?) and,
> if
> > >> session persistence is enabled, at app shutdown. Nowhere in my
> > >> application
> > >> am I using the BasicDataSource class explicitly except in my
> beans.xml
> > >> datasource configuration.
> > >>
> > >> My understanding was that a LazyInitProxyFactory would be serialized
> in
> > >> place of the dao if the @SpringBean annotation were used. The page in
> > >> which
> > >> this occurred has a single "@SpringBean private MyDao myDao;" member
> > >> field
> > >> in it. I have no daos -- injected or otherwise -- in my WebSession
> > >> instances.
> > >>
> > >> Is there some other configuration issue I'm missing? Or is this
> > expected
> > >> behavior? I'm relatively new to Spring and Wicket so the former is
> > likely
> > >> possible.
> > >>
> > >> Thanks!
> > >> leo
> > >>
> > >> --
> > >> View this message in context:
> > >>
> >
> http://www.nabble.com/%40SpringBean-and-serialization-checker-tf4392171.html#a12522589
> > >> Sent from the Wicket - User mailing list archive at Nabble.com.
> > >>
> > >>
> > >> ---------------------------------------------------------------------
> > >> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > >> For additional commands, e-mail: users-help@wicket.apache.org
> > >>
> > >>
> > >
> > >
> >
> > --
> > View this message in context:
> >
> http://www.nabble.com/%40SpringBean-and-serialization-checker-tf4392171.html#a12524903
> > Sent from the Wicket - User mailing list archive at Nabble.com.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
>

Re: @SpringBean and serialization checker

Posted by Igor Vaynberg <ig...@gmail.com>.
i dont think our custom serialization works right with proxies yet is the
thing

-igor


On 9/6/07, leok <le...@gmail.com> wrote:
>
>
> It's a little hard for me to tear out all the @SpringBean declarations in
> my
> webapp. I could try using the standard serialization method you speak of
> and
> monitor the behavior. It seemed a little strange that this Exception would
> pop up with such a basic config so I figured that I was missing something.
>
>
> igor.vaynberg wrote:
> >
> > so if you remove @SpringBean dao the errors go away?
> >
> > it def shouldnt be happening, maybe its a problem in wicket's custom
> > serialization. there is a way to make wicket use standard
> > serialization...cant remember off the top of my head right now...
> >
> > -igor
> >
> > On 9/6/07, leok <le...@gmail.com> wrote:
> >>
> >>
> >> Hi,
> >>
> >> I'm using the @SpringBean + SpringComponentInjector to inject daos in
> my
> >> Wicket web pages. With Wicket 1.3b3, I'm noticing the following
> exception
> >> in
> >> my Tomcat (v6.0.13) logs:
> >>
> >>
> >>
> org.apache.wicket.util.io.SerializableChecker$WicketNotSerializableException:
> >> Unable to serialize class: org.apache.commons.dbcp.BasicDataSource
> >>
> >> This exception occurs randomly and emerges from different page objects
> >> while
> >> browsing my webapp (probably SecondLevelSessionCache behavior?) and, if
> >> session persistence is enabled, at app shutdown. Nowhere in my
> >> application
> >> am I using the BasicDataSource class explicitly except in my beans.xml
> >> datasource configuration.
> >>
> >> My understanding was that a LazyInitProxyFactory would be serialized in
> >> place of the dao if the @SpringBean annotation were used. The page in
> >> which
> >> this occurred has a single "@SpringBean private MyDao myDao;" member
> >> field
> >> in it. I have no daos -- injected or otherwise -- in my WebSession
> >> instances.
> >>
> >> Is there some other configuration issue I'm missing? Or is this
> expected
> >> behavior? I'm relatively new to Spring and Wicket so the former is
> likely
> >> possible.
> >>
> >> Thanks!
> >> leo
> >>
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/%40SpringBean-and-serialization-checker-tf4392171.html#a12522589
> >> Sent from the Wicket - User mailing list archive at Nabble.com.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> >> For additional commands, e-mail: users-help@wicket.apache.org
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/%40SpringBean-and-serialization-checker-tf4392171.html#a12524903
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: @SpringBean and serialization checker

Posted by leok <le...@gmail.com>.
It's a little hard for me to tear out all the @SpringBean declarations in my
webapp. I could try using the standard serialization method you speak of and
monitor the behavior. It seemed a little strange that this Exception would
pop up with such a basic config so I figured that I was missing something. 


igor.vaynberg wrote:
> 
> so if you remove @SpringBean dao the errors go away?
> 
> it def shouldnt be happening, maybe its a problem in wicket's custom
> serialization. there is a way to make wicket use standard
> serialization...cant remember off the top of my head right now...
> 
> -igor
> 
> On 9/6/07, leok <le...@gmail.com> wrote:
>>
>>
>> Hi,
>>
>> I'm using the @SpringBean + SpringComponentInjector to inject daos in my
>> Wicket web pages. With Wicket 1.3b3, I'm noticing the following exception
>> in
>> my Tomcat (v6.0.13) logs:
>>
>>
>> org.apache.wicket.util.io.SerializableChecker$WicketNotSerializableException:
>> Unable to serialize class: org.apache.commons.dbcp.BasicDataSource
>>
>> This exception occurs randomly and emerges from different page objects
>> while
>> browsing my webapp (probably SecondLevelSessionCache behavior?) and, if
>> session persistence is enabled, at app shutdown. Nowhere in my
>> application
>> am I using the BasicDataSource class explicitly except in my beans.xml
>> datasource configuration.
>>
>> My understanding was that a LazyInitProxyFactory would be serialized in
>> place of the dao if the @SpringBean annotation were used. The page in
>> which
>> this occurred has a single "@SpringBean private MyDao myDao;" member
>> field
>> in it. I have no daos -- injected or otherwise -- in my WebSession
>> instances.
>>
>> Is there some other configuration issue I'm missing? Or is this expected
>> behavior? I'm relatively new to Spring and Wicket so the former is likely
>> possible.
>>
>> Thanks!
>> leo
>>
>> --
>> View this message in context:
>> http://www.nabble.com/%40SpringBean-and-serialization-checker-tf4392171.html#a12522589
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/%40SpringBean-and-serialization-checker-tf4392171.html#a12524903
Sent from the Wicket - User mailing list archive at Nabble.com.


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


Re: @SpringBean and serialization checker

Posted by Igor Vaynberg <ig...@gmail.com>.
so if you remove @SpringBean dao the errors go away?

it def shouldnt be happening, maybe its a problem in wicket's custom
serialization. there is a way to make wicket use standard
serialization...cant remember off the top of my head right now...

-igor

On 9/6/07, leok <le...@gmail.com> wrote:
>
>
> Hi,
>
> I'm using the @SpringBean + SpringComponentInjector to inject daos in my
> Wicket web pages. With Wicket 1.3b3, I'm noticing the following exception
> in
> my Tomcat (v6.0.13) logs:
>
>
> org.apache.wicket.util.io.SerializableChecker$WicketNotSerializableException:
> Unable to serialize class: org.apache.commons.dbcp.BasicDataSource
>
> This exception occurs randomly and emerges from different page objects
> while
> browsing my webapp (probably SecondLevelSessionCache behavior?) and, if
> session persistence is enabled, at app shutdown. Nowhere in my application
> am I using the BasicDataSource class explicitly except in my beans.xml
> datasource configuration.
>
> My understanding was that a LazyInitProxyFactory would be serialized in
> place of the dao if the @SpringBean annotation were used. The page in
> which
> this occurred has a single "@SpringBean private MyDao myDao;" member field
> in it. I have no daos -- injected or otherwise -- in my WebSession
> instances.
>
> Is there some other configuration issue I'm missing? Or is this expected
> behavior? I'm relatively new to Spring and Wicket so the former is likely
> possible.
>
> Thanks!
> leo
>
> --
> View this message in context:
> http://www.nabble.com/%40SpringBean-and-serialization-checker-tf4392171.html#a12522589
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>