I have distribution package for beans. To save some work to developers it contains faces-config.xml
declaring beans used by the JAR - inside META-INF directory of JAR.
JAR is inside WebContent\WEB-INF\lib and referenced in build path of NSF.
Development server works with this setup and does not require any change to faces-config.xml
inside NSF.
But database made as copy or refreshed via template from development server does not work - web page fails with error:
Error while executing JavaScript computed expression
Script interpreter error, line=1, col=1: [ReferenceError] 'app' not found
where app is name of application scoped bean.
Error is logged into xpages_exc.log with full stacktrace.
Both servers are virtualized Wintels, 64bit Windows, 64bit Domino. I have looked into xsp.properties, java.policy, they are the same. Database is signed by server.
Who can explain that? What to check?
Edited:
Stacktrace:
Page Name: /home.xsp
Control id: _id2
Script interpreter error, line=1, col=1: **[ReferenceError] 'app' not found
-> 1: app['fld_DbHomeKey'].getUrl() + 'icons.css'**
com.ibm.xsp.exception.EvaluationExceptionEx: Error while executing JavaScript computed expression
at com.ibm.xsp.binding.javascript.JavaScriptValueBinding.getValue(JavaScriptValueBinding.java:132)
at com.ibm.xsp.page.compiled.ExpressionEvaluatorImpl.getBindingValue(ExpressionEvaluatorImpl.java:151)
at xsp.OneUILayout$OneUILayoutPage.initIncluderAsRoot(OneUILayout.java:113)
at com.ibm.xsp.page.compiled.AbstractCompiledPage.createTree(AbstractCompiledPage.java:249)
at com.ibm.xsp.page.compiled.AbstractCompiledPage.addComponent(AbstractCompiledPage.java:389)
at com.ibm.xsp.component.UIIncludeComposite.buildContents(UIIncludeComposite.java:453)
at com.ibm.xsp.page.compiled.AbstractCompiledPage.initComponent(AbstractCompiledPage.java:334)
at com.ibm.xsp.page.compiled.CompiledComponentBuilder.buildChildren(CompiledComponentBuilder.java:123)
at com.ibm.xsp.page.compiled.CompiledComponentBuilder.buildAll(CompiledComponentBuilder.java:84)
at com.ibm.xsp.component.UIViewRootEx.buildContents(UIViewRootEx.java:1649)
at com.ibm.xsp.component.UIViewRootEx2.buildContents(UIViewRootEx2.java:246)
at com.ibm.xsp.page.compiled.AbstractCompiledPage.initComponent(AbstractCompiledPage.java:334)
at com.ibm.xsp.page.compiled.AbstractCompiledPage.createTree(AbstractCompiledPage.java:256)
at com.ibm.xsp.page.compiled.AbstractCompiledPage.createViewRoot(AbstractCompiledPage.java:167)
at com.ibm.xsp.application.ViewHandlerExImpl._createViewRoot(ViewHandlerExImpl.java:511)
at com.ibm.xsp.application.ViewHandlerExImpl.createViewRoot(ViewHandlerExImpl.java:557)
at com.ibm.xsp.application.ViewHandlerExImpl.doCreateView(ViewHandlerExImpl.java:141)
at com.ibm.xsp.application.ViewHandlerEx.createView(ViewHandlerEx.java:90)
at com.ibm.xsp.webapp.FacesServlet.serviceView(FacesServlet.java:238)
at com.ibm.xsp.webapp.FacesServletEx.serviceView(FacesServletEx.java:200)
at com.ibm.xsp.webapp.FacesServlet.service(FacesServlet.java:160)
at com.ibm.xsp.webapp.FacesServletEx.service(FacesServletEx.java:137)
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:1267)
at com.ibm.designer.runtime.domino.adapter.ComponentModule$AdapterInvoker.invokeServlet(ComponentModule.java:847)
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:1251)
at com.ibm.domino.xsp.module.nsf.NSFService.doServiceInternal(NSFService.java:598)
at com.ibm.domino.xsp.module.nsf.NSFService.doService(NSFService.java:421)
at com.ibm.designer.runtime.domino.adapter.LCDEnvironment.doService(LCDEnvironment.java:341)
at com.ibm.designer.runtime.domino.adapter.LCDEnvironment.service(LCDEnvironment.java:297)
at com.ibm.domino.xsp.bridge.http.engine.XspCmdManager.service(XspCmdManager.java:272)
Caused by: com.ibm.jscript.InterpretException: Script interpreter error, line=1, col=1: [ReferenceError] 'app' not found
at com.ibm.jscript.types.FBSReferenceByName$UndefinedVariable.getValue(FBSReferenceByName.java:49)
at com.ibm.jscript.ASTTree.InterpretResult.getFBSValue(InterpretResult.java:70)
at com.ibm.jscript.ASTTree.ASTArrayMember.interpret(ASTArrayMember.java:96)
at com.ibm.jscript.ASTTree.ASTMember.interpret(ASTMember.java:106)
at com.ibm.jscript.ASTTree.ASTCall.interpret(ASTCall.java:88)
at com.ibm.jscript.ASTTree.binaryop.ASTBinaryAdd.interpret(ASTBinaryAdd.java:93)
at com.ibm.jscript.ASTTree.ASTProgram.interpret(ASTProgram.java:119)
at com.ibm.jscript.ASTTree.ASTProgram.interpretEx(ASTProgram.java:139)
at com.ibm.jscript.JSExpression._interpretExpression(JSExpression.java:435)
at com.ibm.jscript.JSExpression.access$1(JSExpression.java:424)
at com.ibm.jscript.JSExpression$2.run(JSExpression.java:414)
at java.security.AccessController.doPrivileged(AccessController.java:284)
at com.ibm.jscript.JSExpression.interpretExpression(JSExpression.java:410)
at com.ibm.jscript.JSExpression.evaluateValue(JSExpression.java:251)
at com.ibm.jscript.JSExpression.evaluateValue(JSExpression.java:234)
at com.ibm.xsp.javascript.JavaScriptInterpreter.interpret(JavaScriptInterpreter.java:221)
at com.ibm.xsp.javascript.JavaScriptInterpreter.interpret(JavaScriptInterpreter.java:193)
at com.ibm.xsp.binding.javascript.JavaScriptValueBinding.getValue(JavaScriptValueBinding.java:78)
... 33 more
app is POJO bean implementing Map, returns POJO object with method getUrl which returns base url of application resources. Anyway, app is not defined - it is not instantiated, because of problem with faces-config.