Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Error on quick start aem 6.4

Avatar

Level 2

Hey

After creating an AEM project following the steps on this link Getting Started with AEM Sites Part 1 - Project Setup

i lunched the free trial aem version 6.4 and registered, when i am trying to browse http://localhost:4502/sites.html i am getting this error:

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 ...

Can anyone help me

Thanks

1 Accepted Solution

Avatar

Correct answer by
Administrator

Can you confirm if you have 2 JRE in your system (even if you are giving correct details in JAVAHOME or PATH variable)?

If so, go to registry -> HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment and check the currentVersion, it should be the latest and compatible version.



Kautuk Sahni

View solution in original post

20 Replies

Avatar

Employee Advisor

Looks like you are running the AEM 6.4 jar with an unsupported version of JVM. Please go through Technical Requirements for more details.

Avatar

Level 10

What Java version is your Java HOME variable referencing?

Avatar

Level 2

Java version: 1.8.0_171, vendor: Oracle Corporation

Java home: C:\Program Files\Java\jdk1.8.0_171\jre

Avatar

Employee Advisor

Only 64bit version is supported. Can you check?

Avatar

Employee Advisor

Can you try with 1.8.0_131 and let me know if that works.

Avatar

Level 10

Hi,

The java home you have given is wrong. You have given JAVA_HOME till jre i.e., inside jdk1.8.0_171 - This is wrong

Please give java_home and path as per the below.

JAVA_HOME: C:\Program Files\Java\jdk1.8.0_171.

path : C:\Program Files\Java\jdk1.8.0_171\bin

Please change the JAVA_HOME from C:\Program Files\Java\jdk1.8.0_171\jre to C:\Program Files\Java\jdk1.8.0_171. It will work.

Hope this helps!!

Thanks,

Ratna Kumar.

Avatar

Level 2

i am already doing this,  i sent u the java home version from the output of mvn -version cmd

Avatar

Level 10

In your thread - it shows:

Java home: C:\Program Files\Java\jdk1.8.0_171\jre

Change to JDK - ie

M33.png

Avatar

Level 2

check my env variables in the screenshot

variables env.PNG

Avatar

Level 10

Try a new fresh install in a new folder on your machine. Does that start?

Avatar

Level 10

Hi,

You have give as path and not JDK for the path. See the screenshot below.

Path.PNG

You have given JDK instead of path. You need to give path as variable not JDK. Also I see you are using different path for JDK i.e., jdk1.7.0_80/bin instead of jdk1.8.0_171/bin

Change to path from JDK and give proper path of JDK. It will work!!

Hope this helps!!

Thanks,

Ratna Kumar.

Avatar

Level 2

Hey

I removed the JDK variable and still the same issue, i already added the jdk path to the path variable and didn't worked, check the below screenshot

env path.PNG

Avatar

Level 2

for more info about the issue this is the full error

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; An error occurred at line: 287 in the jsp file: /libs/granite/core/components/login/login.jsp The operator > is undefined for the argument type(s) Long, long 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; 289: maxOrder = order; 290: } An error occurred at line: 289 in the jsp file: /libs/granite/core/components/login/login.jsp Type mismatch: cannot convert from Long to long 286: if (order != null) { 287: if (order > maxOrder) { 288: configRoot = cfg; 289: maxOrder = order; 290: } 291: } 292: } An error occurred at line: 343 in the jsp file: /libs/granite/core/components/login/login.jsp The method getRequestSpecificAPI(SlingHttpServletRequest) is undefined for the type ServiceType 340: i18n = new I18n(slingRequest); 341: } 342: 343: final XSSAPI xssAPI = sling.getService(XSSAPI.class).getRequestSpecificAPI(slingRequest); 344: final UserManagementService userManagementService = sling.getService(UserManagementService.class); 345: final ValueMap cfg = ResourceUtil.getValueMap(configs); 346: An error occurred at line: 344 in the jsp file: /libs/granite/core/components/login/login.jsp Type mismatch: cannot convert from Object to UserManagementService 341: } 342: 343: final XSSAPI xssAPI = sling.getService(XSSAPI.class).getRequestSpecificAPI(slingRequest); 344: final UserManagementService userManagementService = sling.getService(UserManagementService.class); 345: final ValueMap cfg = ResourceUtil.getValueMap(configs); 346: 347: final String authType = request.getAuthType(); An error occurred at line: 352 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 349: final String contextPath = slingRequest.getContextPath(); 350: 351: // used to map readable reason codes to valid reason messages to avoid phishing attacks through j_reason param 352: Map<String,String> validReasons = new HashMap<String, String>(); 353: validReasons.put(REASON_KEY_INVALID_LOGIN, printProperty(cfg, i18n, xssAPI, "box/invalidLoginText", i18n.get("User name and password do not match"))); 354: validReasons.put(REASON_KEY_SESSION_TIMED_OUT, printProperty(cfg, i18n, xssAPI, "box/sessionTimedOutText", i18n.get("Session timed out, please login again"))); 355: // load custom error types An error occurred at line: 352 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 349: final String contextPath = slingRequest.getContextPath(); 350: 351: // used to map readable reason codes to valid reason messages to avoid phishing attacks through j_reason param 352: Map<String,String> validReasons = new HashMap<String, String>(); 353: validReasons.put(REASON_KEY_INVALID_LOGIN, printProperty(cfg, i18n, xssAPI, "box/invalidLoginText", i18n.get("User name and password do not match"))); 354: validReasons.put(REASON_KEY_SESSION_TIMED_OUT, printProperty(cfg, i18n, xssAPI, "box/sessionTimedOutText", i18n.get("Session timed out, please login again"))); 355: // load custom error types An error occurred at line: 358 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 355: // load custom error types 356: Resource errors = resource.getChild("errors"); 357: if (errors != null) { 358: for (Iterator<Resource> customErrors = errors.listChildren() ; customErrors.hasNext() ; ) { 359: Resource customError = customErrors.next(); 360: validReasons.put(customError.getName(), printProperty(customError.adaptTo(ValueMap.class), i18n, xssAPI, "/text", i18n.get("Error"))); 361: } An error occurred at line: 360 in the jsp file: /libs/granite/core/components/login/login.jsp The method printProperty(ValueMap, I18n, XSSAPI, String, String) in the type login_jsp is not applicable for the arguments (AdapterType, I18n, XSSAPI, String, String) 357: if (errors != null) { 358: for (Iterator<Resource> customErrors = errors.listChildren() ; customErrors.hasNext() ; ) { 359: Resource customError = customErrors.next(); 360: validReasons.put(customError.getName(), printProperty(customError.adaptTo(ValueMap.class), i18n, xssAPI, "/text", i18n.get("Error"))); 361: } 362: } 363: An error occurred at line: 378 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 375: } 376: } 377: 378: List<String> selectors = Arrays.asList(slingRequest.getRequestPathInfo().getSelectors()); 379: 380: boolean isLogin = ! selectors.contains(CHANGE_PWD_SELECTOR); 381: boolean isError = selectors.contains(ERROR_SELECTOR); An error occurred at line: 391 in the jsp file: /libs/granite/core/components/login/login.jsp Type mismatch: cannot convert from Object to ImsConfigProvider 388: <meta name="viewport" content="width = device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no"> 389: <meta http-equiv="X-UA-Compatible" content="chrome=1" /> 390: 391: <% ImsConfigProvider imsConfigProvider = sling.getService(ImsConfigProvider.class); 392: if (imsConfigProvider != null) { 393: imsLoginUrl = imsConfigProvider.getImsLoginUrl(); 394: %><meta name="granite.login.imsLoginUrl" content="<%= xssAPI.getValidHref(imsLoginUrl) %>"><% An error occurred at line: 402 in the jsp file: /libs/granite/core/components/login/login.jsp Type mismatch: cannot convert from Object to HtmlLibraryManager 399: <title><%= printProperty(cfg, i18n, xssAPI, "title", i18n.get("Adobe Experience Cloud")) %></title> 400: <style type="text/css"> 401: <% 402: HtmlLibraryManager htmlMgr = sling.getService(HtmlLibraryManager.class); 403: HtmlLibrary lib = htmlMgr.getLibrary(LibraryType.CSS, "/libs/granite/core/content/login/clientlib"); 404: IOUtils.copy(lib.getInputStream(true), out, "utf-8"); 405: %> An error occurred at line: 409 in the jsp file: /libs/granite/core/components/login/login.jsp The method getValidHref(String) in the type XSSAPI is not applicable for the arguments (T) 406: </style> 407: <ui:includeClientLib categories="coralui3" /> 408: <% 409: String favicon = xssAPI.getValidHref(cfg.get("favicon", "login/adobe-logo.png")); 410: favicon = xssAPI.getValidHref(favicon); 411: %> 412: <link rel="shortcut icon" href="<%= favicon %>" type="image/png"> An error occurred at line: 444 in the jsp file: /libs/granite/core/components/login/login.jsp The method getVar(String) in the type I18n is not applicable for the arguments (T) 441: </div> 442: <p> 443: <%= printProperty(cfg, i18n, xssAPI, "box/text", i18n.get("All the tools you need to solve these complex digital business challenges.")) %> 444: <a class="coral-Link" id="learnmore" href="<%= xssAPI.getValidHref(i18n.getVar(cfg.get("box/learnMore/href", "#"))) %>" x-cq-linkchecker="skip"><%= printProperty(cfg, i18n, xssAPI, "box/learnMore/text", i18n.get("Learn More")) %></a> 445: </p> 446: </div> 447: An error occurred at line: 472 in the jsp file: /libs/granite/core/components/login/login.jsp The method get(String, Class) in the type ValueMap is not applicable for the arguments (String, boolean) 469: <coral-alert-content><%= reason %></coral-alert-content> 470: </coral-alert> 471: <% } else { %> 472: <% String autocomplete = cfg.get("box/autocomplete", false) ? "on" : "off" ; %> 473: <form class="coral-Form coral-Form--vertical" name="login" method="POST" id="login" action="<%= xssAPI.getValidHref(urlLogin) %>" novalidate="novalidate"> 474: <input type="hidden" name="_charset_" value="UTF-8"> 475: <input type="hidden" name="errorMessage" value="<%= validReasons.get(REASON_KEY_INVALID_LOGIN) %>"> An error occurred at line: 532 in the jsp file: /libs/granite/core/components/login/login.jsp The method get(String, Class) in the type ValueMap is not applicable for the arguments (String, boolean) 529: <coral-alert-content><%= reason %></coral-alert-content> 530: </coral-alert> 531: <% } else { %> 532: <% String autocomplete = cfg.get("box/autocomplete", false) ? "on" : "off" ; %> 533: <form class="coral-Form coral-Form--vertical" name="login" method="POST" id="login" action="<%= xssAPI.getValidHref(urlLogin) %>" novalidate="novalidate"> 534: <input type="hidden" name="_charset_" value="UTF-8"> 535: <input type="hidden" name="errorMessage" value="<%= validReasons.get(REASON_KEY_INVALID_LOGIN) %>"> An error occurred at line: 588 in the jsp file: /libs/granite/core/components/login/login.jsp Type mismatch: cannot convert from Object to ProductInfoProvider 585: <div class="legal-footer"><% 586: // Footer: default copyright (removable) 587: if (cfg.containsKey("footer/copy/text")) { 588: ProductInfoProvider productInfoProvider = sling.getService(ProductInfoProvider.class); 589: String year = productInfoProvider == null ? null : productInfoProvider.getProductInfo().getYear(); 590: if (year == null) { 591: year = String.valueOf(Calendar.getInstance().get(Calendar.YEAR)); An error occurred at line: 593 in the jsp file: /libs/granite/core/components/login/login.jsp Type mismatch: cannot convert from Object to String 590: if (year == null) { 591: year = String.valueOf(Calendar.getInstance().get(Calendar.YEAR)); 592: } 593: String text = cfg.get("footer/copy/text",""); 594: %><span><%= xssAPI.encodeForHTML(i18n.getVar(text, "{0} is the product year", year)) %></span><% 595: } 596: %><ul id="usage-box"><% An error occurred at line: 594 in the jsp file: /libs/granite/core/components/login/login.jsp The method getVar(String, String, Object[]) in the type I18n is not applicable for the arguments (String, String, String) 591: year = String.valueOf(Calendar.getInstance().get(Calendar.YEAR)); 592: } 593: String text = cfg.get("footer/copy/text",""); 594: %><span><%= xssAPI.encodeForHTML(i18n.getVar(text, "{0} is the product year", year)) %></span><% 595: } 596: %><ul id="usage-box"><% 597: An error occurred at line: 600 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 597: 598: // Footer: dynamic items (config/footer/items) 599: if (configs.getChild("footer/items") != null) { 600: Iterator<Resource> footerItems = configs.getChild("footer/items").listChildren(); 601: while (footerItems.hasNext()) { 602: %> 603: <li><% An error occurred at line: 605 in the jsp file: /libs/granite/core/components/login/login.jsp The method getVar(String) in the type I18n is not applicable for the arguments (T) 602: %> 603: <li><% 604: String itemName = footerItems.next().getName(); 605: String href = i18n.getVar(cfg.get("footer/items/" + itemName + "/href", String.class)); 606: if (href != null) { 607: %><a href="<%= xssAPI.getValidHref(href) %>"><% 608: }

