使用Frostillic.us XPages脚手架时保存的例外情况

时间:2016-12-08 10:37:05

标签: xpages scaffolding

我创建了一个使用Frostillic.us XPages脚手架的应用程序。在文档上执行保存时,在页面上使用以下内容时会抛出异常...

<xp:button id="save" value="Save" style='float:right;'>
    <xp:eventHandler 
        event="onclick" submit="true" 
        refreshMode="complete" 
        immediate="false" save="true"/>
</xp:button>

例外是......

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) 

如果我把我的所有代码,自定义控件xpages等放在脚手架NTF中,用于网站上的示例,它一切正常。这导致我认为我的数据库没有正确设置,但我看不出这可能是什么。我确实已经勾选了两个必需的库。

1 个答案:

答案 0 :(得分:0)

检查nsf中的xsp.propertites并将其与脚手架NTF进行比较。我打赌org.openntf.domino.xsp在脚手架NTF中设置为“godmode”而不是你的。所以请确保添加:

org.openntf.domino.xsp=godmode

您可以在Github上看到完整的xsp.properties from the XPages scaffolding project