From the Global Template, in the context of any of the articles, I’m trying to get to the RSS feed, so I can add an autodiscovery <link rel=“alternate”/> tag to the header.
Now I’d expect this either to tell me that it can’t find the node or to put some sort of debugging information in from <p>[$rssNode]</p>.
Instead, however, I’m getting a deeply unhelpful error message:
Problem assembling output for item: 1-101-5045 with template: uswGtUKMarketNews exception: com.percussion.utils.jsr170.PSNodeIterator see log for stack trace
With no stack trace to be found anywhere.
Firstly, can anyone divine from this what’s actually going on? Secondly, how do I get it to work?
I don’t believe that’s the problem, as it’s entering the #if condition, it’s erroring on the Node.getNode call (it wasn’t erroring before I added that line). I just can’t work out how to get the Node: it should be coming straight back from Node.getNode(String), which returns type Node, but isn’t.
[QUOTE=dbenua;470]As for the log, look at
/Rhythmyx/AppServer/server/rx/log/server.log.
This file should contain all of your error trace information.[/QUOTE]
Forget that part of my query — it is in the console.log, I was looking on the wrong machine
Fwiw, the stack trace begins:
2007-09-11 09:08:41,900 ERROR [PSVelocityAssembler] Problem assembling output for item: 1-101-5045 with template: uswGtUKMarketNews
java.lang.ClassCastException: com.percussion.utils.jsr170.PSNodeIterator
at $Proxy112.getNode(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:267)
at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:197)
at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:175)
at org.apache.velocity.runtime.parser.node.ASTReference.value(ASTReference.java:327)
at org.apache.velocity.runtime.parser.node.ASTExpression.value(ASTExpression.java:51)
at org.apache.velocity.runtime.parser.node.ASTSetDirective.render(ASTSetDirective.java:95)
at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:55)
at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:70)
at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:230)
at org.apache.velocity.runtime.directive.VelocimacroProxy.render(VelocimacroProxy.java:172)
at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:114)
at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:230)
at org.apache.velocity.Template.merge(Template.java:256)
at com.percussion.services.assembly.impl.plugin.PSVelocityAssembler.assembleSingle(Unknown Source)
One thing you need to understand is that the managed nav implementation is a facade on an underlying real content node. A limited set of methods on Node were overridden to create the new behaviors, including adding properties and children. The actual underlying node does not have children itself. It is likely that this is why things aren’t working as expected.
But the reason that your approach isn’t working is that you can only walk the navon children, not all content. So unless the RSS feed is a navon, this won’t work as shown.
If the RSS feed is a distinct content type you might do this with an autoindex, providing you can calculate the grandparent’s path and use that path as part of the JCR query, comparing the pseudo property jcr:path with it.