0

i have a xpage including a dojo DateTextBox. If i save the document, everything works well. But if i reopen the document, i get the following Exception:

Unexpected runtime error
The runtime has encountered an unexpected error.
Error source
Page Name:/OfferAccount.xsp

Exception
java.io.NotSerializableException: lotus.domino.local.DateTime
lotus.domino.local.DateTime

Stack Trace:

com.ibm.xsp.FacesExceptionEx: java.io.NotSerializableException: lotus.domino.local.DateTime
    com.ibm.xsp.application.AbstractStateManager.saveSerializedView(AbstractStateManager.java:121)
    com.ibm.xsp.application.StateManagerImpl.saveSerializedView(StateManagerImpl.java:152)
    com.ibm.xsp.application.ViewHandlerExImpl._saveViewState(ViewHandlerExImpl.java:445)
    com.ibm.xsp.application.ViewHandlerExImpl.saveViewState(ViewHandlerExImpl.java:439)
    com.ibm.xsp.application.ViewHandlerExImpl._renderView(ViewHandlerExImpl.java:323)
    com.ibm.xsp.application.ViewHandlerExImpl.renderView(ViewHandlerExImpl.java:335)

Here is the code of the DateTextBox in my xpage:

<xe:djDateTextBox
id="periodOfInsuranceBeginn" value="#{offerAccount.d_offerPolicyBegin}">
<xe:this.defaultValue><![CDATA[#{javascript:var today:NotesDateTime = 
session.createDateTime(@Today());   
return I18n.parseDate(today.getDateOnly());}]]></xe:this.defaultValue>
<xp:this.converter>
<xp:convertDateTime type="date" dateStyle="short">
</xp:convertDateTime>
</xp:this.converter>
</xe:djDateTextBox>

This Exception also occurs, if i use an EditBox of type dateTime.

Any ideas? Thanks Mario

Mario Semper
  • 511
  • 1
  • 3
  • 17

1 Answers1

1

It seems that you use a Notes object (NotesDateTime) in your code. Notes objects are not serializable. Store them as a Java date instead and convert them back to a NotesDateTime object if you acces them.

Sven Hasselbach
  • 10,455
  • 1
  • 18
  • 26