I have created an application that uses the Frostillic.us XPages scaffolding. When executing a save on a document I get an exception thrown when using the following on the page...
<xp:button id="save" value="Save" style='float:right;'>
<xp:eventHandler
event="onclick" submit="true"
refreshMode="complete"
immediate="false" save="true"/>
</xp:button>
The exception is...
java.lang.ClassCastException: lotus.domino.local.Document incompatible with org.openntf.domino.Document at
frostillicus.xsp.model.domino.AbstractDominoModel$DocumentHolder.getDocument(AbstractDominoModel.java:539) at
frostillicus.xsp.model.domino.AbstractDominoModel.document(AbstractDominoModel.java:435) at
frostillicus.xsp.model.domino.AbstractDominoModel.save(AbstractDominoModel.java:322) at
frostillicus.xsp.model.component.ModelDataSource.save(ModelDataSource.java:139) at
com.ibm.xsp.model.AbstractDataSource._saveData(AbstractDataSource.java:553) at
com.ibm.xsp.model.AbstractDataSource.save(AbstractDataSource.java:534) at
com.ibm.xsp.util.FacesUtil.save(FacesUtil.java:578) at
com.ibm.xsp.util.FacesUtil.save(FacesUtil.java:553) at
com.ibm.xsp.component.UIViewRootEx.save(UIViewRootEx.java:1197) at
com.ibm.xsp.component.UIViewRootEx.save(UIViewRootEx.java:1186) at
com.ibm.xsp.application.ActionListenerImpl.processAction(ActionListenerImpl.java:78) at
javax.faces.component.UICommand.broadcast(UICommand.java:324) at
com.ibm.xsp.component.UIEventHandler.broadcast(UIEventHandler.java:366) at
com.ibm.xsp.component.UIViewRootEx.broadcast(UIViewRootEx.java:1535) at
javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:307) at
javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:428) at
com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:94) at
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:210) at
com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:96) at
com.ibm.xsp.controller.FacesControllerImpl.execute(FacesControllerImpl.java:256) at
com.ibm.xsp.webapp.FacesServlet.serviceView(FacesServlet.java:228) at
com.ibm.xsp.webapp.FacesServletEx.serviceView(FacesServletEx.java:157) at
com.ibm.xsp.webapp.FacesServlet.service(FacesServlet.java:160) 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:576) at
com.ibm.domino.xsp.module.nsf.NSFComponentModule.invokeServlet(NSFComponentModule.java:1335) at
com.ibm.designer.runtime.domino.adapter.ComponentModule$AdapterInvoker.invokeServlet(ComponentModule.java:853) at
com.ibm.designer.runtime.domino.adapter.ComponentModule$ServletInvoker.doService(ComponentModule.java:796) at
com.ibm.designer.runtime.domino.adapter.ComponentModule.doService(ComponentModule.java:565) at
com.ibm.domino.xsp.module.nsf.NSFComponentModule.doService(NSFComponentModule.java:1319) 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)
If I take all of my code, Custom Controls xpages etc and put them inside the scaffolding NTF that is used for the example on the site, it all works fine. This led me to think that my database wasn't set-up properly but I can't see where this may be. I have definitely got both required libraries ticked.
Check xsp.propertites in your nsf and compare it with the scaffolding NTF. I bet that org.openntf.domino.xsp is set to "godmode" in the scaffolding NTF and not in yours. So make sure that you add this:
You can see the complete xsp.properties from the XPages scaffolding project on Github.