构建后如何解决 'Xpage class could not be found'

How to resolve 'Xpage class could not be found' after build

Xpages 应用已有几年历史,但现在,对现有 Xpage 的任何更新都会破坏它并显示浏览器消息:

HTTP Web Server: Item Not Found Exception

xpages_exec 日志显示:

com.ibm.xsp.page.PageNotFoundException: Could not create the page /Cards.xsp because the class xsp.Cards could not be found. Please check your spelling.

即使只是重新保存工作的 Xpage,也会发生这种情况;将不再找到 Xpage class。如果只是重命名或复制 Xpage,则相同。我在其他工作站上使用 Domino Designer 在服务器上得到了相同的结果。

也许这是 JVM 运行 时间问题?服务器控制台显示 JVM 版本:

JVM: Java Virtual Machine initialized.
Java runtime version: 8.0.5.6 - pwa6480sr5fp6-20171124_02(SR5 FP6)
JVM version: JRE 1.8.0 Windows Server 2008 R2 amd64-64 20171122_371101 (JIT enabled, AOT enabled) OpenJ9 - 8e3c85d OMR - 713f08e IBM - c041ee8

Domino Designer Java 编译器工作区设置 JDK 合规级别设置为 1.5,安装了 JRE 1.6。

我如何确定为什么在新构建 Xpage 后导致 Xpage class 不再被发现?

更新:来自 xpages 执行日志:

1/16/20 12:33 PM: Exception Thrown
com.ibm.xsp.page.PageNotFoundException: Could not create the page /Cards.xsp because the class xsp.Cards could not be found. Please check your spelling.
    at com.ibm.xsp.page.compiled.CompiledPageDriver.getClassForPageName(CompiledPageDriver.java:174)
    at com.ibm.xsp.page.compiled.CompiledPageDriver.loadPage(CompiledPageDriver.java:61)
    at com.ibm.xsp.application.ViewHandlerExImpl._createViewRoot(ViewHandlerExImpl.java:499)
    at com.ibm.xsp.application.ViewHandlerExImpl.createViewRoot(ViewHandlerExImpl.java:567)
    at com.ibm.xsp.application.ViewHandlerExImpl.doCreateView(ViewHandlerExImpl.java:142)
    at com.ibm.xsp.application.ViewHandlerEx.createView(ViewHandlerEx.java:90)
    at com.ibm.xsp.webapp.FacesServlet.serviceView(FacesServlet.java:250)
    at com.ibm.xsp.webapp.FacesServletEx.serviceView(FacesServletEx.java:157)
    at com.ibm.xsp.webapp.FacesServlet.service(FacesServlet.java:159)
    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:588)
    at com.ibm.domino.xsp.module.nsf.NSFComponentModule.invokeServlet(NSFComponentModule.java:1335)
    at com.ibm.designer.runtime.domino.adapter.ComponentModule$AdapterInvoker.invokeServlet(ComponentModule.java:865)
    at com.ibm.designer.runtime.domino.adapter.ComponentModule$ServletInvoker.doService(ComponentModule.java:808)
    at com.ibm.designer.runtime.domino.adapter.ComponentModule.doService(ComponentModule.java:577)
    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)
Caused by: java.lang.ClassNotFoundException: Cannot find class xsp.Cards in NSF
    at com.ibm.domino.xsp.module.nsf.ModuleClassLoader$DynamicClassLoader.findClass(ModuleClassLoader.java:503)
    at java.lang.ClassLoader.loadClassHelper(ClassLoader.java:924)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:869)
    at com.ibm.domino.xsp.module.nsf.ModuleClassLoader$DynamicClassLoader.loadClass(ModuleClassLoader.java:381)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:852)
    at com.ibm.domino.xsp.module.nsf.ModuleClassLoader.loadClass(ModuleClassLoader.java:209)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:852)
    at com.ibm.domino.xsp.module.nsf.ModuleClassLoader.loadClass(ModuleClassLoader.java:219)
    at com.ibm.designer.runtime.Application.loadClass(Application.java:708)
    at com.ibm.xsp.library.ApplicationFacesClassLoader.loadClass(ApplicationFacesClassLoader.java:54)
    at com.ibm.xsp.page.compiled.CompiledPageDriver.getClassForPageName(CompiledPageDriver.java:169)
    ... 21 more
Caused by: java.lang.ClassNotFoundException: xsp.Cards
    at java.net.URLClassLoader.findClass(URLClassLoader.java:609)
    at com.ibm.domino.xsp.module.nsf.ModuleClassLoader$DynamicClassLoader.findClass(ModuleClassLoader.java:476)
    ... 31 more

Domino Designer 中,切换到 Package Explorer 视图,并查找任何错误。在上面的例子中,库 com.ibm.xsp.extlib.relational.library 包含在 xsp.properties 文件中但未找到。从 xsp.properties 中删除依赖项或确保库已安装或在构建路径中。