Expand my Community achievements bar.

SOLVED

Unable to start 5.6 Instance

Avatar

Level 4

Hi guys i am getting this error while starting 5.6 jar

Unable to compile class for JSP: An error occurred at line: 98 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 95: ? request.getParameter(PARAM_NAME_REASON) 96: : ""; 97: 98: if (!StringUtils.isEmpty(reason)) { 99: if (validReasons.containsKey(reason)) { 100: reason = validReasons.get(reason); 101: } else { An error occurred at line: 98 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) 95: ? request.getParameter(PARAM_NAME_REASON) 96: : ""; 97: 98: if (!StringUtils.isEmpty(reason)) { 99: if (validReasons.containsKey(reason)) { 100: reason = validReasons.get(reason); 101: } 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: 98 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 95:             ? request.getParameter(PARAM_NAME_REASON) 96:             : ""; 97: 98:      if (!StringUtils.isEmpty(reason)) { 99:           if (validReasons.containsKey(reason)) { 100:                reason = validReasons.get(reason); 101:           } else {   An error occurred at line: 98 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) 95:             ? request.getParameter(PARAM_NAME_REASON) 96:             : ""; 97: 98:      if (!StringUtils.isEmpty(reason)) { 99:           if (validReasons.containsKey(reason)) { 100:                reason = validReasons.get(reason); 101:           } 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) at org.apache.sling.scripting.jsp.jasper.compiler.Compiler.compile(Compiler.java:312) at org.apache.sling.scripting.jsp.jasper.compiler.Compiler.compile(Compiler.java:290) at org.apache.sling.scripting.jsp.jasper.compiler.Compiler.compile(Compiler.java:277) at org.apache.sling.scripting.jsp.jasper.JspCompilationContext.compile(JspCompilationContext.java:501) at org.apache.sling.scripting.jsp.jasper.servlet.JspServletWrapper.prepareServlet(JspServletWrapper.java:427) at org.apache.sling.scripting.jsp.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:486) at org.apache.sling.scripting.jsp.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:449) at org.apache.sling.scripting.jsp.JspScriptEngineFactory.callJsp(JspScriptEngineFactory.java:241) at org.apache.sling.scripting.jsp.JspScriptEngineFactory.access$100(JspScriptEngineFactory.java:86) at org.apache.sling.scripting.jsp.JspScriptEngineFactory$JspScriptEngine.eval(JspScriptEngineFactory.java:441) 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:508) at org.apache.sling.engine.impl.filter.SlingComponentFilterChain.render(SlingComponentFilterChain.java:45) at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:64) at com.day.cq.wcm.core.impl.WCMDebugFilter.doFilter(WCMDebugFilter.java:148) at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:60) at com.day.cq.wcm.core.impl.WCMComponentFilter.filterRootInclude(WCMComponentFilter.java:333) at com.day.cq.wcm.core.impl.WCMComponentFilter.doFilter(WCMComponentFilter.java:160) at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:60) at org.apache.sling.engine.impl.SlingRequestProcessorImpl.processComponent(SlingRequestProcessorImpl.java:254) at org.apache.sling.engine.impl.filter.RequestSlingFilterChain.render(RequestSlingFilterChain.java:49) at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:64) at com.day.cq.wcm.core.impl.warp.TimeWarpFilter.doFilter(TimeWarpFilter.java:106) at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:60) at com.day.cq.wcm.mobile.core.impl.redirect.RedirectFilter.doFilter(RedirectFilter.java:290) at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:60) at org.apache.sling.engine.impl.debug.RequestProgressTrackerLogFilter.doFilter(RequestProgressTrackerLogFilter.java:59) at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:60) at com.day.cq.wcm.foundation.forms.impl.FormsHandlingServlet.doFilter(FormsHandlingServlet.java:220) at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:60) at com.day.cq.theme.impl.ThemeResolverFilter.doFilter(ThemeResolverFilter.java:76) at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:60) at com.adobe.granite.optout.impl.OptOutFilter.doFilter(OptOutFilter.java:74) at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:60) at com.day.cq.wcm.core.impl.WCMRequestFilter.doFilter(WCMRequestFilter.java:90) at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:60) at com.day.cq.wcm.designimporter.CanvasPageDeleteRequestFilter.doFilter(CanvasPageDeleteRequestFilter.java:87) at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:60) at org.apache.sling.rewriter.impl.RewriterFilter.doFilter(RewriterFilter.java:83) at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:60) at org.apache.sling.i18n.impl.I18NFilter.doFilter(I18NFilter.java:127) at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:60) at org.apache.sling.bgservlets.impl.BackgroundServletStarterFilter.doFilter(BackgroundServletStarterFilter.java:135) at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:60) at org.apache.sling.startupfilter.impl.StartupFilterImpl.doFilter(StartupFilterImpl.java:89) at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:60) at org.apache.sling.engine.impl.SlingRequestProcessorImpl.processRequest(SlingRequestProcessorImpl.java:151) at org.apache.sling.engine.impl.SlingMainServlet.service(SlingMainServlet.java:206) at org.apache.felix.http.base.internal.handler.ServletHandler.doHandle(ServletHandler.java:96) at org.apache.felix.http.base.internal.handler.ServletHandler.handle(ServletHandler.java:79) at org.apache.felix.http.base.internal.dispatch.ServletPipeline.handle(ServletPipeline.java:42) at org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:49) at org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.java:33) at org.apache.sling.i18n.impl.I18NFilter.doFilter(I18NFilter.java:127) at org.apache.felix.http.base.internal.handler.FilterHandler.doHandle(FilterHandler.java:88) at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:76) at org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:47) at org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.java:33) at org.apache.felix.http.sslfilter.internal.SslFilter.doFilter(SslFilter.java:55) at org.apache.felix.http.base.internal.handler.FilterHandler.doHandle(FilterHandler.java:88) at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:76) at org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:47) at org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.java:33) at org.apache.sling.security.impl.ReferrerFilter.doFilter(ReferrerFilter.java:259) at org.apache.felix.http.base.internal.handler.FilterHandler.doHandle(FilterHandler.java:88) at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:76) at org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:47) at org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.java:33) at com.adobe.granite.license.impl.LicenseCheckFilter.doFilter(LicenseCheckFilter.java:157) at org.apache.felix.http.base.internal.handler.FilterHandler.doHandle(FilterHandler.java:88) at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:76) at org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:47) at org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.java:33) at org.apache.sling.engine.impl.log.RequestLoggerFilter.doFilter(RequestLoggerFilter.java:75) at org.apache.felix.http.base.internal.handler.FilterHandler.doHandle(FilterHandler.java:88) at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:76) at org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:47) at org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.java:33) at org.apache.felix.http.base.internal.dispatch.FilterPipeline.dispatch(FilterPipeline.java:48) at org.apache.felix.http.base.internal.dispatch.Dispatcher.dispatch(Dispatcher.java:39) at org.apache.felix.http.base.internal.DispatcherServlet.service(DispatcherServlet.java:67) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at com.day.j2ee.servletengine.ServletRuntimeEnvironment.service(ServletRuntimeEnvironment.java:250) at com.day.j2ee.servletengine.RequestDispatcherImpl.doFilter(RequestDispatcherImpl.java:321) at com.day.j2ee.servletengine.RequestDispatcherImpl.service(RequestDispatcherImpl.java:340) at com.day.j2ee.servletengine.RequestDispatcherImpl.service(RequestDispatcherImpl.java:383) at com.day.j2ee.servletengine.ServletHandlerImpl.process(ServletHandlerImpl.java:360) at com.day.j2ee.servletengine.HttpListener$Worker.run(HttpListener.java:644) at java.lang.Thread.run(Unknown Source) 

