You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by mfs <fa...@gmail.com> on 2007/12/14 00:52:12 UTC

Getting Error "Field not serializable" on one of the constructor attrib ?

Guys,

Not sure why, but wicket is giving me an error "Field that is not
serializable" on one of constructor attributes (of a panel) which is an
implementation to an interface...i wonder why is that ? The attribute is not
used as a model or anything its just a serviceHandler which i am passing to
the page-component.

Error log
----

            private final org.xyz.login.api.I_LoginService
org.xyz.login.web.LoginPane
l$1.val$loginServiceHandler [class=org.xyz.service.LoginService] <-----
field that is
not serializable
        at
org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:347)
        at
org.apache.wicket.util.io.SerializableChecker.checkFields(SerializableChecker.java:615)
        at
org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:538)
        at
org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:393)
        at
org.apache.wicket.util.io.SerializableChecker.checkFields(SerializableChecker.java:615)
        at
org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:538)
        at
org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:393)
        at
org.apache.wicket.util.io.SerializableChecker.checkFields(SerializableChecker.java:615)
        at
org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:538)
        at
org.apache.wicket.util.io.SerializableChecker.writeObjectOverride(SerializableChecker.jav
a:683)
        at
java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:298)
        at
org.apache.wicket.util.io.IObjectStreamFactory$1.writeObjectOverride(IObjectStreamFactory
.java:74)
        at
java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:298)
        at
org.apache.wicket.util.lang.Objects.objectToByteArray(Objects.java:1103)
        at
org.apache.wicket.protocol.http.pagestore.AbstractPageStore.serializePage(AbstractPageSto
re.java:200)
        at
org.apache.wicket.protocol.http.pagestore.DiskPageStore.storePage(DiskPageStore.java:700)

        at
org.apache.wicket.protocol.http.SecondLevelCacheSessionStore$SecondLevelCachePageMap.put(
SecondLevelCacheSessionStore.java:340)
        at org.apache.wicket.Session.requestDetached(Session.java:1412)
        at org.apache.wicket.RequestCycle.detach(RequestCycle.java:957)
        at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1195)
        at org.apache.wicket.RequestCycle.request(RequestCycle.java:500)
        at
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:261)
        at
org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:126)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.j
ava:290)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
        at
org.apache.catalina.ha.tcp.ReplicationValve.invoke(ReplicationValve.java:347)
        at
org.apache.catalina.ha.session.JvmRouteBinderValve.invoke(JvmRouteBinderValve.java:209)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
        at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.ja
va:581)
        at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
        at java.lang.Thread.run(Thread.java:595)
Caused by: java.io.NotSerializableException:
taxcient.registration.service.LoginService
        at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1081)
        at
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
        at
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
        at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
        at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
        at
java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1251)
        at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1075)
        at
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
        at
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
        at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
        at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
        at
java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1251)
        at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1075)
        at
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
        at
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
        at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
        at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
        at
java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
        at
