Andrey
Andrey

Reputation: 1

Xpages - NotSerializableException: com.ibm.xsp.extlib.component.dialog.UIDialog

I have a Xpage which use several extLib Dialog.
Dialog used managed bean for implement business logic.

Sometimes users give an exception NotSerializableException: com.ibm.xsp.extlib.component.dialog.UIDialog.

Unfortunately i can't reproduce error even if user say what actions they did on XPages.

After an error occured first time - similar error starts to appear at any Xpage that include Dialog rigth after loadig Xpages even without calling a dialog.
Issue affected only to user which has en exception.
Closes all open tabs in browser and reopen Xpages usually resolve an issue.

I understand, what means in general an error: NotSerializableException.
I inspect all my managed beans classes and made sure that don't use objects aren't serializable.
I don't trying serialize Notes objects

StackTrace

com.ibm.xsp.FacesExceptionEx: java.io.NotSerializableException: com.ibm.xsp.extlib.component.dialog.UIDialog
at com.ibm.xsp.application.AbstractStateManager.saveSerializedView(AbstractStateManager.java:121)
at com.ibm.xsp.application.FileStateManager.saveSerializedView(FileStateManager.java:1)
at com.ibm.xsp.application.StateManagerImpl.saveSerializedView(StateManagerImpl.java:152)
at com.ibm.xsp.application.ViewHandlerExImpl._saveViewState(ViewHandlerExImpl.java:484)
at com.ibm.xsp.application.ViewHandlerExImpl.saveViewState(ViewHandlerExImpl.java:478)
at com.ibm.xsp.application.ViewHandlerExImpl._renderView(ViewHandlerExImpl.java:326)
at com.ibm.xsp.application.ViewHandlerExImpl.renderView(ViewHandlerExImpl.java:338)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:103)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:210)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:120)
at com.ibm.xsp.controller.FacesControllerImpl.render(FacesControllerImpl.java:270)
at com.ibm.xsp.webapp.FacesServlet.serviceView(FacesServlet.java:269)
at com.ibm.xsp.webapp.FacesServletEx.serviceView(FacesServletEx.java:157)
at com.ibm.xsp.webapp.FacesServlet.service(FacesServlet.java:163)
at com.ibm.xsp.webapp.FacesServletEx.service(FacesServletEx.java:138)
at com.ibm.xsp.webapp.DesignerFacesServlet.service(DesignerFacesServlet.java:103)
at com.ibm.designer.runtime.domino.adapter.ComponentModule.invokeServlet(ComponentModule.java:600)
at com.ibm.domino.xsp.module.nsf.NSFComponentModule.invokeServlet(NSFComponentModule.java:1352)
at com.ibm.designer.runtime.domino.adapter.ComponentModule$AdapterInvoker.invokeServlet(ComponentModule.java:877)
at com.ibm.designer.runtime.domino.adapter.ComponentModule$ServletInvoker.doService(ComponentModule.java:820)
at com.ibm.designer.runtime.domino.adapter.ComponentModule.doService(ComponentModule.java:589)
at com.ibm.domino.xsp.module.nsf.NSFComponentModule.doService(NSFComponentModule.java:1336)
at com.ibm.domino.xsp.module.nsf.NSFService.doServiceInternal(NSFService.java:662)
at com.ibm.domino.xsp.module.nsf.NSFService.doService(NSFService.java:482)
at com.ibm.designer.runtime.domino.adapter.LCDEnvironment.doService(LCDEnvironment.java:357)
at com.ibm.designer.runtime.domino.adapter.LCDEnvironment.service(LCDEnvironment.java:313)
at com.ibm.domino.xsp.bridge.http.engine.XspCmdManager.service(XspCmdManager.java:272)
Caused by: java.io.NotSerializableException: com.ibm.xsp.extlib.component.dialog.UIDialog
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1184)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348)
at java.util.HashMap.internalWriteEntries(HashMap.java:1793)
at java.util.HashMap.writeObject(HashMap.java:1363)
at sun.reflect.GeneratedMethodAccessor71.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:1154)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1496)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
at java.io.ObjectOutputStream.writeUnshared(ObjectOutputStream.java:415)
at com.ibm.xsp.application.AbstractSerializingStateManager$FastObjectOutputStream.writeObjectEx(AbstractSerializingStateManager.java:438)
at com.ibm.xsp.application.AbstractSerializingStateManager$FastObjectOutputStream.writeObjectEx(AbstractSerializingStateManager.java:417)
at com.ibm.xsp.application.AbstractSerializingStateManager$FastObjectOutputStream.writeObjectEx(AbstractSerializingStateManager.java:417)
at com.ibm.xsp.application.AbstractSerializingStateManager$FastObjectOutputStream.writeObjectEx(AbstractSerializingStateManager.java:417)
at com.ibm.xsp.application.AbstractSerializingStateManager$FastObjectOutputStream.writeObjectEx(AbstractSerializingStateManager.java:417)
at com.ibm.xsp.application.AbstractSerializingStateManager.saveSerializedView(AbstractSerializingStateManager.java:294)
at com.ibm.xsp.application.AbstractSerializingStateManager.doSaveSerializedView(AbstractSerializingStateManager.java:269)
at com.ibm.xsp.application.FileStateManager.doSaveSerializedView(FileStateManager.java:356)
at com.ibm.xsp.application.FileStateManager.doSaveSerializedView(FileStateManager.java:310)
at com.ibm.xsp.application.AbstractStateManager.saveSerializedView(AbstractStateManager.java:114)
... 26 more

What am I missing and what else can i do to find the cause of the error ?

Thanks for any help

Upvotes: 0

Views: 88

Answers (1)

John Dalsgaard
John Dalsgaard

Reputation: 2807

Do you implement Serializable on each of the beans/classes that you use? If I remember correctly then you will only be forced to comply with this for viewScope beans - but not for the other scopes.

Obviously, you need to check that you haven't by mistake put a Notes object into a bean variable. If you need that for your logic then consider making it "transient". Come to think about it... In you snippet you seem to have "v" as a "global" variable in the class where you took the snippet from...?

When the issue happens is there a pattern (either same dialog or sequence of dialogs?

Another thing that could be in play is if your users open several tabs of the same application - but then you would most likely get another error (out of memory - or something along those lines...). Those settings are controlled by the XSP Properties file, "Persistence" tab:

  • Page Persistence mode -> Entire page content
  • Maximum pages on disk -> A larger number than server default (depending on server version), e.g. 200

Which server version is the application running on?

Upvotes: 1

Related Questions