Getting NullPointerException from RefinedThemes top.vm
Hello,
I'm getting an NullPointerException when using old style wiki markup in RefinedThemes Advanced Theme top.vm section. Other macros seem to work fine (for example {recently-updated})
I have alot of parameters in my normal one, but sake of testing this I just used '{instant-search}' and its still giving the NullPointerException
in the VM I have this line
$helper.renderConfluenceMacro("{instantsearch}")
And confluence page displays this: Error formatting macro: instantsearch: java.lang.NullPointerException
atlassian-confluence.log gives:
2021-09-29 11:28:01,609 ERROR [http-nio-8090-exec-8] [renderer.v2.components.MacroRendererComponent] processMacro Unexpected error rendering macro 'instantsearch': null'
-- url: /display/Space1/Page2 | traceId: dd95bb6afb22ce74 | userName: administrator | referer: https://confluence/pages/resumedraft.action?draftId=603344103&draftShareId=9beeb558-7431-4f53-a5b3-ce01f9eae3e3&
if I'd have to guess I think this has something to do with context confluence macro is being loaded, because when I tried in normal page using ‘Wiki Markup’ Macro, instant-search worked normally.
-Patrick
Comments (7)
-
repo owner -
Thank you!
I did try few things like try making a user macro from the xhtml etc and I somehow got this error also:
2021-09-29 10:55:43,475 ERROR [http-nio-8090-exec-8] [xhtml.view.macro.ViewMacroMarshaller] handleMacroExecutionException Error rendering macro: instantsearch
-- url: /display/Space1/Page2 | traceId: c9e847c0405b9a79 | userName: administrator | referer: https://confluence/pages/resumedraft.action?draftId=7043482234&draftShareId=9baab449-7431-4f49-a5a5-cc01f9eae3e3&
java.lang.NullPointerException
at org.precog.instantsearch.InstantSearchMacro.execute(InstantSearchMacro.java:204)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.atlassian.confluence.macro.xhtml.XhtmlMacroManager$ResourceAwareMacroInvocationHandler.invoke(XhtmlMacroManager.java:208)
at com.sun.proxy.$Proxy3231.execute(Unknown Source)
…Latest Server version of instant-search 2.6.0
Atlassian Confluence Server 7.13.1
Refined for Confluence 7.0.12-Patrick
-
repo owner Thanks! Just noting for the ticket that the error line is 204: at org.precog.instantsearch.InstantSearchMacro.execute(InstantSearchMacro.java:204)
I think I have a fix for it (if indeed this is the only error). Looks like putting the macro on a non-page entity was causing the bug. I’m hoping with this fix it shouldn’t be a problem.
-
repo owner I’ll try to attach the Jar through here.
-
repo owner - attached instantsearch-2.6.1-RC1.jar
this should fix that one error. Let me know if it fixes the other one as well and I can to a patch release.
Thanks.
-
Perfect! Yeah, instantsearch-2.6.1-RC1.jar did indeed fix it, thank you!
-
repo owner - changed status to resolved
Excellent. Thanks for providing the error report. I'll release an official 2.6.1 today with that release fix in it.
- Log in to comment
I’ll take a look.
Any additional errors?
What version of InstantSearch are you using?