Cannot access the AEM homepage:error

Avatar

Avatar

arjuns71585267

Avatar

arjuns71585267

arjuns71585267

14-09-2018

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)

Replies

Avatar

Avatar

Arun_Patidar

MVP

Total Posts

3.0K

Likes

1.1K

Correct Reply

861

Avatar

Arun_Patidar

MVP

Total Posts

3.0K

Likes

1.1K

Correct Reply

861
Arun_Patidar
MVP

14-09-2018

Hi,

Which version of JDK are you using?

Avatar

Avatar

arjuns71585267

Avatar

arjuns71585267

arjuns71585267

14-09-2018

JDK 8 but jdk10 is also installed.

Avatar

Avatar

Arun_Patidar

MVP

Total Posts

3.0K

Likes

1.1K

Correct Reply

861

Avatar

Arun_Patidar

MVP

Total Posts

3.0K

Likes

1.1K

Correct Reply

861
Arun_Patidar
MVP

14-09-2018

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

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

Avatar

Avatar

saurabhs6289352

Avatar

saurabhs6289352

saurabhs6289352

14-09-2018

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>

Avatar

Avatar

arjuns71585267

Avatar

arjuns71585267

arjuns71585267

14-09-2018

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

Avatar

Avatar

arjuns71585267

Avatar

arjuns71585267

arjuns71585267

14-09-2018

where can I find the pom.xml file

Avatar

Avatar

saurabhs6289352

Avatar

saurabhs6289352

saurabhs6289352

14-09-2018

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.

Avatar

Avatar

saurabhs6289352

Avatar

saurabhs6289352

saurabhs6289352

14-09-2018

Correcting the URL

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

Avatar

Avatar

saurabhs6289352

Avatar

saurabhs6289352

saurabhs6289352

14-09-2018

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