Expand my Community achievements bar.

SOLVED

Publisher: Page load error; Cannot get DefaultSlingScript

Avatar

Level 3

Hello All,

I have a new component in AEM 6.4 which works fine in author/publisher in local.

Also it is fine in author/publisher in dev env. and when I go to QA env. It works and show correctly in author and wcmmode=disabled

But in publisher of QA, I will get this error and Page is not rendering...

org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: org.apache.sling.api.scripting.ScriptEvaluationException: java.lang.NullPointerException

Any idea what can be wrong in different environment? Not any more info in log....

(there is this warn before this error: com.day.cq.wcm.webservicesupport.impl.ConfigurationManagerImpl Cloud service /etc/cloudservices/sdltms-translation/SdlTms1 not found)

Thanks for your time

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi,

Check if you are referring to any system user and system user is having required permissions in QA publish instance. Also, if you are using any login administrator code to get the session which might be causing the issue.

Try to check the error logs to find the exact line of code which is causing the exception which gives idea about the exception.

View solution in original post

4 Replies

Avatar

Level 10

There is something different in that other environment. It could be purhaps not all OSGi bundles are active for example.

Avatar

Community Advisor

please check your bundle is active or not.

if no error is coming and still installed state, try to check dependencies in the bundle, are they active?

Avatar

Correct answer by
Community Advisor

Hi,

Check if you are referring to any system user and system user is having required permissions in QA publish instance. Also, if you are using any login administrator code to get the session which might be causing the issue.

Try to check the error logs to find the exact line of code which is causing the exception which gives idea about the exception.

Avatar

Level 3

I couldn't figure it out anything more, no more log or specific lines of code. Bundles looked like ok!

Finally we have restart the qa publish environment and it works fine without issue.

Thanks everyone.