[MAGNOLIA-4725] ItemNotFoundException thrown by DelegateNodeWrapper Created: 12/Dec/12 Updated: 02/May/13 Resolved: 30/Jan/13 |
|
| Status: | Closed |
| Project: | Magnolia |
| Component/s: | core |
| Affects Version/s: | 4.5.6 |
| Fix Version/s: | 4.5.8, 5.0 |
| Type: | Bug | Priority: | Neutral |
| Reporter: | Tomas Brimor | Assignee: | Jaroslav Simak |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Template: |
|
||||
| Acceptance criteria: |
Empty
|
||||
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
||||
| Bug DoR: |
[ ]*
Steps to reproduce, expected, and actual results filled
[ ]*
Affected version filled
|
||||
| Date of First Response: | |||||
| Description |
2012-12-12 11:04:27,008 ERROR magnolia.templating.jsp.taglib.SimpleNavigationTag: Failed to obtain parent page for /XXX/CCC/content/02
javax.jcr.ItemNotFoundException: Root node doesn't have a parent
at org.apache.jackrabbit.core.NodeImpl$6.perform(NodeImpl.java:1712)
at org.apache.jackrabbit.core.NodeImpl$6.perform(NodeImpl.java:1705)
at org.apache.jackrabbit.core.session.SessionState.perform(SessionState.java:216)
at org.apache.jackrabbit.core.ItemImpl.perform(ItemImpl.java:91)
at org.apache.jackrabbit.core.NodeImpl.getParent(NodeImpl.java:1705)
at info.magnolia.jcr.wrapper.DelegateNodeWrapper.getParent(DelegateNodeWrapper.java:484)
at info.magnolia.jcr.decoration.ContentDecoratorNodeWrapper.getParent(ContentDecoratorNodeWrapper.java:89)
at info.magnolia.jcr.wrapper.DelegateNodeWrapper.getParent(DelegateNodeWrapper.java:484)
at info.magnolia.jcr.wrapper.I18nNodeWrapper.getParent(I18nNodeWrapper.java:87)
at info.magnolia.cms.core.DefaultContent.getParent(DefaultContent.java:343)
at info.magnolia.templating.jsp.taglib.SimpleNavigationTag.doEndTag(SimpleNavigationTag.java:360)
at freemarker.ext.jsp.TagTransformModel$TagWriter.endEvaluation(TagTransformModel.java:430)
at freemarker.ext.jsp.TagTransformModel$TagWriter.onStart(TagTransformModel.java:369)
at freemarker.core.Environment.visit(Environment.java:307)
at freemarker.core.UnifiedCall.accept(UnifiedCall.java:130)
at freemarker.core.Environment.visit(Environment.java:221)
at freemarker.core.MixedContent.accept(MixedContent.java:92)
at freemarker.core.Environment.visit(Environment.java:221)
at freemarker.core.Environment.process(Environment.java:199)
at freemarker.template.Template.process(Template.java:237)
at info.magnolia.freemarker.FreemarkerHelper.render(FreemarkerHelper.java:155)
at info.magnolia.rendering.renderer.FreemarkerRenderer.onRender(FreemarkerRenderer.java:85)
at info.magnolia.rendering.renderer.AbstractRenderer.render(AbstractRenderer.java:139)
at info.magnolia.rendering.engine.DefaultRenderingEngine.render(DefaultRenderingEngine.java:97)
at info.magnolia.rendering.engine.DefaultRenderingEngine$$EnhancerByCGLIB$$584c3508.render(<generated>)
at info.magnolia.templating.elements.ComponentElement.begin(ComponentElement.java:151)
at info.magnolia.templating.freemarker.AbstractDirective.execute(AbstractDirective.java:93)
at freemarker.core.Environment.visit(Environment.java:274)
at freemarker.core.UnifiedCall.accept(UnifiedCall.java:126)
at freemarker.core.Environment.visit(Environment.java:221)
at freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:179)
at freemarker.core.Environment.visit(Environment.java:428)
|
| Comments |
| Comment by Jan Haderka [ 14/Dec/12 ] |
|
Actually, according to spec it's correct for Node to throw INFE when called on root. Check the DefaultContent behaviour on such call in 4.4 to see if it was not changed. Otherwise it would have to be fixed in the tag. |
| Comment by Jaroslav Simak [ 14/Dec/12 ] |
|
Behaviour of DefaultContent in 4.4 is the same as in 4.5. When trying to obtain parent node on root node same exception is thrown. |
| Comment by Jan Haderka [ 26/Jan/13 ] |
+ // INFE may be thrown by activePage.getParent() when called on a root node
Well you should check that activePage is indeed a root page in this case, before discarding the exception. Also where is the fix for 5.0 branch? |