AEM exception : Uncaught SlingException org.apache.sling.scripting.jsp.jasper.JasperException: Unable to compile | Community
Skip to main content
January 19, 2016
Solved

AEM exception : Uncaught SlingException org.apache.sling.scripting.jsp.jasper.JasperException: Unable to compile

  • January 19, 2016
  • 4 replies
  • 8340 views
AEM exception : Uncaught SlingException org.apache.sling.scripting.jsp.jasper.JasperException: Unable to compile
 

Hi Friends,

 

Need your hep in resolving below exceptions: getting below exception post migration from AEM 5.6.1 to AEM 6.1.

All bundles are in active state.

19.01.2016 02:53:11.724 *ERROR*  com.day.cq.wcm.tags.IncludeTag Error while executing script content.jsp
org.apache.sling.api.scripting.ScriptEvaluationException: org.apache.sling.scripting.jsp.jasper.JasperException: Unable to compile class for JSP: 

An error occurred at line: 83 in the jsp file: /apps/social/commons/commons.jsp
The method getUserProperties(ResourceResolver, String) is undefined for the type CollabUtil
80:         final CollabUser author = resource.adaptTo(Comment.class).getAuthor();
81:         final ValueMap map = resource.adaptTo(ValueMap.class);
82:         resourceAuthorID = map.get("userIdentifier", String.class);
83:         final UserProperties userProperties = CollabUtil.getUserProperties(resourceResolver,
84:             resourceAuthorID);
85:         if(userProperties != null){
86:             resourceAuthorName = userProperties.getDisplayName();

     at org.apache.sling.scripting.core.impl.DefaultSlingScript.call(DefaultSlingScript.java:388)
    at org.apache.sling.scripting.core.impl.DefaultSlingScript.eval(DefaultSlingScript.java:171)
    at org.apache.sling.scripting.core.impl.DefaultSlingScript.service(DefaultSlingScript.java:463)
    at com.day.cq.wcm.tags.IncludeTag.includeScript(IncludeTag.java:167)
    at com.day.cq.wcm.tags.IncludeTag.doEndTag(IncludeTag.java:87)
    at org.apache.jsp.apps.usg_005fcom.components.templates.t05_005fproductdetail.body_jsp._jspx_meth_cq_005finclude_005f1(body_jsp.java:331)
    at org.apache.jsp.apps.usg_005fcom.components.templates.t05_005fproductdetail.body_jsp._jspService(body_jsp.java:280)
    at org.apache.sling.scripting.jsp.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
    at org.apache.sling.scripting.jsp.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:502)
    at org.apache.sling.scripting.jsp.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:449)
    at org.apache.sling.scripting.jsp.JspScriptEngineFactory.callJsp(JspScriptEngineFactory.java:284)
    at org.apache.sling.scripting.jsp.JspScriptEngineFactory.access$100(JspScriptEngineFactory.java:102)
    at org.apache.sling.scripting.jsp.JspScriptEngineFactory$JspScriptEngine.eval(JspScriptEngineFactory.java:536)
    at org.apache.sling.scripting.core.impl.DefaultSlingScript.call(DefaultSlingScript.java:361)
    at org.apache.sling.scripting.core.impl.DefaultSlingScript.eval(DefaultSlingScript.java:171)
    at org.apache.sling.scripting.core.impl.DefaultSlingScript.service(DefaultSlingScript.java:463)
    at com.day.cq.wcm.tags.IncludeTag.includeScript(IncludeTag.java:167)
    at com.day.cq.wcm.tags.IncludeTag.doEndTag(IncludeTag.java:87)
    at org.apache.jsp.apps.usg_005fcom.components.templates.basepage.basepage_jsp._jspx_meth_cq_005finclude_005f1(basepage_jsp.java:286)
    at org.apache.jsp.apps.usg_005fcom.components.templates.basepage.basepage_jsp._jspService(basepage_jsp.java:240)
    at org.apache.sling.scripting.jsp.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
    at org.apache.sling.scripting.jsp.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:502)
    at org.apache.sling.scripting.jsp.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:449)
    at org.apache.sling.scripting.jsp.JspScriptEngineFactory.callJsp(JspScriptEngineFactory.java:284)
    at org.apache.sling.scripting.jsp.JspScriptEngineFactory.access$100(JspScriptEngineFactory.java:102)
    at org.apache.sling.scripting.jsp.JspScriptEngineFactory$JspScriptEngine.eval(JspScriptEngineFactory.java:536)
    at org.apache.sling.scripting.core.impl.DefaultSlingScript.call(DefaultSlingScript.java:361)
    at org.apache.sling.scripting.core.impl.DefaultSlingScript.eval(DefaultSlingScript.java:171)
    at org.apache.sling.scripting.core.impl.DefaultSlingScript.service(DefaultSlingScript.java:463)
    at org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:533)
    at org.apache.sling.engine.impl.filter.SlingComponentFilterChain.render(SlingComponentFilterChain.java:44)
    at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:77)
    at com.day.cq.personalization.impl.TargetComponentFilter.doFilter(TargetComponentFilter.java:96)
    at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
    at com.day.cq.wcm.core.impl.WCMDebugFilter.doFilterWithErrorHandling(WCMDebugFilter.java:182)
    at com.day.cq.wcm.core.impl.WCMDebugFilter.doFilter(WCMDebugFilter.java:149)
    at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
    at com.day.cq.wcm.core.impl.WCMComponentFilter.doFilter(WCMComponentFilter.java:259)
    at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
    at com.day.cq.wcm.core.impl.WCMDeveloperModeFilter.doFilter(WCMDeveloperModeFilter.java:117)
    at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
    at org.apache.sling.engine.impl.SlingRequestProcessorImpl.processComponent(SlingRequestProcessorImpl.java:282)
    at org.apache.sling.engine.impl.SlingRequestProcessorImpl.dispatchRequest(SlingRequestProcessorImpl.java:322)
    at org.apache.sling.engine.impl.request.SlingRequestDispatcher.dispatch(SlingRequestDispatcher.java:216)
    at org.apache.sling.engine.impl.request.SlingRequestDispatcher.include(SlingRequestDispatcher.java:103)
    at com.day.cq.wcm.core.impl.WCMComponentFilter$ForwardRequestDispatcher.include(WCMComponentFilter.java:445)
    at org.apache.jsp.libs.foundation.components.primary.cq.Page.Page_jsp._jspService(Page_jsp.java:106)
    at org.apache.sling.scripting.jsp.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)

 