Request Progress:

      0 (2017-10-05 11:03:56) TIMER_START{Request Processing} 0 (2017-10-05 11:03:56) COMMENT timer_end format is {<elapsed msec>,<timer name>} <optional message> 0 (2017-10-05 11:03:56) LOG Method=GET, PathInfo=/libs/granite/core/content/login.html 1 (2017-10-05 11:03:56) TIMER_START{ResourceResolution} 3 (2017-10-05 11:03:56) TIMER_END{2,ResourceResolution} URI=/libs/granite/core/content/login.html resolves to Resource=, type=granite/core/components/login, path=/libs/granite/core/content/login, resource=[JcrNodeResource, type=granite/core/components/login, superType=null, path=/libs/granite/core/content/login] 4 (2017-10-05 11:03:56) LOG Resource Path Info: SlingRequestPathInfo: path='/libs/granite/core/content/login', selectorString='null', extension='html', suffix='null' 4 (2017-10-05 11:03:56) TIMER_START{ServletResolution} 5 (2017-10-05 11:03:56) TIMER_START{resolveServlet(, type=granite/core/components/login, path=/libs/granite/core/content/login, resource=[JcrNodeResource, type=granite/core/components/login, superType=null, path=/libs/granite/core/content/login])} 56 (2017-10-05 11:03:56) TIMER_END{51,resolveServlet(, type=granite/core/components/login, path=/libs/granite/core/content/login, resource=[JcrNodeResource, type=granite/core/components/login, superType=null, path=/libs/granite/core/content/login])} Using servlet /libs/granite/core/components/login/login.jsp 56 (2017-10-05 11:03:56) TIMER_END{52,ServletResolution} URI=/libs/granite/core/content/login.html handled by Servlet=/libs/granite/core/components/login/login.jsp 57 (2017-10-05 11:03:56) LOG Applying Requestfilters 57 (2017-10-05 11:03:56) LOG Calling filter: org.apache.sling.startupfilter.impl.StartupFilterImpl 61 (2017-10-05 11:03:56) LOG Calling filter: org.apache.sling.bgservlets.impl.BackgroundServletStarterFilter 61 (2017-10-05 11:03:56) LOG Calling filter: org.apache.sling.i18n.impl.I18NFilter 61 (2017-10-05 11:03:56) LOG Calling filter: org.apache.sling.rewriter.impl.RewriterFilter 64 (2017-10-05 11:03:56) LOG Calling filter: com.day.cq.wcm.designimporter.CanvasPageDeleteRequestFilter 64 (2017-10-05 11:03:56) LOG Calling filter: com.day.cq.wcm.core.impl.WCMRequestFilter 64 (2017-10-05 11:03:56) LOG Calling filter: com.adobe.granite.optout.impl.OptOutFilter 64 (2017-10-05 11:03:56) LOG Calling filter: com.day.cq.theme.impl.ThemeResolverFilter 64 (2017-10-05 11:03:56) LOG Calling filter: com.day.cq.wcm.foundation.forms.impl.FormsHandlingServlet 64 (2017-10-05 11:03:56) LOG Calling filter: org.apache.sling.engine.impl.debug.RequestProgressTrackerLogFilter 64 (2017-10-05 11:03:56) LOG Calling filter: com.day.cq.wcm.mobile.core.impl.redirect.RedirectFilter 67 (2017-10-05 11:03:56) LOG RedirectFilter did not redirect (request path does not match) 67 (2017-10-05 11:03:56) LOG Calling filter: com.day.cq.wcm.core.impl.warp.TimeWarpFilter 67 (2017-10-05 11:03:56) LOG Applying Componentfilters 67 (2017-10-05 11:03:56) LOG Calling filter: com.day.cq.wcm.core.impl.WCMComponentFilter 71 (2017-10-05 11:03:56) LOG Calling filter: com.day.cq.wcm.core.impl.WCMDebugFilter 73 (2017-10-05 11:03:56) TIMER_START{/libs/granite/core/components/login/login.jsp#0} 1081 (2017-10-05 11:03:57) LOG SCRIPT ERROR: org.apache.sling.scripting.jsp.jasper.JasperException: Unable to compile class for JSP: //An error occurred at line: 98 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/95:             ? request.getParameter(PARAM_NAME_REASON)/96:             : "";/97:             /98:      if (!StringUtils.isEmpty(reason)) {/99:           if (validReasons.containsKey(reason)) {/100:                reason = validReasons.get(reason);/101:           } else {///An error occurred at line: 98 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)/95:             ? request.getParameter(PARAM_NAME_REASON)/96:             : "";/97:             /98:      if (!StringUtils.isEmpty(reason)) {/99:           if (validReasons.containsKey(reason)) {/100:                reason = validReasons.get(reason);/101:           } else {/ 1081 (2017-10-05 11:03:57) TIMER_END{1008,/libs/granite/core/components/login/login.jsp#0} 1082 (2017-10-05 11:03:57) LOG Applying Error filters 1082 (2017-10-05 11:03:57) LOG Calling filter: org.apache.sling.rewriter.impl.RewriterFilter 1082 (2017-10-05 11:03:57) TIMER_START{handleError:throwable=org.apache.sling.scripting.jsp.jasper.JasperException} 1111 (2017-10-05 11:03:57) TIMER_END{29,handleError:throwable=org.apache.sling.scripting.jsp.jasper.JasperException} Using handler /libs/sling/servlet/errorhandler/default.jsp 1281 (2017-10-05 11:03:57) 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=org.apache.sling.jcr.resource.JcrPropertyMap@7879b5d5), Config(type=mobiledebug, config=org.apache.sling.jcr.resource.JcrPropertyMap@36982b30), Config(type=contentsync, config=org.apache.sling.jcr.resource.JcrPropertyMap@761deb07), serializer=Config(type=htmlwriter, config={}))} 1285 (2017-10-05 11:03:57) TIMER_END{1285,Request Processing} Dumping SlingRequestProgressTracker Entries 

ApacheSling/2.2 (Day-Servlet-Engine/4.1.42, Java HotSpot(TM) 64-Bit Server VM 1.8.0_144, Windows 10 10.0 amd64)

Thanks in advance

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi Ricky,

If you use AEM 5.6.1, then please use JDK 1.7 version because it supports only Java 1.7

Also you said, you installed AEM higher version previously, so that might be the reason you are seeing the error.

Install AEM 5.6.1 with JDK1.7, Clear browser cache and check once again. It should work!!

~Ratna.

View solution in original post

8 Replies

Avatar

Level 10

Hi Ricky,

Please try to clear the browser cache and check once again.

Quick question - Did you installed AEM higher version in your local system before?

Thanks,

Ratna.

Avatar

Administrator

Can you please check the Java & AEM version in use? AEM 5.6.1

Try Downgrade jdk to 1.7 (do not keep 2 version of JDKs).

Some similar reference post:- AEM 6.0 having some issues with java 1.8.

~kautuk



Kautuk Sahni

Avatar

Level 4

HI Ratna Kumar

Yeah, previously I installed 6.2 jar

Avatar

Level 4

Thanks Kautuksahni is JDK 7 is suitable for 5.6 or below version

Avatar

Correct answer by
Level 10

Hi Ricky,

If you use AEM 5.6.1, then please use JDK 1.7 version because it supports only Java 1.7

Also you said, you installed AEM higher version previously, so that might be the reason you are seeing the error.

Install AEM 5.6.1 with JDK1.7, Clear browser cache and check once again. It should work!!

~Ratna.

Avatar

Level 10

Hi Ricky,

Did the AEM 5.6 instance is up and running for you by using JDK 1.7?

~Ratna,

Avatar

Level 4

Hi Ratna

                     I cleared the cache and i up the 5.6 instance, it worked on JDK 1.8 v itself. Except site admin console all the remaining consoles are working fine.  I have to degrade the JDK version and i need to check