org.apache.sling.scripting.sightly.render.ObjectModel Cannot access method
does anyone know why i'm getting this error?
i'm working on migration for on premise AEM TO AEMaaCS.
Views
Replies
Total Likes
Hi,
Which method is it unable to acces ? Any OOTB or custom code which is throwing the error ? Providing more details about the error stacktrace can be helpful for community to comment on the same.
Suggest to check the bundles in OSGI console if they are in active state or not ? Also compare the bundle status wrt to on prem AEM . That may give you some more clue.
Thanks,
Somen
its custom code and the error look like this
which is custom code and the error looks like this
08.05.2023 10:32:30.641 *ERROR* [[0:0:0:0:0:0:0:1] [1683522150107] GET /content/siteroot.html HTTP/1.1] org.apache.sling.scripting.sightly.render.ObjectModel Cannot access method country on object com.ob.code.aem.core.models.pages.v1.webRootModel@84efaaa
java.lang.reflect.InvocationTargetException: null
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.apache.sling.scripting.sightly.render.ObjectModel.invokeBeanMethod(ObjectModel.java:448) [org.apache.sling.scripting.sightly.runtime:1.2.6.140]
at org.apache.sling.scripting.sightly.render.ObjectModel.resolveProperty(ObjectModel.java:131) [org.apache.sling.scripting.sightly.runtime:1.2.6.140]
at org.apache.sling.scripting.sightly.render.AbstractRuntimeObjectModel.getProperty(AbstractRuntimeObjectModel.java:153) [org.apache.sling.scripting.sightly.runtime:1.2.6.140]
at org.apache.sling.scripting.sightly.impl.engine.runtime.SlingRuntimeObjectModel.getProperty(SlingRuntimeObjectModel.java:103) [org.apache.sling.scripting.sightly:1.4.20.140]
at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034) [org.apache.felix.http.jetty:4.2.2]
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.NullPointerException: null
at com.ob.code.aem.core.models.pages.v1.webRootModel.getCountry(webRootModel.java:30)
In webRootModel class throwing the null pointer exception. Try debugging why getCountry method is returning null ?
@vkarthick You must check the error logs, if any bundle is not activated that is responsible to resolve sightly (HTL) APIs, like org.apache.sling.scripting.sightly
We might need to restart this bundle
the only error i'm getting is the above one and the bundle is active
@vkarthick - Make sure all the bundle are in active status and if not active try to refresh the bundle, it will resolve the issue and also monitor error logs.
Thanks,
yes, its
Views
Likes
Replies
Views
Likes
Replies