org.apache.wicket.util.io.IObjectStreamFactory$1.writeObjectOverride(IObjectStreamFactory
-- 
View this message in context: http://www.nabble.com/Getting-Error-%22Field-not-serializable%22-on-one-of-the-constructor-attrib---tp14327323p14327323.html
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: Getting Error "Field not serializable" on one of the constructor attrib ?

Posted by Martijn Dashorst <ma...@gmail.com>.
This message needs some source code...
Martijn

On Dec 14, 2007 12:52 AM, mfs <fa...@gmail.com> wrote:

>
> Guys,
>
> Not sure why, but wicket is giving me an error "Field that is not
> serializable" on one of constructor attributes (of a panel) which is an
> implementation to an interface...i wonder why is that ? The attribute is
> not
> used as a model or anything its just a serviceHandler which i am passing
> to
> the page-component.
>
> Error log
> ----
>
>            private final org.xyz.login.api.I_LoginService
> org.xyz.login.web.LoginPane
> l$1.val$loginServiceHandler [class=org.xyz.service.LoginService] <-----
> field that is
> not serializable
>        at
> org.apache.wicket.util.io.SerializableChecker.check(
> SerializableChecker.java:347)
>        at
> org.apache.wicket.util.io.SerializableChecker.checkFields(
> SerializableChecker.java:615)
>        at
> org.apache.wicket.util.io.SerializableChecker.check(
> SerializableChecker.java:538)
>        at
> org.apache.wicket.util.io.SerializableChecker.check(
> SerializableChecker.java:393)
>        at
> org.apache.wicket.util.io.SerializableChecker.checkFields(
> SerializableChecker.java:615)
>        at
> org.apache.wicket.util.io.SerializableChecker.check(
> SerializableChecker.java:538)
>        at
> org.apache.wicket.util.io.SerializableChecker.check(
> SerializableChecker.java:393)
>        at
> org.apache.wicket.util.io.SerializableChecker.checkFields(
> SerializableChecker.java:615)
>        at
> org.apache.wicket.util.io.SerializableChecker.check(
> SerializableChecker.java:538)
>        at
> org.apache.wicket.util.io.SerializableChecker.writeObjectOverride(
> SerializableChecker.jav
> a:683)
>        at
> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:298)
>        at
> org.apache.wicket.util.io.IObjectStreamFactory$1.writeObjectOverride
> (IObjectStreamFactory
> .java:74)
>        at
> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:298)
>        at
> org.apache.wicket.util.lang.Objects.objectToByteArray(Objects.java:1103)
>        at
> org.apache.wicket.protocol.http.pagestore.AbstractPageStore.serializePage
> (AbstractPageSto
> re.java:200)
>        at
> org.apache.wicket.protocol.http.pagestore.DiskPageStore.storePage(
> DiskPageStore.java:700)
>
>        at
>
> org.apache.wicket.protocol.http.SecondLevelCacheSessionStore$SecondLevelCachePageMap.put
> (
> SecondLevelCacheSessionStore.java:340)
>        at org.apache.wicket.Session.requestDetached(Session.java:1412)
>        at org.apache.wicket.RequestCycle.detach(RequestCycle.java:957)
>        at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1195)
>        at org.apache.wicket.RequestCycle.request(RequestCycle.java:500)
>        at
> org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:261)
>        at
> org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java
> :126)
>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>        at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
> ApplicationFilterChain.j
> ava:290)
>        at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(
> ApplicationFilterChain.java:206)
>
>        at
> org.apache.catalina.core.StandardWrapperValve.invoke(
> StandardWrapperValve.java:230)
>        at
> org.apache.catalina.core.StandardContextValve.invoke(
> StandardContextValve.java:175)
>        at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
> :128)
>        at
> org.apache.catalina.ha.tcp.ReplicationValve.invoke(ReplicationValve.java
> :347)
>        at
> org.apache.catalina.ha.session.JvmRouteBinderValve.invoke(
> JvmRouteBinderValve.java:209)
>        at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
> :104)
>        at
> org.apache.catalina.core.StandardEngineValve.invoke(
> StandardEngineValve.java:109)
>        at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java
> :261)
>        at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
>        at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(
> Http11Protocol.ja
> va:581)
>        at
> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
>        at java.lang.Thread.run(Thread.java:595)
> Caused by: java.io.NotSerializableException:
> taxcient.registration.service.LoginService
>        at
> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1081)
>        at
> java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java
> :1375)
>        at
> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
>        at
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java
> :1290)
>        at
> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
>        at
> java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1251)
>        at
> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1075)
>        at
> java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java
> :1375)
>        at
> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
>        at
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java
> :1290)
>        at
> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
>        at
> java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1251)
>        at
> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1075)
>        at
> java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java
> :1375)
>        at
> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
>        at
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java
> :1290)
>        at
> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
>        at
> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
>        at
> org.apache.wicket.util.io.IObjectStreamFactory$1.writeObjectOverride
> (IObjectStreamFactory
> --
> View this message in context:
> http://www.nabble.com/Getting-Error-%22Field-not-serializable%22-on-one-of-the-constructor-attrib---tp14327323p14327323.html
> 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
>
>


-- 
Buy Wicket in Action: http://manning.com/dashorst
Apache Wicket 1.3.0-rc1 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-rc1/

Re: Getting Error "Field not serializable" on one of the constructor attrib ?

Posted by Igor Vaynberg <ig...@gmail.com>.
class DependencyProvider<T> implements Provider<T>, Serializable {
  private String typeName;
  public final DependencyProvider(Class dependencyType) {
    typeName=dependencyType.getName();
  }

  public T get() {
    return ((MyApplication)Application.get()).getDependency(Class.forName(typeName));
  }
}

then you can do

final Provider provider=new DependencyProvider(Dao.class);

new Form("foo") { onsubmit() { provider.get().foo(bar); }}

notice that the dependencylocator instance can be serialized without
serializing the dependency iitself... thats the important part.

-igor


On Dec 19, 2007 11:23 PM, mfs <fa...@gmail.com> wrote:
>
> >the work around is to pass in a locator that can be serialized without
> >serializing the dependency yet knows how to look it up when it is
> >needed. kinda like a serializable lookup. this is what wicket's
> >@SpringBean proxies do. the other option is to have that service
> >available via a static lookup.
>
> Can you give an example of this serializable locator ? where i dont need to
> serialize the dependency..still trying to get as to how would i acheive
> this..
>
> Thanks in advance..
>
>
> -igor
>
>
> >
> >
> > Thanks in advance
> >
> >
> >
> > igor.vaynberg wrote:
> > >
> > > your form anonymous class keeps the ref to your login svc instance
> > >
> > > -igor
> > >
> > > On 12/13/07, mfs <fa...@gmail.com> wrote:
> > >>
> > >> Ok...so here is the LoginPanel class...with the constructor i was
> > >> referring
> > >> to .. further the implementation for I_LoginService (i.e.
> > >> LoginService...on
> > >> which the serializable error is pointing to) is being passed over from
> > >> the
> > >> caller component...
> > >>
> > >>
> > >> public class LoginPanel extends Panel {
> > >>
> > >>      LoginVO loginVO = null;
> > >>
> > >>      public LoginPanel(String id, final String targetPage, final
> > >> I_LoginService
> > >> loginServiceHandler) {
> > >>              super(id);
> > >>              loginVO = new LoginVO();
> > >>              setModel(new CompoundPropertyModel(loginVO));
> > >>
> > >>              Form loginForm = new Form("loginForm") {
> > >>                      protected void onSubmit() {
> > >>
> > loginServiceHandler.authenticate(loginVO.getUserName(),
> > >> loginVO.getPassword());
> > >>                      }
> > >>              };
> > >>
> > >>              loginForm.add(new RequiredTextField("userName"));
> > >>              loginForm.add(new PasswordTextField("password"));
> > >>
> > >>              Button loginButton = new Button("loginButton") {
> > >>                      public void onSubmit() {
> > >>                      }
> > >>              };
> > >>
> > >>              loginForm.add(loginButton);
> > >>              add(loginForm);
> > >>
> > >>      }
> > >>
> > >>
> > >>
> > >> mfs wrote:
> > >> >
> > >> > Guys,
> > >> >
> > >> > Not sure why, but wicket is giving me an error "Field that is not
> > >> > serializable" on one of constructor attributes (of a panel) which is
> > an
> > >> > implementation to an interface...i wonder why is that ? The attribute
> > >> is
> > >> > not used as a model or anything its just a serviceHandler which i am
> > >> > passing to the page-component.
> > >> >
> > >> > Error log
> > >> > ----
> > >> >
> > >> >             private final org.xyz.login.api.I_LoginService
> > >> > org.xyz.login.web.LoginPane
> > >> > l$1.val$loginServiceHandler [class=org.xyz.service.LoginService]
> > <-----
> > >> > field that is
> > >> > not serializable
> > >> >         at
> > >> >
> > >>
> > org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:347)
> > >> >         at
> > >> >
> > >>
> > org.apache.wicket.util.io.SerializableChecker.checkFields(SerializableChecker.java:615)
> > >> >         at
> > >> >
> > >>
> > org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:538)
> > >> >         at
> > >> >
> > >>
> > org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:393)
> > >> >         at
> > >> >
> > >>
> > org.apache.wicket.util.io.SerializableChecker.checkFields(SerializableChecker.java:615)
> > >> >         at
> > >> >
> > >>
> > org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:538)
> > >> >         at
> > >> >
> > >>
> > org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:393)
> > >> >         at
> > >> >
> > >>
> > org.apache.wicket.util.io.SerializableChecker.checkFields(SerializableChecker.java:615)
> > >> >         at
> > >> >
> > >>
> > org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:538)
> > >> >         at
> > >> >
> > >>
> > org.apache.wicket.util.io.SerializableChecker.writeObjectOverride(SerializableChecker.jav
> > >> > a:683)
> > >> >         at
> > >> > java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:298)
> > >> >         at
> > >> >
> > >>
> > org.apache.wicket.util.io.IObjectStreamFactory$1.writeObjectOverride(IObjectStreamFactory
> > >> > .java:74)
> > >> >         at
> > >> > java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:298)
> > >> >         at
> > >> >
> > >>
> > org.apache.wicket.util.lang.Objects.objectToByteArray(Objects.java:1103)
> > >> >         at
> > >> >
> > >>
> > org.apache.wicket.protocol.http.pagestore.AbstractPageStore.serializePage(AbstractPageSto
> > >> > re.java:200)
> > >> >         at
> > >> >
> > >>
> > org.apache.wicket.protocol.http.pagestore.DiskPageStore.storePage(DiskPageStore.java:700)
> > >> >
> > >> >         at
> > >> >
> > >>
> > org.apache.wicket.protocol.http.SecondLevelCacheSessionStore$SecondLevelCachePageMap.put(
> > >> > SecondLevelCacheSessionStore.java:340)
> > >> >         at
> > org.apache.wicket.Session.requestDetached(Session.java:1412)
> > >> >         at
> > org.apache.wicket.RequestCycle.detach(RequestCycle.java:957)
> > >> >         at
> > org.apache.wicket.RequestCycle.steps(RequestCycle.java:1195)
> > >> >         at
> > >> org.apache.wicket.RequestCycle.request(RequestCycle.java:500)
> > >> >         at
> > >> >
> > >>
> > org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:261)
> > >> >         at
> > >> >
> > >>
> > org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:126)
> > >> >         at
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
> > >> >         at
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
> > >> >         at
> > >> >
> > >>
> > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.j
> > >> > ava:290)
> > >> >         at
> > >> >
> > >>
> > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> > >> >
> > >> >         at
> > >> >
> > >>
> > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
> > >> >         at
> > >> >
> > >>
> > org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
> > >> >         at
> > >> >
> > >>
> > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
> > >> >         at
> > >> >
> > >>
> > org.apache.catalina.ha.tcp.ReplicationValve.invoke(ReplicationValve.java:347)
> > >> >         at
> > >> >
> > >>
> > org.apache.catalina.ha.session.JvmRouteBinderValve.invoke(JvmRouteBinderValve.java:209)
> > >> >         at
> > >> >
> > >>
> > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
> > >> >         at
> > >> >
> > >>
> > org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> > >> >         at
> > >> >
> > >>
> > org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
> > >> >         at
> > >> >
> > >>
> > org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
> > >> >         at
> > >> >
> > >>
> > org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.ja
> > >> > va:581)
> > >> >         at
> > >> >
> > org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
> > >> >         at java.lang.Thread.run(Thread.java:595)
> > >> > Caused by: java.io.NotSerializableException:
> > >> > taxcient.registration.service.LoginService
> > >> >         at
> > >> > java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1081)
> > >> >         at
> > >> >
> > >>
> > java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
> > >> >         at
> > >> >
> > >>
> > java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
> > >> >         at
> > >> >
> > >>
> > java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
> > >> >         at
> > >> > java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
> > >> >         at
> > >> > java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1251)
> > >> >         at
> > >> > java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1075)
> > >> >         at
> > >> >
> > >>
> > java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
> > >> >         at
> > >> >
> > >>
> > java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
> > >> >         at
> > >> >
> > >>
> > java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
> > >> >         at
> > >> > java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
> > >> >         at
> > >> > java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1251)
> > >> >         at
> > >> > java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1075)
> > >> >         at
> > >> >
> > >>
> > java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
> > >> >         at
> > >> >
> > >>
> > java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
> > >> >         at
> > >> >
> > >>
> > java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
> > >> >         at
> > >> > java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
> > >> >         at
> > >> > java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
> > >> >         at
> > >> >
> > >>
> > org.apache.wicket.util.io.IObjectStreamFactory$1.writeObjectOverride(IObjectStreamFactory
> > >> >
> > >>
> > >> --
> > >> View this message in context:
> > >>
> > http://www.nabble.com/Getting-Error-%22Field-not-serializable%22-on-one-of-the-constructor-attrib---tp14327323p14328035.html
> > >> 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
> > >>
> > >>
> > >
> > > ---------------------------------------------------------------------
> > > 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/Getting-Error-%22Field-not-serializable%22-on-one-of-the-constructor-attrib---tp14327323p14339719.html
> >
> > 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
> >
> >
>
> ---------------------------------------------------------------------
> 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/Getting-Error-%22Field-not-serializable%22-on-one-of-the-constructor-attrib---tp14327323p14431890.html
>
> 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
>
>

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


Re: Getting Error "Field not serializable" on one of the constructor attrib ?

Posted by mfs <fa...@gmail.com>.
>the work around is to pass in a locator that can be serialized without
>serializing the dependency yet knows how to look it up when it is
>needed. kinda like a serializable lookup. this is what wicket's
>@SpringBean proxies do. the other option is to have that service
>available via a static lookup.

Can you give an example of this serializable locator ? where i dont need to
serialize the dependency..still trying to get as to how would i acheive
this..

Thanks in advance..

-igor


>
>
> Thanks in advance
>
>
>
> igor.vaynberg wrote:
> >
> > your form anonymous class keeps the ref to your login svc instance
> >
> > -igor
> >
> > On 12/13/07, mfs <fa...@gmail.com> wrote:
> >>
> >> Ok...so here is the LoginPanel class...with the constructor i was
> >> referring
> >> to .. further the implementation for I_LoginService (i.e.
> >> LoginService...on
> >> which the serializable error is pointing to) is being passed over from
> >> the
> >> caller component...
> >>
> >>
> >> public class LoginPanel extends Panel {
> >>
> >>      LoginVO loginVO = null;
> >>
> >>      public LoginPanel(String id, final String targetPage, final
> >> I_LoginService
> >> loginServiceHandler) {
> >>              super(id);
> >>              loginVO = new LoginVO();
> >>              setModel(new CompoundPropertyModel(loginVO));
> >>
> >>              Form loginForm = new Form("loginForm") {
> >>                      protected void onSubmit() {
> >>                                     
> loginServiceHandler.authenticate(loginVO.getUserName(),
> >> loginVO.getPassword());
> >>                      }
> >>              };
> >>
> >>              loginForm.add(new RequiredTextField("userName"));
> >>              loginForm.add(new PasswordTextField("password"));
> >>
> >>              Button loginButton = new Button("loginButton") {
> >>                      public void onSubmit() {
> >>                      }
> >>              };
> >>
> >>              loginForm.add(loginButton);
> >>              add(loginForm);
> >>
> >>      }
> >>
> >>
> >>
> >> mfs wrote:
> >> >
> >> > Guys,
> >> >
> >> > Not sure why, but wicket is giving me an error "Field that is not
> >> > serializable" on one of constructor attributes (of a panel) which is
> an
> >> > implementation to an interface...i wonder why is that ? The attribute
> >> is
> >> > not used as a model or anything its just a serviceHandler which i am
> >> > passing to the page-component.
> >> >
> >> > Error log
> >> > ----
> >> >
> >> >             private final org.xyz.login.api.I_LoginService
> >> > org.xyz.login.web.LoginPane
> >> > l$1.val$loginServiceHandler [class=org.xyz.service.LoginService]
> <-----
> >> > field that is
> >> > not serializable
> >> >         at
> >> >
> >>
> org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:347)
> >> >         at
> >> >
> >>
> org.apache.wicket.util.io.SerializableChecker.checkFields(SerializableChecker.java:615)
> >> >         at
> >> >
> >>
> org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:538)
> >> >         at
> >> >
> >>
> org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:393)
> >> >         at
> >> >
> >>
> org.apache.wicket.util.io.SerializableChecker.checkFields(SerializableChecker.java:615)
> >> >         at
> >> >
> >>
> org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:538)
> >> >         at
> >> >
> >>
> org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:393)
> >> >         at
> >> >
> >>
> org.apache.wicket.util.io.SerializableChecker.checkFields(SerializableChecker.java:615)
> >> >         at
> >> >
> >>
> org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:538)
> >> >         at
> >> >
> >>
> org.apache.wicket.util.io.SerializableChecker.writeObjectOverride(SerializableChecker.jav
> >> > a:683)
> >> >         at
> >> > java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:298)
> >> >         at
> >> >
> >>
> org.apache.wicket.util.io.IObjectStreamFactory$1.writeObjectOverride(IObjectStreamFactory
> >> > .java:74)
> >> >         at
> >> > java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:298)
> >> >         at
> >> >
> >>
> org.apache.wicket.util.lang.Objects.objectToByteArray(Objects.java:1103)
> >> >         at
> >> >
> >>
> org.apache.wicket.protocol.http.pagestore.AbstractPageStore.serializePage(AbstractPageSto
> >> > re.java:200)
> >> >         at
> >> >
> >>
> org.apache.wicket.protocol.http.pagestore.DiskPageStore.storePage(DiskPageStore.java:700)
> >> >
> >> >         at
> >> >
> >>
> org.apache.wicket.protocol.http.SecondLevelCacheSessionStore$SecondLevelCachePageMap.put(
> >> > SecondLevelCacheSessionStore.java:340)
> >> >         at
> org.apache.wicket.Session.requestDetached(Session.java:1412)
> >> >         at
> org.apache.wicket.RequestCycle.detach(RequestCycle.java:957)
> >> >         at
> org.apache.wicket.RequestCycle.steps(RequestCycle.java:1195)
> >> >         at
> >> org.apache.wicket.RequestCycle.request(RequestCycle.java:500)
> >> >         at
> >> >
> >>
> org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:261)
> >> >         at
> >> >
> >>
> org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:126)
> >> >         at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
> >> >         at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
> >> >         at
> >> >
> >>
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.j
> >> > ava:290)
> >> >         at
> >> >
> >>
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> >> >
> >> >         at
> >> >
> >>
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
> >> >         at
> >> >
> >>
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
> >> >         at
> >> >
> >>
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
> >> >         at
> >> >
> >>
> org.apache.catalina.ha.tcp.ReplicationValve.invoke(ReplicationValve.java:347)
> >> >         at
> >> >
> >>
> org.apache.catalina.ha.session.JvmRouteBinderValve.invoke(JvmRouteBinderValve.java:209)
> >> >         at
> >> >
> >>
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
> >> >         at
> >> >
> >>
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> >> >         at
> >> >
> >>
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
> >> >         at
> >> >
> >>
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
> >> >         at
> >> >
> >>
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.ja
> >> > va:581)
> >> >         at
> >> >
> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
> >> >         at java.lang.Thread.run(Thread.java:595)
> >> > Caused by: java.io.NotSerializableException:
> >> > taxcient.registration.service.LoginService
> >> >         at
> >> > java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1081)
> >> >         at
> >> >
> >>
> java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
> >> >         at
> >> >
> >>
> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
> >> >         at
> >> >
> >>
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
> >> >         at
> >> > java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
> >> >         at
> >> > java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1251)
> >> >         at
> >> > java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1075)
> >> >         at
> >> >
> >>
> java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
> >> >         at
> >> >
> >>
> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
> >> >         at
> >> >
> >>
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
> >> >         at
> >> > java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
> >> >         at
> >> > java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1251)
> >> >         at
> >> > java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1075)
> >> >         at
> >> >
> >>
> java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
> >> >         at
> >> >
> >>
> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
> >> >         at
> >> >
> >>
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
> >> >         at
> >> > java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
> >> >         at
> >> > java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
> >> >         at
> >> >
> >>
> org.apache.wicket.util.io.IObjectStreamFactory$1.writeObjectOverride(IObjectStreamFactory
> >> >
> >>
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/Getting-Error-%22Field-not-serializable%22-on-one-of-the-constructor-attrib---tp14327323p14328035.html
> >> 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
> >>
> >>
> >
> > ---------------------------------------------------------------------
> > 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/Getting-Error-%22Field-not-serializable%22-on-one-of-the-constructor-attrib---tp14327323p14339719.html
>
> 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
>
>

---------------------------------------------------------------------
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/Getting-Error-%22Field-not-serializable%22-on-one-of-the-constructor-attrib---tp14327323p14431890.html
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: Getting Error "Field not serializable" on one of the constructor attrib ?

Posted by Igor Vaynberg <ig...@gmail.com>.
On Dec 14, 2007 9:54 AM, mfs <fa...@gmail.com> wrote:
>
> hmm..but should it do that?...its not an instance within the form, i mean
> we'll be invoking the service layer from within the form.onsubmit (most of
> the times) event, and that would require all the service or other classes
> invoked to be made serializable..