Thanks

Chandra

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Jitendra_S_Toma

Hi,

I think CollabUtil API's are depreciated in AEM 6.0 onwards. You might need to find alternative API. I may not able to suggest without understanding the purpose of the code.

Possible API could be "SocialUtils" or "SocialResourceUtils"

https://docs.adobe.com/docs/en/aem/6-1/ref/diff-previous/changes.html

https://docs.adobe.com/docs/en/aem/6-0/develop/ref/javadoc/deprecated-list.html

Jitendra

4 replies

kautuk_sahni
Community Manager
Community Manager
January 19, 2016

That error is usually related to the Java JDK you are running and the version of AEM you are running. If you are running AEM 6.0 without having installed any service Pack, you have to be using Java version 7 (do a java -v command from the command line to checkout your version).

 

If you are running Java version 8, install Service Pack 1 or 2.

 

Reference Link:- http://stackoverflow.com/questions/28404003/issue-with-installing-aem-6

 

 

Thanks and Regards

Kautuk Sahni

Kautuk Sahni
Jitendra_S_Toma
Level 10
January 19, 2016

Hi,

AEM 6.1 is perfectly all right with Java 8.. I don't think, any service pack is required.

Try compiling all your jsp's through the bundle once. Let's see if this gets resolved.

http://localhost:4502/system/console/slingjsp

Jitendra

Jitendra_S_Toma
Jitendra_S_TomaAccepted solution
Level 10
January 19, 2016

Hi,

I think CollabUtil API's are depreciated in AEM 6.0 onwards. You might need to find alternative API. I may not able to suggest without understanding the purpose of the code.

Possible API could be "SocialUtils" or "SocialResourceUtils"

https://docs.adobe.com/docs/en/aem/6-1/ref/diff-previous/changes.html

https://docs.adobe.com/docs/en/aem/6-0/develop/ref/javadoc/deprecated-list.html

Jitendra

Level 3
January 12, 2018

Were you able to resolve this?