Expand my Community achievements bar.

SOLVED

Cannot start AEM

Avatar

Level 1

New to AEM. I am sure this is trivial but would appreciate if you can explain how to fix and why does this happen.

I renamed my quickstart jar to aem-author-p4502.jar and double click.

Get this error on browser

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 {

1 Accepted Solution

Avatar

Correct answer by
Employee

‌Hello,

See this post:

Unable to compile class for JSP: An error occurred at line 95

If you have any questions after reading this, feel free to post back here.

View solution in original post

3 Replies

Avatar

Level 3

Hi

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.

Let me know if you need additional information

Gary

Avatar

Correct answer by
Employee

‌Hello,

See this post:

Unable to compile class for JSP: An error occurred at line 95

If you have any questions after reading this, feel free to post back here.

Avatar

Level 7

Hi @bkg2015

The error occurs because the StringUtils.isEmpty() method is not resolving due to missing or incompatible dependencies. To fix it:

  1. Ensure Apache Commons Lang (which contains StringUtils) is available in the classpath.
  2. Check your AEM dependencies: Make sure the correct version of commons-lang3 is included in your Maven pom.xml.
  3. Rebuild AEM: After fixing dependencies, clear cache and rebuild your project.
  4. Verify the AEM jar: Ensure the renamed aem-author-p4502.jar is correctly installed and compatible with your AEM version.

This should resolve the StringUtils.isEmpty() issue.