yes it should. this is how anonymous classes work.

> Whats the work around, i wouldnt want the service class (or perhaps any
> other class) be made serializable without a reason..

the work around is to pass in a locator that can be serialized without
serializing the dependency yet knows how to look it up when it is
needed. kinda like a serializable lookup. this is what wicket's
@SpringBean proxies do. the other option is to have that service
available via a static lookup.

-igor


>
>
> Thanks in advance
>
>
>
> igor.vaynberg wrote:
> >
> > your form anonymous class keeps the ref to your login svc instance
> >
> > -igor
> >
> > On 12/13/07, mfs <fa...@gmail.com> wrote:
> >>
> >> Ok...so here is the LoginPanel class...with the constructor i was
> >> referring
> >> to .. further the implementation for I_LoginService (i.e.
> >> LoginService...on
> >> which the serializable error is pointing to) is being passed over from
> >> the
> >> caller component...
> >>
> >>
> >> public class LoginPanel extends Panel {
> >>
> >>      LoginVO loginVO = null;
> >>
> >>      public LoginPanel(String id, final String targetPage, final
> >> I_LoginService
> >> loginServiceHandler) {
> >>              super(id);
> >>              loginVO = new LoginVO();
> >>              setModel(new CompoundPropertyModel(loginVO));
> >>
> >>              Form loginForm = new Form("loginForm") {
> >>                      protected void onSubmit() {
> >>                                      loginServiceHandler.authenticate(loginVO.getUserName(),
> >> loginVO.getPassword());
> >>                      }
> >>              };
> >>
> >>              loginForm.add(new RequiredTextField("userName"));
> >>              loginForm.add(new PasswordTextField("password"));
> >>
> >>              Button loginButton = new Button("loginButton") {
> >>                      public void onSubmit() {
> >>                      }
> >>              };
> >>
> >>              loginForm.add(loginButton);
> >>              add(loginForm);
> >>
> >>      }
> >>
> >>
> >>
> >> mfs wrote:
> >> >
> >> > Guys,
> >> >
> >> > Not sure why, but wicket is giving me an error "Field that is not
> >> > serializable" on one of constructor attributes (of a panel) which is an
> >> > implementation to an interface...i wonder why is that ? The attribute
> >> is
> >> > not used as a model or anything its just a serviceHandler which i am
> >> > passing to the page-component.
> >> >
> >> > Error log
> >> > ----
> >> >
> >> >             private final org.xyz.login.api.I_LoginService
> >> > org.xyz.login.web.LoginPane
> >> > l$1.val$loginServiceHandler [class=org.xyz.service.LoginService] <-----
> >> > field that is
> >> > not serializable
> >> >         at
> >> >
> >> org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:347)
> >> >         at
> >> >
> >> org.apache.wicket.util.io.SerializableChecker.checkFields(SerializableChecker.java:615)
> >> >         at
> >> >
> >> org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:538)
> >> >         at
> >> >
> >> org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:393)
> >> >         at
> >> >
> >> org.apache.wicket.util.io.SerializableChecker.checkFields(SerializableChecker.java:615)
> >> >         at
> >> >
> >> org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:538)
> >> >         at
> >> >
> >> org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:393)
> >> >         at
> >> >
> >> org.apache.wicket.util.io.SerializableChecker.checkFields(SerializableChecker.java:615)
> >> >         at
> >> >
> >> org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:538)
> >> >         at
> >> >
> >> org.apache.wicket.util.io.SerializableChecker.writeObjectOverride(SerializableChecker.jav
> >> > a:683)
> >> >         at
> >> > java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:298)
> >> >         at
> >> >
> >> org.apache.wicket.util.io.IObjectStreamFactory$1.writeObjectOverride(IObjectStreamFactory
> >> > .java:74)
> >> >         at
> >> > java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:298)
> >> >         at
> >> >
> >> org.apache.wicket.util.lang.Objects.objectToByteArray(Objects.java:1103)
> >> >         at
> >> >
> >> org.apache.wicket.protocol.http.pagestore.AbstractPageStore.serializePage(AbstractPageSto
> >> > re.java:200)
> >> >         at
> >> >
> >> org.apache.wicket.protocol.http.pagestore.DiskPageStore.storePage(DiskPageStore.java:700)
> >> >
> >> >         at
> >> >
> >> org.apache.wicket.protocol.http.SecondLevelCacheSessionStore$SecondLevelCachePageMap.put(
> >> > SecondLevelCacheSessionStore.java:340)
> >> >         at org.apache.wicket.Session.requestDetached(Session.java:1412)
> >> >         at org.apache.wicket.RequestCycle.detach(RequestCycle.java:957)
> >> >         at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1195)
> >> >         at
> >> org.apache.wicket.RequestCycle.request(RequestCycle.java:500)
> >> >         at
> >> >
> >> org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:261)
> >> >         at
> >> >
> >> org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:126)
> >> >         at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
> >> >         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
> >> >         at
> >> >
> >> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.j
> >> > ava:290)
> >> >         at
> >> >
> >> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> >> >
> >> >         at
> >> >
> >> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
> >> >         at
> >> >
> >> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
> >> >         at
> >> >
> >> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
> >> >         at
> >> >
> >> org.apache.catalina.ha.tcp.ReplicationValve.invoke(ReplicationValve.java:347)
> >> >         at
> >> >
> >> org.apache.catalina.ha.session.JvmRouteBinderValve.invoke(JvmRouteBinderValve.java:209)
> >> >         at
> >> >
> >> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
> >> >         at
> >> >
> >> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> >> >         at
> >> >
> >> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
> >> >         at
> >> >
> >> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
> >> >         at
> >> >
> >> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.ja
> >> > va:581)
> >> >         at
> >> > org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
> >> >         at java.lang.Thread.run(Thread.java:595)
> >> > Caused by: java.io.NotSerializableException:
> >> > taxcient.registration.service.LoginService
> >> >         at
> >> > java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1081)
> >> >         at
> >> >
> >> java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
> >> >         at
> >> >
> >> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
> >> >         at
> >> >
> >> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
> >> >         at
> >> > java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
> >> >         at
> >> > java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1251)
> >> >         at
> >> > java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1075)
> >> >         at
> >> >
> >> java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
> >> >         at
> >> >
> >> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
> >> >         at
> >> >
> >> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
> >> >         at
> >> > java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
> >> >         at
> >> > java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1251)
> >> >         at
> >> > java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1075)
> >> >         at
> >> >
> >> java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
> >> >         at
> >> >
> >> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
> >> >         at
> >> >
> >> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
> >> >         at
> >> > java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
> >> >         at
> >> > java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
> >> >         at
> >> >
> >> org.apache.wicket.util.io.IObjectStreamFactory$1.writeObjectOverride(IObjectStreamFactory
> >> >
> >>
> >> --
> >> View this message in context:
> >> http://www.nabble.com/Getting-Error-%22Field-not-serializable%22-on-one-of-the-constructor-attrib---tp14327323p14328035.html
> >> 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
> >>
> >>
> >
> > ---------------------------------------------------------------------
> > 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/Getting-Error-%22Field-not-serializable%22-on-one-of-the-constructor-attrib---tp14327323p14339719.html
>
> 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
>
>

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


Re: Getting Error "Field not serializable" on one of the constructor attrib ?

Posted by mfs <fa...@gmail.com>.
hmm..but should it do that?...its not an instance within the form, i mean
we'll be invoking the service layer from within the form.onsubmit (most of
the times) event, and that would require all the service or other classes
invoked to be made serializable..

