Reputation: 705
I'm getting lots of errors in my openLog db:
Expression Language Interpret Exception Error:'compositeData' not found - Error on _id773:
Interpret exception
Error:'compositeData' not found
Multiple times, with a different ID each time. If I view source and search for any of the ID's I can't find them anywhere.... I'm now getting tunnel vision! Is there anything that jumps out to give a hint in direction? The error I assume if because I'm referencing a compositeData property somewhere that doesn't exist, but I have so many custom properties with loads of custom controls so finding it hard to pinpoint. Even if someone can see in the stack trace a field type, or something it will help me narrow it down. Thanks
Stack trace:
Stack Trace com.ibm.jscript.InterpretException: Interpret exception at com.paulwithers.openLog.OpenLogErrorHolder.getInterpretException(OpenLogErrorHolder.java:114) at com.paulwithers.openLog.OpenLogErrorHolder.addError(OpenLogErrorHolder.java:216) at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55) at java.lang.reflect.Method.invoke(Method.java:508) at com.ibm.jscript.types.JavaAccessObject.call(JavaAccessObject.java:322) at com.ibm.jscript.types.FBSObject.call(FBSObject.java:161) at com.ibm.jscript.ASTTree.ASTCall.interpret(ASTCall.java:197) at com.ibm.jscript.ASTTree.ASTTry.interpretCatch(ASTTry.java:150) at com.ibm.jscript.ASTTree.ASTTry.interpret(ASTTry.java:113) 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:686) 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:222) at com.ibm.xsp.javascript.JavaScriptInterpreter.interpret(JavaScriptInterpreter.java:194) at com.ibm.xsp.binding.javascript.JavaScriptValueBinding.getValue(JavaScriptValueBinding.java:78) at com.ibm.xsp.component.xp.XspOutputLabel.getFor(XspOutputLabel.java:158) at sun.reflect.GeneratedMethodAccessor25.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55) at java.lang.reflect.Method.invoke(Method.java:508) at javax.faces.component.UIComponentBase$AttributesMap.put(UIComponentBase.java:1863) at com.ibm.xsp.stylekit.StyleKitImpl.applyProperties(StyleKitImpl.java:391) at com.ibm.xsp.stylekit.StyleKitImpl.applyStyle(StyleKitImpl.java:240) at com.ibm.xsp.stylekit.StyleKitImpl._applyStyles(StyleKitImpl.java:196) at com.ibm.xsp.stylekit.StyleKitImpl._applyStyles(StyleKitImpl.java:203) at com.ibm.xsp.stylekit.StyleKitImpl._applyStyles(StyleKitImpl.java:203) at com.ibm.xsp.stylekit.StyleKitImpl._applyStyles(StyleKitImpl.java:203) at com.ibm.xsp.stylekit.StyleKitImpl._applyStyles(StyleKitImpl.java:203) at com.ibm.xsp.stylekit.StyleKitImpl._applyStyles(StyleKitImpl.java:203) at com.ibm.xsp.stylekit.StyleKitImpl._applyStyles(StyleKitImpl.java:203) at com.ibm.xsp.stylekit.StyleKitImpl._applyStyles(StyleKitImpl.java:203) at com.ibm.xsp.stylekit.StyleKitImpl._applyStyles(StyleKitImpl.java:203) at com.ibm.xsp.stylekit.StyleKitImpl._applyStyles(StyleKitImpl.java:203) at com.ibm.xsp.stylekit.StyleKitImpl._applyStyles(StyleKitImpl.java:203) at com.ibm.xsp.stylekit.StyleKitImpl._applyStyles(StyleKitImpl.java:203) at com.ibm.xsp.stylekit.StyleKitImpl._applyStyles(StyleKitImpl.java:203) at com.ibm.xsp.stylekit.StyleKitImpl._applyStyles(StyleKitImpl.java:203) at com.ibm.xsp.stylekit.StyleKitImpl._applyStyles(StyleKitImpl.java:203) at com.ibm.xsp.stylekit.StyleKitImpl._applyStyles(StyleKitImpl.java:203) at com.ibm.xsp.stylekit.StyleKitImpl._applyStyles(StyleKitImpl.java:203) at com.ibm.xsp.stylekit.StyleKitImpl._applyStyles(StyleKitImpl.java:203) at com.ibm.xsp.stylekit.StyleKitImpl._applyStyles(StyleKitImpl.java:203) at com.ibm.xsp.stylekit.StyleKitImpl._applyStyles(StyleKitImpl.java:203) at com.ibm.xsp.stylekit.StyleKitImpl.applyStyles(StyleKitImpl.java:192) at com.ibm.xsp.application.ViewHandlerEx.applyStyles(ViewHandlerEx.java:137) at com.ibm.xsp.application.ViewHandlerEx.createView(ViewHandlerEx.java:93) 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.Throwable: Error:'compositeData' not found at com.paulwithers.openLog.OpenLogErrorHolder.getInterpretException(OpenLogErrorHolder.java:113) ... 67 more
Upvotes: 1
Views: 305
Reputation: 10485
Next time, you can do the following:
Create a Java class "JavaScriptDebugBindingFactory"
package ch.hasselba.xpages;
import com.ibm.xsp.binding.BindingFactory;
import com.ibm.xsp.util.ValueBindingUtil;
import javax.faces.application.Application;
import javax.faces.el.MethodBinding;
import javax.faces.el.ValueBinding;
public class JavaScriptDebugBindingFactory implements BindingFactory {
public static final String JAVASCRIPT = "javascript";
public String getPrefix() {
return "javascript";
}
public MethodBinding createMethodBinding(Application app, String str,
Class[] arr) {
String tmpStr = ValueBindingUtil.parseSimpleExpression(str);
return new JavaScriptDebugMethodBinding(tmpStr, arr);
}
public ValueBinding createValueBinding(Application app, String str) {
String tmpSttr = ValueBindingUtil.parseSimpleExpression(str);
return new JavaScriptDebugValueBinding(tmpStr);
}
}
Add the MethodBinding class
package ch.hasselba.xpages;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.el.EvaluationException;
import javax.faces.el.MethodNotFoundException;
import com.ibm.xsp.binding.javascript.JavaScriptMethodBinding;
import com.ibm.xsp.exception.EvaluationExceptionEx;
public class JavaScriptDebugMethodBinding extends JavaScriptMethodBinding {
public JavaScriptDebugMethodBinding() {
super(null, null);
}
public JavaScriptDebugMethodBinding(String str,
Class[] arr) {
super(str, arr);
}
public Object invoke(FacesContext fc, Object[] obj)
throws EvaluationException, MethodNotFoundException {
UIComponent cmp = getComponent();
try {
return super.invoke(fc, obj);
} catch (EvaluationExceptionEx e) {
System.out.println("COMPONENT: " + cmp.getId());
throw e;
}
}
}
Add class JavaScriptDebugValueBinding
package ch.hasselba.xpages;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.el.EvaluationException;
import javax.faces.el.PropertyNotFoundException;
import com.ibm.xsp.binding.javascript.JavaScriptValueBinding;
import com.ibm.xsp.exception.EvaluationExceptionEx;
public class JavaScriptDebugValueBinding extends JavaScriptValueBinding {
public JavaScriptDebugValueBinding() {
super();
}
public JavaScriptDebugValueBinding(String str) {
super(str);
}
public Object getValue(FacesContext fc) throws EvaluationException,
PropertyNotFoundException {
UIComponent cmp = getComponent();
try {
return super.getValue(fc);
} catch (EvaluationExceptionEx e) {
System.out.println("COMPONENT: " + cmp.getId());
throw e;
}
}
}
Overwrite the JavaScript Handler in beforePageLoad
<xp:this.beforePageLoad>
<![CDATA[#{javascript:
importPackage( ch.hasselba.xpages );
var facts = facesContext.getApplication().getFactoryLookup();
facts.setFactory("javascript", new ch.hasselba.xpages.JavaScriptDebugBindingFactory())
}]]>
</xp:this.beforePageLoad>
When an error oocurs, the id of the component is printed to the server console.
Upvotes: 3
Reputation: 15739
As Sven says, the line including com.ibm.xsp.component
is the one to check for, in this case com.ibm.xsp.component.xp.XspOutputLabel.getFor(XspOutputLabel.java:158) at
. This actually should give you plenty of information to fix the problem. XspOutputLabel
means it's a label component - look at the built Java classes in Package Explorer in the local
folder and you'll see what Java classes get created for an XPage (choose a simple XPage!). The get....
bit also tells you which property the error is being triggered for, in this case getFor
means it's the for
property. The error says it's failing in a computation to set compositeData
. So look for a Label that has a computed for
property that uses compositeData
.
Typically, if you're getting a vague "_id...." it means the component doesn't have the id
attribute set, so just <xp:label value="My Label"></xp:label>
instead of <xp:label id="myLabel" value="My Label"></xp:label>
.
Upvotes: 3