Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

Error AEM quickstart

Avatar

Level 2

I have java 8 x64 bit version installed.  I just downloaded/opened the AEM jar file.  After it ran and opened my browser I received the following error

Does anyone know how to fix this?

org.apache.sling.scripting.jsp.jasper.JasperException: Unable to compile class for JSP:

An error occurred at line: 267 in the jsp file: /libs/granite/core/components/login/login.jsp

Type mismatch: cannot convert from Object to String

264:     }

265:

266:     private String getText(ValueMap cfg, I18n i18n, String name, String defaultText) {

267:         String text = cfg.get(name, String.class);

268:         return text != null ? i18n.getVar(text) : defaultText;

269:     }

270:

An error occurred at line: 282 in the jsp file: /libs/granite/core/components/login/login.jsp

Syntax error, parameterized types are only available if source level is 1.5 or greater

279:         Resource configRoot = null;

280:         if (configs != null) {

281:             long maxOrder = Long.MIN_VALUE;

282:             for (Iterator<Resource> cfgs = configs.listChildren() ; cfgs.hasNext() ; ) {

283:                 Resource cfg = cfgs.next();

284:                 ValueMap props = ResourceUtil.getValueMap(cfg);

285:                 Long order = props.get("order", Long.class);

An error occurred at line: 285 in the jsp file: /libs/granite/core/components/login/login.jsp

Type mismatch: cannot convert from Object to Long

282:             for (Iterator<Resource> cfgs = configs.listChildren() ; cfgs.hasNext() ; ) {

283:                 Resource cfg = cfgs.next();

284:                 ValueMap props = ResourceUtil.getValueMap(cfg);

285:                 Long order = props.get("order", Long.class);

286:                 if (order != null) {

287:                     if (order > maxOrder) {

288:                         configRoot = cfg;

1 Accepted Solution

Avatar

Correct answer by
Level 2

I figured out the problem. 

I opened the .jar file with incorrect default program set in windows.  When I clicked on the jar file it was being opened by Java 10. 

My command line though was correctly set to java 8.   By opening the jar file through the command line I was able to open the jar file with the correct java version 8. 

Thank you perfecciOnista, ebubey, and gauravb41175071.

View solution in original post

4 Replies

Avatar

Level 10

not sure, probably delete crx-quickstart folder, if this is a fresh instance as you mentioned and then try again with cmd/terminal rather than double clicking jar file

Avatar

Level 3

Check if you have multiple java versions and also make sure java -version is pointing to right version.

Delete the quickstart folder and try installing once again.

If not last option try, using the command line to start.

Avatar

Level 10

Two main reasons I have see so far:

1.  Incorrect Java version

2. User does not have appropriate access to the file sytem where AEM is running.

Avatar

Correct answer by
Level 2

I figured out the problem. 

I opened the .jar file with incorrect default program set in windows.  When I clicked on the jar file it was being opened by Java 10. 

My command line though was correctly set to java 8.   By opening the jar file through the command line I was able to open the jar file with the correct java version 8. 

Thank you perfecciOnista, ebubey, and gauravb41175071.