I'm trying to build my AEM project with maven but keep hitting this error on the compile-jsp step
Here's the error:
[ERROR] Failed to execute goal org.apache.sling:maven-jspc-plugin:2.0.8:jspc (compile-jsp) on project some-app: Unable to compile class for JSP: [ERROR] An error occurred at line: 14 in the jsp file: /apps/some=app/pages/t18-1_internal_static_content/body.jsp [ERROR] The type java.lang.CharSequence cannot be resolved. It is indirectly referenced from required .class files
I've read this could have something to do with the java version being used. Here's the info provided by mvn -version
Apache Maven 3.3.3 (7994120775791599e205a5524ec3e0dfe41d4a06; 2015-04-22T07:57:37-04:00)
Maven home: /usr/local/apache-maven-3.3.3
Java version: 1.8.0_71, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_71.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.11.4", arch: "x86_64", family: "mac"
Solved! Go to Solution.
Views
Replies
Total Likes
Hi guys! I was able to fix by going in 'Run Configuration" --> 'Maven Build' --> Click on JRE tab and select Jave SE 7 and it worked. Attached a screenshot for reference.
Views
Replies
Total Likes
For a test - try running JDK 1.7. Let us know what happens.
Views
Replies
Total Likes
Hi,
Try to incorporate Scott's suggestion. Also there is a similar kind of error posted in the below community discussion. Please take a look at this and see if it helps.
Thanks
Tuhin
Views
Replies
Total Likes
Hi guys! I was able to fix by going in 'Run Configuration" --> 'Maven Build' --> Click on JRE tab and select Jave SE 7 and it worked. Attached a screenshot for reference.
Views
Replies
Total Likes
Thanks for posting this - I have seen issues like his posted in the forums with respect to JDK 1.8. I am still using 1.7 - seems to work better with AEM.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies