Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Cannot access the AEM homepage:error

arjuns71585267
Level 4
Level 4

Hi please help with the following error on startup of AEM on port number 4503

org.apache.sling.scripting.sightly.SightlyException: org.apache.sling.scripting.sightly.SightlyException: Compilation errors in org/apache/sling/scripting/sightly/apps/core/wcm/components/page/v2/page/page_html.java: Line 33, column 1378 : Syntax error, annotations are only available if source level is 1.5 or greater Line 47, column 1974 : The method call(String, Object[]) in the type RenderContext is not applicable for the arguments (String, String, RenderUnit.FluentMap) Line 48, column 2045 : The method call(String, Object[]) in the type RenderContext is not applicable for the arguments (String, String, RenderUnit.FluentMap) Line 49, column 2109 : The method call(String, Object[]) in the type RenderContext is not applicable for the arguments (String, String, RenderUnit.FluentMap) Line 50, column 2177 : The method call(String, Object[]) in the type RenderContext is not applicable for the arguments (String, String, RenderUnit.FluentMap) Line 55, column 2392 : The method call(String, Object[]) in the type RenderContext is not applicable for the arguments (String, Object, String) Line 57, column 2488 : Incompatible conditional operand types Object and boolean Line 61, column 2806 : The method equals(Object) in the type Object is not applicable for the arguments (boolean) Line 87, column 3723 : The method call(String, Object[]) in the type RenderContext is not applicable for the arguments (String, Object, String) Line 89, column 3819 : Incompatible conditional operand types Object and boolean Line 93, column 4138 : The method equals(Object) in the type Object is not applicable for the arguments (boolean) Line 124, column 5849 : The method call(String, Object[]) in the type RenderContext is not applicable for the arguments (String, String, RenderUnit.FluentMap) Line 129, column 6103 : The method call(String, Object[]) in the type RenderContext is not applicable for the arguments (String, String, RenderUnit.FluentMap) Line 145, column 6851 : The method call(String, Object[]) in the type RenderContext is not applicable for the arguments (String, String, RenderUnit.FluentMap)

RequestURI=/content/we-retail/us/en.html

Servlet= /apps/core/wcm/components/page/v2/page/page.html


ApacheSling/2.6 (jetty/9.3.22.v20171030, Java HotSpot(TM) 64-Bit Server VM 10.0.2, Windows 10 10.0 amd64)
11 Replies
Arun_Patidar
Community Advisor
Community Advisor

Hi,

Which version of JDK are you using?

Arun_Patidar
Community Advisor
Community Advisor

Can you check java home path and version from command prompt or terminal.

Make sure you have JDK8 not 10 to work with AEM.

arjuns71585267
Level 4
Level 4

10.0.2 is set now when I checked from terminal. Any way to change it?

saurabhs6289352
Level 2
Level 2

Please update your pom.xml file with the JDK version you wanted to compile. This should fix the following issue.

  1. <project>
  2.   [...]
  3.   <build>
  4.   [...]
  5.    <plugins>
  6.    <plugin>
  7.    <groupId>org.apache.maven.plugins</groupId>
  8.    <artifactId>maven-compiler-plugin</artifactId>
  9.    <version>3.8.0</version>
  10.    <configuration>
  11.    <source>1.8</source>
  12.    <target>1.8</target>
  13.    </configuration>
  14.    </plugin>
  15.    </plugins>
  16.   [...]
  17.   </build>

or

<properties>
  
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  
<maven.compiler.source>1.8</maven.compiler.source>
  
<maven.compiler.target>1.8</maven.compiler.target>
</properties>

saurabhs6289352
Level 2
Level 2

Please check following configuration

http://<localhost:port>/system/console/configMgr/org.apache.sling.scripting.java.impl.JavaScriptEngineFactory

and Set "auto" in Source VM and TargetVM , if not set.

saurabhs6289352
Level 2
Level 2

Correcting the URL

http://<localhost:port>/system/console/configMgr/org.apache.sling.scripting.java.impl.JavaScriptEngineFactory

saurabhs6289352
Level 2
Level 2

If you are not able to get the Config, "Apache Sling Java Script Handler" is the OSGI Config, you can find in http://<localhost:port>/system/console/configMgr

Nisha_Nivedita
Employee
Employee

The error seems to be most likely because of JDK version. Can you first set your jdk path and further run AME to check if that solves the problem.For eg : on windows go to folder where your AEM jar is located and set PATH=C:\Program Files\Java\jdk1.8.X.XX\bin