AEM 6.0 Installation Error | Community
Skip to main content
New Participant
October 16, 2015
Solved

AEM 6.0 Installation Error

  • October 16, 2015
  • 7 replies
  • 5274 views

Hi,

I installed AEM 6.0 on Centos latest version 7 64 bit.

 

After installation done , am getting the below error.

Unable to compile class for JSP: An error occurred at line: 95 in the jsp file: /libs/granite/core/components/login/login.jsp The type java.lang.CharSequence cannot be resolved. It is indirectly referenced from required .class files 92: ? request.getParameter(PARAM_NAME_REASON) 93: : ""; 94: 95: if (!StringUtils.isEmpty(reason)) { 96: if (validReasons.containsKey(reason)) { 97: reason = validReasons.get(reason); 98: } else { An error occurred at line: 95 in the jsp file: /libs/granite/core/components/login/login.jsp The method isEmpty(CharSequence) in the type StringUtils is not applicable for the arguments (String) 92: ? request.getParameter(PARAM_NAME_REASON) 93: : ""; 94: 95: if (!StringUtils.isEmpty(reason)) { 96: if (validReasons.containsKey(reason)) { 97: reason = validReasons.get(reason); 98: } else {

Cannot serve request to /libs/granite/core/content/login.html in /libs/granite/core/components/login/login.jsp

Exception:

org.apache.sling.scripting.jsp.jasper.JasperException: Unable to compile class for JSP: An error occurred at line: 95 in the jsp file: /libs/granite/core/components/login/login.jsp The type java.lang.CharSequence cannot be resolved. It is indirectly referenced from required .class files 92:             ? request.getParameter(PARAM_NAME_REASON) 93:             : ""; 94: 95:     if (!StringUtils.isEmpty(reason)) { 96:         if (validReasons.containsKey(reason)) { 97:             reason = validReasons.get(reason); 98:         } else { An error occurred at line: 95 in the jsp file: /libs/granite/core/components/login/login.jsp The method isEmpty(CharSequence) in the type StringUtils is not applicable for the arguments (String) 92:             ? request.getParameter(PARAM_NAME_REASON) 93:             : ""; 94: 95:     if (!StringUtils.isEmpty(reason)) { 96:         if (validReasons.containsKey(reason)) { 97:             reason = validReasons.get(reason); 98:         } else { at org.apache.sling.scripting.jsp.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92) at org.apache.sling.scripting.jsp.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330) at org.apache.sling.scripting.jsp.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:421)

Request Progress:

0 (2014-10-21 10:43:21) TIMER_START{Request Processing} 0 (2014-10-21 10:43:21) COMMENT timer_end format is {<elapsed msec>,<timer name>} <optional message> 0 (2014-10-21 10:43:21) LOG Method=GET, PathInfo=/libs/granite/core/content/login.html 0 (2014-10-21 10:43:21) TIMER_START{ResourceResolution} 0 (2014-10-21 10:43:21) TIMER_END{0,ResourceResolution} URI=/libs/granite/core/content/login.html resolves to Resource=JcrNodeResource, type=granite/core/components/login, superType=null, path=/libs/granite/core/content/login 0 (2014-10-21 10:43:21) LOG Resource Path Info: SlingRequestPathInfo: path='/libs/granite/core/content/login', selectorString='null', extension='html', suffix='null' 0 (2014-10-21 10:43:21) TIMER_START{ServletResolution} 0 (2014-10-21 10:43:21) TIMER_START{resolveServlet(JcrNodeResource, type=granite/core/components/login, superType=null, path=/libs/granite/core/content/login)} 0 (2014-10-21 10:43:21) TIMER_END{0,resolveServlet(JcrNodeResource, type=granite/core/components/login, superType=null, path=/libs/granite/core/content/login)} Using servlet /libs/granite/core/components/login/login.jsp 0 (2014-10-21 10:43:21) TIMER_END{0,ServletResolution} URI=/libs/granite/core/content/login.html handled by Servlet=/libs/granite/core/components/login/login.jsp 0 (2014-10-21 10:43:21) LOG Applying Requestfilters 0 (2014-10-21 10:43:21) LOG Calling filter: com.adobe.granite.resourceresolverhelper.impl.ResourceResolverHelperImpl 0 (2014-10-21 10:43:21) LOG Calling filter: org.apache.sling.bgservlets.impl.BackgroundServletStarterFilter 0 (2014-10-21 10:43:21) LOG Calling filter: com.adobe.cq.dam.s7imaging.impl.auth.MemoryTokenAuthHandler 0 (2014-10-21 10:43:21) LOG Calling filter: org.apache.sling.i18n.impl.I18NFilter 0 (2014-10-21 10:43:21) LOG Calling filter: com.adobe.granite.httpcache.impl.InnerCacheFilter 0 (2014-10-21 10:43:21) LOG Calling filter: org.apache.sling.rewriter.impl.RewriterFilter 1 (2014-10-21 10:43:21) LOG Calling filter: com.day.cq.wcm.designimporter.CanvasPageDeleteRequestFilter 1 (2014-10-21 10:43:21) LOG Calling filter: com.adobe.cq.history.impl.HistoryRequestFilter 1 (2014-10-21 10:43:21) LOG Calling filter: com.day.cq.wcm.core.impl.WCMRequestFilter 1 (2014-10-21 10:43:21) LOG Calling filter: com.adobe.granite.optout.impl.OptOutFilter 1 (2014-10-21 10:43:21) LOG Calling filter: com.day.cq.theme.impl.ThemeResolverFilter 1 (2014-10-21 10:43:21) LOG Calling filter: com.day.cq.wcm.foundation.forms.impl.FormsHandlingServlet 1 (2014-10-21 10:43:21) LOG Calling filter: com.adobe.cq.social.commons.cors.CORSAuthenticationFilter 1 (2014-10-21 10:43:21) LOG Calling filter: org.apache.sling.engine.impl.debug.RequestProgressTrackerLogFilter 1 (2014-10-21 10:43:21) LOG Calling filter: com.day.cq.wcm.mobile.core.impl.redirect.RedirectFilter 1 (2014-10-21 10:43:21) LOG RedirectFilter did not redirect (request path does not match) 1 (2014-10-21 10:43:21) LOG Calling filter: com.day.cq.wcm.core.impl.warp.TimeWarpFilter 1 (2014-10-21 10:43:21) LOG Calling filter: com.day.cq.wcm.core.impl.AuthoringUIModeServiceImpl 1 (2014-10-21 10:43:21) LOG Calling filter: com.adobe.cq.social.commons.security.SaferSlingPostServlet 1 (2014-10-21 10:43:21) LOG Calling filter: com.adobe.granite.requests.logging.impl.RequestLoggerImpl 1 (2014-10-21 10:43:21) LOG Applying Componentfilters 1 (2014-10-21 10:43:21) LOG Calling filter: com.day.cq.personalization.impl.TargetComponentFilter 1 (2014-10-21 10:43:21) LOG Calling filter: com.day.cq.wcm.core.impl.WCMComponentFilter 1 (2014-10-21 10:43:21) LOG Calling filter: com.day.cq.wcm.core.impl.WCMDebugFilter 1 (2014-10-21 10:43:21) TIMER_START{/libs/granite/core/components/login/login.jsp#0} 2 (2014-10-21 10:43:21) LOG SCRIPT ERROR: org.apache.sling.scripting.jsp.jasper.JasperException: Unable to compile class for JSP: //An error occurred at line: 95 in the jsp file: /libs/granite/core/components/login/login.jsp/The type java.lang.CharSequence cannot be resolved. It is indirectly referenced from required .class files/92:             ? request.getParameter(PARAM_NAME_REASON)/93:             : "";/94: /95:     if (!StringUtils.isEmpty(reason)) {/96:         if (validReasons.containsKey(reason)) {/97:             reason = validReasons.get(reason);/98:         } else {///An error occurred at line: 95 in the jsp file: /libs/granite/core/components/login/login.jsp/The method isEmpty(CharSequence) in the type StringUtils is not applicable for the arguments (String)/92:             ? request.getParameter(PARAM_NAME_REASON)/93:             : "";/94: /95:     if (!StringUtils.isEmpty(reason)) {/96:         if (validReasons.containsKey(reason)) {/97:             reason = validReasons.get(reason);/98:         } else {/ 2 (2014-10-21 10:43:21) TIMER_END{1,/libs/granite/core/components/login/login.jsp#0} 3 (2014-10-21 10:43:21) LOG Applying Error filters 3 (2014-10-21 10:43:21) LOG Calling filter: org.apache.sling.rewriter.impl.RewriterFilter 3 (2014-10-21 10:43:21) TIMER_START{handleError:throwable=org.apache.sling.scripting.jsp.jasper.JasperException} 5 (2014-10-21 10:43:21) TIMER_END{2,handleError:throwable=org.apache.sling.scripting.jsp.jasper.JasperException} Using handler /libs/sling/servlet/errorhandler/default.jsp 8 (2014-10-21 10:43:21) LOG Found processor for post processing ProcessorConfiguration: {contentTypes=[text/html],order=-1, active=true, valid=true, processErrorResponse=true, pipeline=(generator=Config(type=htmlparser, config={}), transformers=(Config(type=linkchecker, config={}), Config(type=mobile, config=JcrPropertyMap [node=Node[NodeDelegate{tree=/libs/cq/config/rewriter/default/transformer-mobile: { jcr:primaryType = nt:unstructured, component-optional = true}}], values={jcr:primaryType=nt:unstructured, component-optional=true}]), Config(type=mobiledebug, config=JcrPropertyMap [node=Node[NodeDelegate{tree=/libs/cq/config/rewriter/default/transformer-mobiledebug: { jcr:primaryType = nt:unstructured, component-optional = true}}], values={jcr:primaryType=nt:unstructured, component-optional=true}]), Config(type=contentsync, config=JcrPropertyMap [node=Node[NodeDelegate{tree=/libs/cq/config/rewriter/default/transformer-contentsync: { jcr:primaryType = nt:unstructured, component-optional = true}}], values={jcr:primaryType=nt:unstructured, component-optional=true}]), serializer=Config(type=htmlwriter, config={}))} 10 (2014-10-21 10:43:21) TIMER_END{10,Request Processing} Dumping SlingRequestProgressTracker Entries

 

Java 1.8 installed and variables also set in /root/.bash_profile

Please do the needful.

 

Thanks & Regards,

Mahesh

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 Sham_HC

Downgrade jdk to 1.7 , install sp1 & then upgrade jdk to 1.8

7 replies

New Participant
January 28, 2016

I've just found a fix for this that worked for me. I was having the same error using jdk1.7.0_80.jdk.

I was looking for ways to switch Java easily and found this: http://www.jayway.com/2014/01/15/how-to-switch-jdk-version-on-mac-os-x-maverick/

So I added this to my bash profile:

function setjdk() {
  if [ $# -ne 0 ]; then
   removeFromPath '/System/Library/Frameworks/JavaVM.framework/Home/bin'
   if [ -n "${JAVA_HOME+x}" ]; then
    removeFromPath $JAVA_HOME
   fi
   export JAVA_HOME=`/usr/libexec/java_home -v $@`
   export PATH=$JAVA_HOME/bin:$PATH
  fi
}
function removeFromPath() {
  export PATH=$(echo $PATH | sed -E -e "s;:$1;;" -e "s;$1:?;;")
}
setjdk 1.7

 

 

Now my version of CQ5 works with Java 1.6. 1.7 and 1.8.

So it must have been something to do with multiple versions of Java in the PATH conflicting.

Sham_HC
Sham_HCAccepted solution
New Participant
October 16, 2015

Downgrade jdk to 1.7 , install sp1 & then upgrade jdk to 1.8

October 16, 2015

I got the same error. In my case JDK 1.8 was already installed on machine because of which AEM 6.0 was not working.

-- I install JDK 1.7

-- Uninstall JDK 1.8. Deleted the crx-quickstart folder.

-- Start new instance of AEM 6.0. It worked :)

kalle-kula
New Participant
October 16, 2015

On Mac Os X if you run java version 1.8:
1. Download AEM 6.0 Service Pack 2-1.0: http://docs.adobe.com/docs/en/aem/6-0/release-notes-sp2.html (follow the download link)
2. Unzip AEM 6.0 Service Pack 2-1.0 zip file.
3. Create a new folder called "install" in the root of the folder: crx-quickstart
4. Copy the content inside AEM 6.0 Service Pack 2-1.0 foldern ( 2 folders: jcr_root & META-INF) into install foldern
5. Run the  cq-quickstart-6.0.0. again. Now it should work again!

My login was change after the update back to the default: admin | admin

smacdonald2008
New Participant
October 16, 2015

Read the supported platform docs listed here:

http://docs.adobe.com/docs/en/aem/6-0/deploy/technical-requirements.html#Supported Platforms

New Participant
October 16, 2015

What if you're getting this error and you're still on Java 1.7?

New Participant
October 16, 2015

The same exception on Mac OS Yosemite 10.10 with idk 1.7.0_71 and jdk 1.8.0_25.