Xpages应用程序已有几年历史了,但是现在,对现有Xpage的任何更新都会通过浏览器消息将其中断:
HTTP Web服务器:找不到项目异常
xpages_exec日志显示:
com.ibm.xsp.page.PageNotFoundException:无法创建页面
/Cards.xsp,因为找不到类xsp.Cards。请
检查您的拼写。
即使只是重新保存工作的Xpage,也会发生这种情况; Xpage类将不再找到。如果只是重命名或复制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
安装了JRE 1.6的情况下,Domino Designer Java编译器工作区设置的JDK遵从级别设置为1.5。
我如何确定为什么在新建Xpage之后导致不再找到Xpage类?
更新:从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中,切换到“程序包资源管理器”视图,然后查找任何错误。在上述情况下,库com.ibm.xsp.extlib.relational.library已包含在xsp.properties文件中,但未找到。从xsp.properties中删除依赖项,或确保已安装库或在构建路径中。
关于java - 构建后如何解决“找不到Xpage类”,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/59805170/