RequestURI=/libs/granite/core/content/login.html

Servlet= /libs/granite/core/components/login/login.jsp


ApacheSling/2.6 (jetty/9.3.22.v20171030, Java HotSpot(TM) 64-Bit Server VM 10.0.1, Windows 10 10.0 amd64)

Avatar

Level 2

also adding to the ticket i navigated http://localhost:4502/crx/de/index.jsp and logged in with admin admin then trying to navigate http://localhost:4502/sites.html i got this error

org.apache.sling.scripting.jsp.jasper.JasperException: Unable to compile class for JSP: An error occurred at line: 907 in the jsp file: /libs/granite/ui/components/shell/collectionpage/collectionpage.jsp Syntax error, parameterized types are only available if source level is 1.5 or greater 904: } 905: 906: private String getChildrenJSON(Resource current, Resource root) throws Exception { 907: List<Resource> ancestors = getAncestors(current, root); 908: 909: JSONStringer json = new JSONStringer(); 910: An error occurred at line: 913 in the jsp file: /libs/granite/ui/components/shell/collectionpage/collectionpage.jsp Syntax error, 'for each' statements are only available if source level is 1.5 or greater 910: 911: json.array(); 912: 913: for (Resource ancestor : ancestors) { 914: json.object(); 915: json.key("id").value(ancestor.getPath()); 916: json.endObject(); An error occurred at line: 932 in the jsp file: /libs/granite/ui/components/shell/collectionpage/collectionpage.jsp Syntax error, parameterized types are only available if source level is 1.5 or greater 929: * Returns the ancestors of the current resource (exclusive) up to the root. 930: * The result is ordered with the root as the first item. 931: */ 932: private List<Resource> getAncestors(Resource current, Resource root) { 933: List<Resource> results = new ArrayList<Resource>(); 934: 935: if (current == null || root == null || current.getPath().equals(root.getPath())) { An error occurred at line: 933 in the jsp file: /libs/granite/ui/components/shell/collectionpage/collectionpage.jsp Syntax error, parameterized types are only available if source level is 1.5 or greater 930: * The result is ordered with the root as the first item. 931: */ 932: private List<Resource> getAncestors(Resource current, Resource root) { 933: List<Resource> results = new ArrayList<Resource>(); 934: 935: if (current == null || root == null || current.getPath().equals(root.getPath())) { 936: return results; An error occurred at line: 933 in the jsp file: /libs/granite/ui/components/shell/collectionpage/collectionpage.jsp Syntax error, parameterized types are only available if source level is 1.5 or greater 930: * The result is ordered with the root as the first item. 931: */ 932: private List<Resource> getAncestors(Resource current, Resource root) { 933: List<Resource> results = new ArrayList<Resource>(); 934: 935: if (current == null || root == null || current.getPath().equals(root.getPath())) { 936: return results; An error occurred at line: 988 in the jsp file: /libs/granite/ui/components/shell/collectionpage/collectionpage.jsp The method getString(String) in the type ExpressionHelper is not applicable for the arguments (T) 985: } 986: 987: private String handleURITemplate(Config cfg, String name, ExpressionHelper ex, HttpServletRequest request) { 988: String value = ex.getString(cfg.get(name, String.class)); 989: 990: if (value != null) { 991: if (value.startsWith("/")) { An error occurred at line: 998 in the jsp file: /libs/granite/ui/components/shell/collectionpage/collectionpage.jsp The method getString(String) in the type ExpressionHelper is not applicable for the arguments (T) 995: } 996: } 997: 998: value = ex.getString(cfg.get(name + ".abs", String.class)); 999: 1000: if (value != null) { 1001: return request.getContextPath() + value; An error occurred at line: 1,012 in the jsp file: /libs/granite/ui/components/shell/collectionpage/collectionpage.jsp Syntax error, 'for each' statements are only available if source level is 1.5 or greater 1009: json.object(); 1010: 1011: if (props != null) { 1012: for (String name : props.getPropertyNames()) { 1013: Object v = props.getProperty(name, null, Object.class); // No conversion, use Object.class 1014: if (v != null) { 1015: json.key(name).value(v); An error occurred at line: 1,026 in the jsp file: /libs/granite/ui/components/shell/collectionpage/collectionpage.jsp Type mismatch: cannot convert from Object to String 1023: 1024: private String getPreference(UserProperties props, String name, String defaultValue) throws Exception { 1025: if (props != null) { 1026: return props.getProperty(name, defaultValue, String.class); 1027: } else { 1028: return defaultValue; 1029: } An error occurred at line: 310 in the jsp file: /libs/granite/ui/components/shell/collectionpage/collectionpage.jsp The method get(String, T) in the type Config is not applicable for the arguments (String, boolean) 307: Config cfg = cmp.getConfig(); 308: ExpressionHelper ex = cmp.getExpressionHelper(); 309: 310: if (!cfg.get("noMerge", false)) { 311: ResourceMergerService resourceMerger = sling.getService(ResourceMergerService.class); 312: if (resourceMerger != null) { 313: Resource uiResource = resourceMerger.getMergedResource(resource); An error occurred at line: 311 in the jsp file: /libs/granite/ui/components/shell/collectionpage/collectionpage.jsp Type mismatch: cannot convert from Object to ResourceMergerService 308: ExpressionHelper ex = cmp.getExpressionHelper(); 309: 310: if (!cfg.get("noMerge", false)) { 311: ResourceMergerService resourceMerger = sling.getService(ResourceMergerService.class); 312: if (resourceMerger != null) { 313: Resource uiResource = resourceMerger.getMergedResource(resource); 314: if (uiResource != null) { An error occurred at line: 321 in the jsp file: /libs/granite/ui/components/shell/collectionpage/collectionpage.jsp The constructor FilteringResourceWrapper(Resource, ServiceType, SlingHttpServletRequest) is undefined 318: } 319: } 320: 321: resource = new FilteringResourceWrapper(resource, sling.getService(ExpressionResolver.class), slingRequest); 322: 323: Resource redirector = resource.getChild("redirector"); 324: if (redirector != null) { An error occurred at line: 332 in the jsp file: /libs/granite/ui/components/shell/collectionpage/collectionpage.jsp Type mismatch: cannot convert from Object to String 329: } 330: } 331: 332: String targetCollection = cfg.get("targetCollection", String.class); 333: String consoleId = StringUtils.trimToNull(ex.getString(cfg.get("consoleId", String.class))); 334: 335: // GRANITE-8258: Force the header to bypass the compatibility mode on intranet sites An error occurred at line: 333 in the jsp file: /libs/granite/ui/components/shell/collectionpage/collectionpage.jsp The method getString(String) in the type ExpressionHelper is not applicable for the arguments (T) 330: } 331: 332: String targetCollection = cfg.get("targetCollection", String.class); 333: String consoleId = StringUtils.trimToNull(ex.getString(cfg.get("consoleId", String.class))); 334: 335: // GRANITE-8258: Force the header to bypass the compatibility mode on intranet sites 336: response.setHeader("X-UA-Compatible", "IE=edge"); An error occurred at line: 350 in the jsp file: /libs/granite/ui/components/shell/collectionpage/collectionpage.jsp The method getVar(String) in the type I18n is not applicable for the arguments (T) 347: <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"> 348: <link rel="shortcut icon" href="<%= request.getContextPath() %>/libs/granite/core/content/login/favicon.ico"><% 349: 350: String title = i18n.getVar(cfg.get("jcr:title", String.class)); 351: if (title != null) { 352: String pageURITemplate = handleURITemplate(cfg, "pageURITemplate", ex, request); 353: An error occurred at line: 382 in the jsp file: /libs/granite/ui/components/shell/collectionpage/collectionpage.jsp Syntax error, parameterized types are only available if source level is 1.5 or greater 379: 380: Resource globalHead = resourceResolver.getResource("/mnt/overlay/granite/ui/content/globalhead"); 381: if (globalHead != null) { 382: for (Iterator<Resource> it = globalHead.listChildren(); it.hasNext();) { 383: %><sling:include resource="<%= it.next() %>" /><% 384: } 385: } An error occurred at line: 387 in the jsp file: /libs/granite/ui/components/shell/collectionpage/collectionpage.jsp Type mismatch: cannot convert from Object to Authorizable 384: } 385: } 386: 387: Authorizable auth = resourceResolver.adaptTo(Authorizable.class); 388: UserPropertiesManager upm = resourceResolver.adaptTo(UserPropertiesManager.class); 389: UserProperties userPreferences = upm.getUserProperties(auth, UserPropertiesService.PREFERENCES_PATH); 390: String userPreferencesPath = auth.getPath() + "/" + UserPropertiesService.PREFERENCES_PATH; An error occurred at line: 388 in the jsp file: /libs/granite/ui/components/shell/collectionpage/collectionpage.jsp Type mismatch: cannot convert from Object to UserPropertiesManager 385: } 386: 387: Authorizable auth = resourceResolver.adaptTo(Authorizable.class); 388: UserPropertiesManager upm = resourceResolver.adaptTo(UserPropertiesManager.class); 389: UserProperties userPreferences = upm.getUserProperties(auth, UserPropertiesService.PREFERENCES_PATH); 390: String userPreferencesPath = auth.getPath() + "/" + UserPropertiesService.PREFERENCES_PATH; 391: String onboardingSrcPath = "/mnt/overlay/granite/ui/content/shell/onboarding.html"; An error occurred at line: 406 in the jsp file: /libs/granite/ui/components/shell/collectionpage/collectionpage.jsp The method get(String, T) in the type Config is not applicable for the arguments (String, boolean) 403: <%-- <meta name="user.preferences.winmode"> is deprecated, use foundation-preference instead --%> 404: <meta name="user.preferences.winmode" content="<%= xssAPI.encodeForHTMLAttr(getPreference(userPreferences, "winMode", "multi")) %>"><% 405: 406: if (cfg.get("coral2", false)) { 407: %><ui:includeClientLib categories="coralui2,granite.ui.coral.foundation,granite.ui.coral.foundation.addon.coral2,granite.ui.shell" /><% 408: } else { 409: %><ui:includeClientLib categories="coralui3,granite.ui.coral.foundation,granite.ui.shell" /><% An error occurred at line: 416 in the jsp file: /libs/granite/ui/components/shell/collectionpage/collectionpage.jsp The method getString(String) in the type ExpressionHelper is not applicable for the arguments (T) 413: data-granite-omnisearch-src="<%= xssAPI.getValidHref(request.getContextPath() + "/mnt/overlay/granite/ui/content/shell/omnisearch.html") %>" 414: data-granite-omnisearch-search-url="<%= xssAPI.getValidHref(request.getContextPath() + "/aem/search.html") %>"><% 415: 416: Resource omnisearchConfigResource = resourceResolver.getResource(ex.getString(cfg.get("omnisearchLocationPath", String.class))); 417: if (omnisearchConfigResource != null) { 418: ValueMap props = omnisearchConfigResource.getValueMap(); 419: An error occurred at line: 422 in the jsp file: /libs/granite/ui/components/shell/collectionpage/collectionpage.jsp The method getVar(String) in the type I18n is not applicable for the arguments (T) 419: 420: %><meta class="granite-omnisearch-location" 421: data-granite-omnisearch-location-value="<%= xssAPI.encodeForHTMLAttr(omnisearchConfigResource.getName()) %>" 422: data-granite-omnisearch-location-label="<%= xssAPI.encodeForHTMLAttr(i18n.getVar(props.get("jcr:title", ""))) %>"><% 423: } 424: 425: Resource head = resource.getChild("head"); An error occurred at line: 427 in the jsp file: /libs/granite/ui/components/shell/collectionpage/collectionpage.jsp Syntax error, parameterized types are only available if source level is 1.5 or greater 424: 425: Resource head = resource.getChild("head"); 426: if (head != null) { 427: for (Iterator<Resource> it = head.listChildren(); it.hasNext();) { 428: %><sling:include resource="<%= it.next() %>" /><% 429: } 430: } An error occurred at line: 435 in the jsp file: /libs/granite/ui/components/shell/collectionpage/collectionpage.jsp Type mismatch: cannot convert from Object to String 432: // Flush head so that the browser can start downloading the clientlibs 433: response.flushBuffer(); 434: 435: String modeGroup = cfg.get("modeGroup", String.class); 436: 437: String navigationId = consoleId; 438: An error occurred at line: 445 in the jsp file: /libs/granite/ui/components/shell/collectionpage/collectionpage.jsp Syntax error, parameterized types are only available if source level is 1.5 or greater 442: 443: String targetViewName = getTargetViewName(slingRequest, consoleId); 444: 445: List<Resource> viewCache = new ArrayList<Resource>(); 446: Resource currentView = null; 447: 448: { An error occurred at line: 445 in the jsp file: /libs/granite/ui/components/shell/collectionpage/collectionpage.jsp Syntax error, parameterized types are only available if source level is 1.5 or greater 442: 443: String targetViewName = getTargetViewName(slingRequest, consoleId); 444: 445: List<Resource> viewCache = new ArrayList<Resource>(); 446: Resource currentView = null; 447: 448: { An error occurred at line: 450 in the jsp file: /libs/granite/ui/components/shell/collectionpage/collectionpage.jsp Syntax error, parameterized types are only available if source level is 1.5 or greater 447: 448: { 449: int i = 0; 450: for (Iterator<Resource> it = resource.getChild("views").listChildren(); it.hasNext(); i++) { 451: Resource item = it.next(); 452: 453: if (i == 0 || item.getName().equals(targetViewName)) { An error occurred at line: 469 in the jsp file: /libs/granite/ui/components/shell/collectionpage/collectionpage.jsp Syntax error, 'for each' statements are only available if source level is 1.5 or greater 466: .endObject(); 467: 468: JSONWriter availableSettings = new JSONStringer().array(); 469: for (Resource view : viewCache) { 470: if (view.getChild("settings") != null) { 471: availableSettings.value(view.getName()); 472: } An error occurred at line: 490 in the jsp file: /libs/granite/ui/components/shell/collectionpage/collectionpage.jsp The method getBoolean(String) in the type ExpressionHelper is not applicable for the arguments (T) 487: String savedRailTarget = getCookie(slingRequest, railSaveKey); 488: String savedPanelWidth = getCookie(slingRequest, panelWidthSaveKey); 489: boolean savedRailTargetFound = false; 490: boolean hasActiveRail = rails != null && cmp.getExpressionHelper().getBoolean(rails.getValueMap().get("active", "false")); 491: Resource columnViewItem = resource.getChild("views").getChild("column"); 492: Config columnViewItemCfg = new Config(columnViewItem); 493: String rootPath = ex.getString(columnViewItemCfg.get("rootPath", "")); An error occurred at line: 493 in the jsp file: /libs/granite/ui/components/shell/collectionpage/collectionpage.jsp The method getString(String) in the type ExpressionHelper is not applicable for the arguments (T) 490: boolean hasActiveRail = rails != null && cmp.getExpressionHelper().getBoolean(rails.getValueMap().get("active", "false")); 491: Resource columnViewItem = resource.getChild("views").getChild("column"); 492: Config columnViewItemCfg = new Config(columnViewItem); 493: String rootPath = ex.getString(columnViewItemCfg.get("rootPath", "")); 494: 495: int minRailSize = 250; 496: int minContentSize = 100; An error occurred at line: 524 in the jsp file: /libs/granite/ui/components/shell/collectionpage/collectionpage.jsp Syntax error, parameterized types are only available if source level is 1.5 or greater 521: <coral-shell-menubar><% 522: final Resource headerActions = resourceResolver.getResource("/mnt/overlay/granite/ui/content/shell/header/actions"); 523: if (headerActions != null) { 524: for (Iterator<Resource> it = headerActions.listChildren(); it.hasNext();) { 525: %><sling:include resource="<%= it.next() %>" /><% 526: } 527: } An error occurred at line: 544 in the jsp file: /libs/granite/ui/components/shell/collectionpage/collectionpage.jsp Syntax error, parameterized types are only available if source level is 1.5 or greater 541: <betty-titlebar-title><% 542: Resource breadcrumbs = resource.getChild("breadcrumbs"); 543: if (breadcrumbs != null) { 544: List<Resource> crumbs = IteratorUtils.toList(cmp.asDataSource(breadcrumbs).iterator()); 545: 546: if (!crumbs.isEmpty()) { 547: AttrBuilder navigatorAttrs = new AttrBuilder(request, xssAPI); An error occurred at line: 558 in the jsp file: /libs/granite/ui/components/shell/collectionpage/collectionpage.jsp Type mismatch: cannot convert from Object to String 555: Config itemCfg = new Config(item); 556: 557: AttrBuilder itemAttrs = new AttrBuilder(request, xssAPI); 558: String navigatorCollectionid = itemCfg.get("path", String.class); 559: if (navigatorCollectionid != null) { 560: itemAttrs.add("data-granite-collection-navigator-collectionid", navigatorCollectionid); 561: } else { An error occurred at line: 562 in the jsp file: /libs/granite/ui/components/shell/collectionpage/collectionpage.jsp The method add(String, Boolean) in the type AttrBuilder is not applicable for the arguments (String, T) 559: if (navigatorCollectionid != null) { 560: itemAttrs.add("data-granite-collection-navigator-collectionid", navigatorCollectionid); 561: } else { 562: itemAttrs.add("data-granite-collection-navigator-href", itemCfg.get("href", String.class)); 563: } 564: %><betty-breadcrumbs-item <%= itemAttrs %>><%= xssAPI.encodeForHTML(i18n.getVar(itemCfg.get("title"))) %></betty-breadcrumbs-item><% 565: } An error occurred at line: 608 in the jsp file: /libs/granite/ui/components/shell/collectionpage/collectionpage.jsp Syntax error, parameterized types are only available if source level is 1.5 or greater 605: } 606: if (rails != null) { 607: // we map all rail items to the numbers in the keyboard using control + {index} 608: for (Iterator<Resource> it = rails.listChildren(); it.hasNext(); railItemIndex++) { 609: Resource item = it.next(); 610: 611: if (cmp.getRenderCondition(item, true).check()) { An error occurred at line: 627 in the jsp file: /libs/granite/ui/components/shell/collectionpage/collectionpage.jsp The method getString(String) in the type ExpressionHelper is not applicable for the arguments (T) 624: itemAttrs.add("data-granite-toggleable-control-target", "#shell-collectionpage-rail"); 625: itemAttrs.add("data-granite-omnisearch-filter", targetCollection); 626: } else { 627: String href = ex.getString(itemCfg.get("href", String.class)); 628: 629: itemAttrs.add("icon", itemCfg.get("icon", String.class)); 630: An error occurred at line: 629 in the jsp file: /libs/granite/ui/components/shell/collectionpage/collectionpage.jsp The method add(String, Boolean) in the type AttrBuilder is not applicable for the arguments (String, T) 626: } else { 627: String href = ex.getString(itemCfg.get("href", String.class)); 628: 629: itemAttrs.add("icon", itemCfg.get("icon", String.class)); 630: 631: if (href != null) { 632: itemAttrs.add("data-granite-toggleable-control-action", "navigate"); An error occurred at line: 641 in the jsp file: /libs/granite/ui/components/shell/collectionpage/collectionpage.jsp The method get(String, T) in the type Config is not applicable for the arguments (String, boolean) 638: itemAttrs.add("data-granite-toggleable-control-target", railPanelTarget); 639: } 640: 641: itemAttrs.addSelected(itemCfg.get("active", false)); 642: 643: if (!hasActiveRail && savedRailTarget != null && savedRailTarget.equals(item.getName())) { 644: itemAttrs.addSelected(true); An error occurred at line: 649 in the jsp file: /libs/granite/ui/components/shell/collectionpage/collectionpage.jsp The method outVar(XSSAPI, I18n, String) in the type collectionpage_jsp is not applicable for the arguments (XSSAPI, I18n, T) 646: } 647: } 648: 649: %><coral-cyclebutton-item <%= itemAttrs %>><%= outVar(xssAPI, i18n, itemCfg.get("jcr:title", String.class)) %></coral-cyclebutton-item><% 650: } 651: } 652: } An error occurred at line: 658 in the jsp file: /libs/granite/ui/components/shell/collectionpage/collectionpage.jsp Syntax error, parameterized types are only available if source level is 1.5 or greater 655: 656: Resource primary = resource.getChild("actions/primary"); 657: if (primary != null) { 658: for (Iterator<Resource> it = primary.listChildren(); it.hasNext();) { 659: Resource item = it.next(); 660: %><sling:include resource="<%= item %>" /><% 661: } An error occurred at line: 667 in the jsp file: /libs/granite/ui/components/shell/collectionpage/collectionpage.jsp Syntax error, parameterized types are only available if source level is 1.5 or greater 664: <betty-titlebar-secondary><% 665: Resource secondary = resource.getChild("actions/secondary"); 666: if (secondary != null) { 667: for (Iterator<Resource> it = secondary.listChildren(); it.hasNext();) { 668: Resource item = it.next(); 669: if ("create".equals(item.getName())) { 670: AttrBuilder createAttrs = new AttrBuilder(request, xssAPI); An error occurred at line: 688 in the jsp file: /libs/granite/ui/components/shell/collectionpage/collectionpage.jsp Syntax error, 'for each' statements are only available if source level is 1.5 or greater 685: switcherAttrs.add("data-granite-collection-switcher-target", targetCollection); 686: 687: %><coral-cyclebutton <%= switcherAttrs %>><% 688: for (Resource item : viewCache) { 689: Config itemCfg = new Config(item); 690: 691: String src = ex.getString(itemCfg.get("src", String.class)); An error occurred at line: 691 in the jsp file: /libs/granite/ui/components/shell/collectionpage/collectionpage.jsp The method getString(String) in the type ExpressionHelper is not applicable for the arguments (T) 688: for (Resource item : viewCache) { 689: Config itemCfg = new Config(item); 690: 691: String src = ex.getString(itemCfg.get("src", String.class)); 692: 693: AttrBuilder itemAttrs = new AttrBuilder(request, xssAPI); 694: itemAttrs.add("data-granite-collection-switcher-src", handleURITemplate(src, request)); An error occurred at line: 695 in the jsp file: /libs/granite/ui/components/shell/collectionpage/collectionpage.jsp The method add(String, Boolean) in the type AttrBuilder is not applicable for the arguments (String, T) 692: 693: AttrBuilder itemAttrs = new AttrBuilder(request, xssAPI); 694: itemAttrs.add("data-granite-collection-switcher-src", handleURITemplate(src, request)); 695: itemAttrs.add("icon", itemCfg.get("icon", String.class)); 696: itemAttrs.addSelected(item.getName().equals(currentView.getName())); 697: 698: %><coral-cyclebutton-item <%= itemAttrs %>><%= outVar(xssAPI, i18n, itemCfg.get("jcr:title", String.class)) %></coral-cyclebutton-item><% An error occurred at line: 698 in the jsp file: /libs/granite/ui/components/shell/collectionpage/collectionpage.jsp The method outVar(XSSAPI, I18n, String) in the type collectionpage_jsp is not applicable for the arguments (XSSAPI, I18n, T) 695: itemAttrs.add("icon", itemCfg.get("icon", String.class)); 696: itemAttrs.addSelected(item.getName().equals(currentView.getName())); 697: 698: %><coral-cyclebutton-item <%= itemAttrs %>><%= outVar(xssAPI, i18n, itemCfg.get("jcr:title", String.class)) %></coral-cyclebutton-item><% 699: } 700: 701: if (!viewCache.isEmpty()) { An error occurred at line: 733 in the jsp file: /libs/granite/ui/components/shell/collectionpage/collectionpage.jsp The method add(String, Boolean) in the type AttrBuilder is not applicable for the arguments (String, int) 730: railAttrs.addClass("foundation-toggleable foundation-layout-panel-rail granite-rail"); 731: railAttrs.addClass("foundation-container-resizable"); 732: railAttrs.add("data-granite-layout-panel-save-key", panelWidthSaveKey); 733: railAttrs.add("data-granite-layout-panel-min-width", minRailSize); 734: 735: String panelStyle = null; 736: if (!StringUtils.isEmpty(savedPanelWidth)) { An error occurred at line: 739 in the jsp file: /libs/granite/ui/components/shell/collectionpage/collectionpage.jsp The method getBoolean(String) in the type ExpressionHelper is not applicable for the arguments (T) 736: if (!StringUtils.isEmpty(savedPanelWidth)) { 737: panelStyle = "width: " + savedPanelWidth + "px;"; 738: } 739: if (savedRailTargetFound || (rails != null && cmp.getExpressionHelper().getBoolean(rails.getValueMap().get("active", "false")))) { 740: railAttrs.addClass("foundation-layout-panel-rail-active"); 741: railAttrs.addClass("foundation-layout-panel-rail-activate-panel"); 742: } else if (!StringUtils.isEmpty(savedPanelWidth)) { An error occurred at line: 750 in the jsp file: /libs/granite/ui/components/shell/collectionpage/collectionpage.jsp Syntax error, parameterized types are only available if source level is 1.5 or greater 747: %><div <%= railAttrs %>> 748: <coral-panelstack maximized><% 749: if (rails != null) { 750: for (Iterator<Resource> it = rails.listChildren(); it.hasNext();) { 751: Resource item = it.next(); 752: 753: AttrBuilder itemAttrs = new AttrBuilder(request, xssAPI); An error occurred at line: 766 in the jsp file: /libs/granite/ui/components/shell/collectionpage/collectionpage.jsp The method getString(String) in the type ExpressionHelper is not applicable for the arguments (T) 763: } 764: if (columnViewItem != null && !rootPath.isEmpty()) { 765: Resource columnRoot = resourceResolver.getResource(rootPath); 766: String path = ex.getString(columnViewItemCfg.get("path", String.class)); 767: Resource currentColumnItem = resourceResolver.getResource(path); 768: String src = request.getContextPath() + "/mnt/overlay/granite/ui/content/tree{.offset}.html{+id}?columnPath=" + Text.escapePath(columnViewItem.getPath()); 769: An error occurred at line: 803 in the jsp file: /libs/granite/ui/components/shell/collectionpage/collectionpage.jsp Type mismatch: cannot convert from Object to String 800: 801: %><div class="foundation-layout-panel-content foundation-collection-content" data-granite-layout-content-min-width="<%= minContentSize %>"><% 802: Config curConfig = new Config(currentView); 803: String selector = curConfig.get("selector", String.class); 804: 805: if (StringUtils.isNotEmpty(selector)) { 806: %><sling:include resource="<%= currentView %>" addSelectors="<%= selector %>" /><% An error occurred at line: 841 in the jsp file: /libs/granite/ui/components/shell/collectionpage/collectionpage.jsp Syntax error, parameterized types are only available if source level is 1.5 or greater 838: <coral-actionbar-primary><% 839: Resource selection = resource.getChild("actions/selection"); 840: if (selection != null) { 841: for (Iterator<Resource> it = selection.listChildren(); it.hasNext();) { 842: Resource item = it.next(); 843: 844: if (!cmp.getRenderCondition(item, true).check()) { An error occurred at line: 870 in the jsp file: /libs/granite/ui/components/shell/collectionpage/collectionpage.jsp The method get(String, String, Object[]) in the type I18n is not applicable for the arguments (String, null, String) 867: 868: AttrBuilder counterAttrs = new AttrBuilder(request, xssAPI); 869: counterAttrs.addClass("foundation-admin-selectionstatus"); 870: counterAttrs.add("data-foundation-admin-selectionstatus-template", i18n.get("{0} selected", null, "{{count}}")); 871: counterAttrs.add("data-foundation-admin-selectionstatus-target", targetCollection); 872: 873: %><button <%= deselectAttrs %>><span <%= counterAttrs %>></span></button> An error occurred at line: 885 in the jsp file: /libs/granite/ui/components/shell/collectionpage/collectionpage.jsp Syntax error, parameterized types are only available if source level is 1.5 or greater 882: 883: Resource globalFooter = resourceResolver.getResource("/mnt/overlay/granite/ui/content/globalfooter"); 884: if (globalFooter != null) { 885: for (Iterator<Resource> it = globalFooter.listChildren(); it.hasNext();) { 886: %><sling:include resource="<%= it.next() %>" /><% 887: } 888: }

RequestURI=/sites.html

Servlet= /libs/granite/ui/components/shell/collectionpage/collectionpage.jsp


ApacheSling/2.6 (jetty/9.3.22.v20171030, Java HotSpot(TM) 64-Bit Server VM 10.0.1, Windows 10 10.0 amd64)

Avatar

Correct answer by
Administrator

Can you confirm if you have 2 JRE in your system (even if you are giving correct details in JAVAHOME or PATH variable)?

If so, go to registry -> HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment and check the currentVersion, it should be the latest and compatible version.



Kautuk Sahni

Avatar

Level 2

Hey

please check the screenshot and tell me which one should i keep so i will remove all the others

programs.PNG

Avatar

Level 10

I have Java 1.8 deployed like this:

M55.png

You should have Java 1.8 setup in a folder - as shown above and you Java_Home pointing to that folder.

Try putting the AEM JAR in another folder and starting it again - a fresh install.

Also - check the Reg Keys as suggested by Kautuk

Avatar

Level 2

I removed all java versions and kept only one and it worked

Thank you for your support