Whats the work around, i wouldnt want the service class (or perhaps any
other class) be made serializable without a reason..


Thanks in advance


igor.vaynberg wrote:
> 
> your form anonymous class keeps the ref to your login svc instance
> 
> -igor
> 
> On 12/13/07, mfs <fa...@gmail.com> wrote:
>>
>> Ok...so here is the LoginPanel class...with the constructor i was
>> referring
>> to .. further the implementation for I_LoginService (i.e.
>> LoginService...on
>> which the serializable error is pointing to) is being passed over from
>> the
>> caller component...
>>
>>
>> public class LoginPanel extends Panel {
>>
>> 	LoginVO loginVO = null;
>>
>> 	public LoginPanel(String id, final String targetPage, final
>> I_LoginService
>> loginServiceHandler) {
>> 		super(id);
>> 		loginVO = new LoginVO();
>> 		setModel(new CompoundPropertyModel(loginVO));
>>
>> 		Form loginForm = new Form("loginForm") {
>> 			protected void onSubmit() {
>> 					loginServiceHandler.authenticate(loginVO.getUserName(),
>> loginVO.getPassword());
>> 			}
>> 		};
>>
>> 		loginForm.add(new RequiredTextField("userName"));
>> 		loginForm.add(new PasswordTextField("password"));
>>
>> 		Button loginButton = new Button("loginButton") {
>> 			public void onSubmit() {
>> 			}
>> 		};
>>
>> 		loginForm.add(loginButton);
>> 		add(loginForm);
>>
>> 	}
>>
>>
>>
>> mfs wrote:
>> >
>> > Guys,
>> >
>> > Not sure why, but wicket is giving me an error "Field that is not
>> > serializable" on one of constructor attributes (of a panel) which is an
>> > implementation to an interface...i wonder why is that ? The attribute
>> is
>> > not used as a model or anything its just a serviceHandler which i am
>> > passing to the page-component.
>> >
>> > Error log
>> > ----
>> >
>> >             private final org.xyz.login.api.I_LoginService
>> > org.xyz.login.web.LoginPane
>> > l$1.val$loginServiceHandler [class=org.xyz.service.LoginService] <-----
>> > field that is
>> > not serializable
>> >         at
>> >
>> org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:347)
>> >         at
>> >
>> org.apache.wicket.util.io.SerializableChecker.checkFields(SerializableChecker.java:615)
>> >         at
>> >
>> org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:538)
>> >         at
>> >
>> org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:393)
>> >         at
>> >
>> org.apache.wicket.util.io.SerializableChecker.checkFields(SerializableChecker.java:615)
>> >         at
>> >
>> org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:538)
>> >         at
>> >
>> org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:393)
>> >         at
>> >
>> org.apache.wicket.util.io.SerializableChecker.checkFields(SerializableChecker.java:615)
>> >         at
>> >
>> org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:538)
>> >         at
>> >
>> org.apache.wicket.util.io.SerializableChecker.writeObjectOverride(SerializableChecker.jav
>> > a:683)
>> >         at
>> > java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:298)
>> >         at
>> >
>> org.apache.wicket.util.io.IObjectStreamFactory$1.writeObjectOverride(IObjectStreamFactory
>> > .java:74)
>> >         at
>> > java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:298)
>> >         at
>> >
>> org.apache.wicket.util.lang.Objects.objectToByteArray(Objects.java:1103)
>> >         at
>> >
>> org.apache.wicket.protocol.http.pagestore.AbstractPageStore.serializePage(AbstractPageSto
>> > re.java:200)
>> >         at
>> >
>> org.apache.wicket.protocol.http.pagestore.DiskPageStore.storePage(DiskPageStore.java:700)
>> >
>> >         at
>> >
>> org.apache.wicket.protocol.http.SecondLevelCacheSessionStore$SecondLevelCachePageMap.put(
>> > SecondLevelCacheSessionStore.java:340)
>> >         at org.apache.wicket.Session.requestDetached(Session.java:1412)
>> >         at org.apache.wicket.RequestCycle.detach(RequestCycle.java:957)
>> >         at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1195)
>> >         at
>> org.apache.wicket.RequestCycle.request(RequestCycle.java:500)
>> >         at
>> >
>> org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:261)
>> >         at
>> >
>> org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:126)
>> >         at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
>> >         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>> >         at
>> >
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.j
>> > ava:290)
>> >         at
>> >
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>> >
>> >         at
>> >
>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
>> >         at
>> >
>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
>> >         at
>> >
>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
>> >         at
>> >
>> org.apache.catalina.ha.tcp.ReplicationValve.invoke(ReplicationValve.java:347)
>> >         at
>> >
>> org.apache.catalina.ha.session.JvmRouteBinderValve.invoke(JvmRouteBinderValve.java:209)
>> >         at
>> >
>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
>> >         at
>> >
>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>> >         at
>> >
>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
>> >         at
>> >
>> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
>> >         at
>> >
>> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.ja
>> > va:581)
>> >         at
>> > org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
>> >         at java.lang.Thread.run(Thread.java:595)
>> > Caused by: java.io.NotSerializableException:
>> > taxcient.registration.service.LoginService
>> >         at
>> > java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1081)
>> >         at
>> >
>> java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
>> >         at
>> >
>> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
>> >         at
>> >
>> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
>> >         at
>> > java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
>> >         at
>> > java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1251)
>> >         at
>> > java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1075)
>> >         at
>> >
>> java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
>> >         at
>> >
>> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
>> >         at
>> >
>> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
>> >         at
>> > java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
>> >         at
>> > java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1251)
>> >         at
>> > java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1075)
>> >         at
>> >
>> java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
>> >         at
>> >
>> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
>> >         at
>> >
>> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
>> >         at
>> > java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
>> >         at
>> > java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
>> >         at
>> >
>> org.apache.wicket.util.io.IObjectStreamFactory$1.writeObjectOverride(IObjectStreamFactory
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Getting-Error-%22Field-not-serializable%22-on-one-of-the-constructor-attrib---tp14327323p14328035.html
>> 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
>>
>>
> 
> ---------------------------------------------------------------------
> 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/Getting-Error-%22Field-not-serializable%22-on-one-of-the-constructor-attrib---tp14327323p14339719.html
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: Getting Error "Field not serializable" on one of the constructor attrib ?

Posted by ig...@gmail.com.
your form anonymous class keeps the ref to your login svc instance

-igor

On 12/13/07, mfs <fa...@gmail.com> wrote:
>
> Ok...so here is the LoginPanel class...with the constructor i was referring
> to .. further the implementation for I_LoginService (i.e. LoginService...on
> which the serializable error is pointing to) is being passed over from the
> caller component...
>
>
> public class LoginPanel extends Panel {
>
> 	LoginVO loginVO = null;
>
> 	public LoginPanel(String id, final String targetPage, final I_LoginService
> loginServiceHandler) {
> 		super(id);
> 		loginVO = new LoginVO();
> 		setModel(new CompoundPropertyModel(loginVO));
>
> 		Form loginForm = new Form("loginForm") {
> 			protected void onSubmit() {
> 					loginServiceHandler.authenticate(loginVO.getUserName(),
> loginVO.getPassword());
> 			}
> 		};
>
> 		loginForm.add(new RequiredTextField("userName"));
> 		loginForm.add(new PasswordTextField("password"));
>
> 		Button loginButton = new Button("loginButton") {
> 			public void onSubmit() {
> 			}
> 		};
>
> 		loginForm.add(loginButton);
> 		add(loginForm);
>
> 	}
>
>
>
> mfs wrote:
> >
> > Guys,
> >
> > Not sure why, but wicket is giving me an error "Field that is not
> > serializable" on one of constructor attributes (of a panel) which is an
> > implementation to an interface...i wonder why is that ? The attribute is
> > not used as a model or anything its just a serviceHandler which i am
> > passing to the page-component.
> >
> > Error log
> > ----
> >
> >             private final org.xyz.login.api.I_LoginService
> > org.xyz.login.web.LoginPane
> > l$1.val$loginServiceHandler [class=org.xyz.service.LoginService] <-----
> > field that is
> > not serializable
> >         at
> >
> org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:347)
> >         at
> >
> org.apache.wicket.util.io.SerializableChecker.checkFields(SerializableChecker.java:615)
> >         at
> >
> org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:538)
> >         at
> >
> org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:393)
> >         at
> >
> org.apache.wicket.util.io.SerializableChecker.checkFields(SerializableChecker.java:615)
> >         at
> >
> org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:538)
> >         at
> >
> org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:393)
> >         at
> >
> org.apache.wicket.util.io.SerializableChecker.checkFields(SerializableChecker.java:615)
> >         at
> >
> org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:538)
> >         at
> >
> org.apache.wicket.util.io.SerializableChecker.writeObjectOverride(SerializableChecker.jav
> > a:683)
> >         at
> > java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:298)
> >         at
> >
> org.apache.wicket.util.io.IObjectStreamFactory$1.writeObjectOverride(IObjectStreamFactory
> > .java:74)
> >         at
> > java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:298)
> >         at
> > org.apache.wicket.util.lang.Objects.objectToByteArray(Objects.java:1103)
> >         at
> >
> org.apache.wicket.protocol.http.pagestore.AbstractPageStore.serializePage(AbstractPageSto
> > re.java:200)
> >         at
> >
> org.apache.wicket.protocol.http.pagestore.DiskPageStore.storePage(DiskPageStore.java:700)
> >
> >         at
> >
> org.apache.wicket.protocol.http.SecondLevelCacheSessionStore$SecondLevelCachePageMap.put(
> > SecondLevelCacheSessionStore.java:340)
> >         at org.apache.wicket.Session.requestDetached(Session.java:1412)
> >         at org.apache.wicket.RequestCycle.detach(RequestCycle.java:957)
> >         at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1195)
> >         at org.apache.wicket.RequestCycle.request(RequestCycle.java:500)
> >         at
> > org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:261)
> >         at
> >
> org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:126)
> >         at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
> >         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
> >         at
> >
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.j
> > ava:290)
> >         at
> >
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> >
> >         at
> >
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
> >         at
> >
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
> >         at
> >
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
> >         at
> >
> org.apache.catalina.ha.tcp.ReplicationValve.invoke(ReplicationValve.java:347)
> >         at
> >
> org.apache.catalina.ha.session.JvmRouteBinderValve.invoke(JvmRouteBinderValve.java:209)
> >         at
> >
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
> >         at
> >
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> >         at
> >
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
> >         at
> > org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
> >         at
> >
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.ja
> > va:581)
> >         at
> > org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
> >         at java.lang.Thread.run(Thread.java:595)
> > Caused by: java.io.NotSerializableException:
> > taxcient.registration.service.LoginService
> >         at
> > java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1081)
> >         at
> >
> java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
> >         at
> > java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
> >         at
> >
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
> >         at
> > java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
> >         at
> > java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1251)
> >         at
> > java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1075)
> >         at
> >
> java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
> >         at
> > java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
> >         at
> >
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
> >         at
> > java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
> >         at
> > java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1251)
> >         at
> > java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1075)
> >         at
> >
> java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
> >         at
> > java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
> >         at
> >
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
> >         at
> > java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
> >         at
> > java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
> >         at
> >
> org.apache.wicket.util.io.IObjectStreamFactory$1.writeObjectOverride(IObjectStreamFactory
> >
>
> --
> View this message in context:
> http://www.nabble.com/Getting-Error-%22Field-not-serializable%22-on-one-of-the-constructor-attrib---tp14327323p14328035.html
> 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
>
>

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


Re: Getting Error "Field not serializable" on one of the constructor attrib ?

Posted by mfs <fa...@gmail.com>.
Ok...so here is the LoginPanel class...with the constructor i was referring
to .. further the implementation for I_LoginService (i.e. LoginService...on
which the serializable error is pointing to) is being passed over from the
caller component...


public class LoginPanel extends Panel {

	LoginVO loginVO = null;

	public LoginPanel(String id, final String targetPage, final I_LoginService
loginServiceHandler) {
		super(id);
		loginVO = new LoginVO();
		setModel(new CompoundPropertyModel(loginVO));

		Form loginForm = new Form("loginForm") {
			protected void onSubmit() {
					loginServiceHandler.authenticate(loginVO.getUserName(),
loginVO.getPassword());
			}
		};

		loginForm.add(new RequiredTextField("userName"));
		loginForm.add(new PasswordTextField("password"));

		Button loginButton = new Button("loginButton") {
			public void onSubmit() {
			}
		};

		loginForm.add(loginButton);
		add(loginForm);

	}



mfs wrote:
> 
> Guys,
> 
> Not sure why, but wicket is giving me an error "Field that is not
> serializable" on one of constructor attributes (of a panel) which is an
> implementation to an interface...i wonder why is that ? The attribute is
> not used as a model or anything its just a serviceHandler which i am
> passing to the page-component.
> 
> Error log
> ----
> 
>             private final org.xyz.login.api.I_LoginService
> org.xyz.login.web.LoginPane
> l$1.val$loginServiceHandler [class=org.xyz.service.LoginService] <-----
> field that is
> not serializable
>         at
> org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:347)
>         at
> org.apache.wicket.util.io.SerializableChecker.checkFields(SerializableChecker.java:615)
>         at
> org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:538)
>         at
> org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:393)
>         at
> org.apache.wicket.util.io.SerializableChecker.checkFields(SerializableChecker.java:615)
>         at
> org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:538)
>         at
> org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:393)
>         at
> org.apache.wicket.util.io.SerializableChecker.checkFields(SerializableChecker.java:615)
>         at
> org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:538)
>         at
> org.apache.wicket.util.io.SerializableChecker.writeObjectOverride(SerializableChecker.jav
> a:683)
>         at
> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:298)
>         at
> org.apache.wicket.util.io.IObjectStreamFactory$1.writeObjectOverride(IObjectStreamFactory
> .java:74)
>         at
> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:298)
>         at
> org.apache.wicket.util.lang.Objects.objectToByteArray(Objects.java:1103)
>         at
> org.apache.wicket.protocol.http.pagestore.AbstractPageStore.serializePage(AbstractPageSto
> re.java:200)
>         at
> org.apache.wicket.protocol.http.pagestore.DiskPageStore.storePage(DiskPageStore.java:700)
> 
>         at
> org.apache.wicket.protocol.http.SecondLevelCacheSessionStore$SecondLevelCachePageMap.put(
> SecondLevelCacheSessionStore.java:340)
>         at org.apache.wicket.Session.requestDetached(Session.java:1412)
>         at org.apache.wicket.RequestCycle.detach(RequestCycle.java:957)
>         at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1195)
>         at org.apache.wicket.RequestCycle.request(RequestCycle.java:500)
>         at
> org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:261)
>         at
> org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:126)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>         at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.j
> ava:290)
>         at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 
>         at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
>         at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
>         at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
>         at
> org.apache.catalina.ha.tcp.ReplicationValve.invoke(ReplicationValve.java:347)
>         at
> org.apache.catalina.ha.session.JvmRouteBinderValve.invoke(JvmRouteBinderValve.java:209)
>         at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
>         at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>         at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
>         at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
>         at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.ja
> va:581)
>         at
> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
>         at java.lang.Thread.run(Thread.java:595)
> Caused by: java.io.NotSerializableException:
> taxcient.registration.service.LoginService
>         at
> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1081)
>         at
> java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
>         at
> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
>         at
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
>         at
> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
>         at
> java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1251)
>         at
> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1075)
>         at
> java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
>         at
> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
>         at
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
>         at
> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
>         at
> java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1251)
>         at
> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1075)
>         at
> java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
>         at
> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
>         at
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
>         at
> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
>         at
> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
>         at
> org.apache.wicket.util.io.IObjectStreamFactory$1.writeObjectOverride(IObjectStreamFactory
> 

-- 
View this message in context: http://www.nabble.com/Getting-Error-%22Field-not-serializable%22-on-one-of-the-constructor-attrib---tp14327323p14328035.html
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