Details
-
Bug
-
Resolution: Fixed
-
Major
-
3.2
-
None
-
Unit
-
Easy
-
N/A
-
N/A
-
Description
The following script:
{{velocity}} #set ($sheetReference = $services.model.createDocumentReference('xwiki', 'Blog', 'BlogPostSheet')) $services.sheet.getDocuments($sheetReference) {{/velocity}}
Throws the following exception:
Caused by: org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getDocuments' in class com.xpn.xwiki.internal.sheet.scripting.SheetScriptService threw exception java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to [Ljava.lang.String; at xwiki:Sandbox.FF[line 2, column 17] at org.apache.velocity.runtime.parser.node.ASTMethod.handleInvocationException(ASTMethod.java:243) at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:187) at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:280) at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:369) at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:342) at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:228) ... 115 more Caused by: java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to [Ljava.lang.String; at com.xpn.xwiki.internal.sheet.AbstractSheetBinder.getDocuments(AbstractSheetBinder.java:141) at com.xpn.xwiki.internal.sheet.scripting.SheetScriptService.getDocuments(SheetScriptService.java:175) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.doInvoke(UberspectImpl.java:395) at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:384) at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:173) ... 119 more