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

Only a type can be imported. com.day.cq.wcm.api.AuthoringUIMode resolves to a package

Avatar

Level 2

Hi All,

I have included the following line of code in the jsp file,

<cq:include path="clientcontext" resourceType="cq/personalization/components/clientcontext"/>

After including the above line, I start getting the following error. Please help me in resolving this error:

 

Error during include of component '/apps/cq/personalization/components/clientcontext'

Error Message:

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

An error occurred at line: 6 in the generated java file

Only a type can be imported. com.day.cq.wcm.api.AuthoringUIMode resolves to a package

 

 

 

Thanks,

Dimple

1 Accepted Solution

Avatar

Correct answer by
Employee

FYI - There is no version 5.6.2. There is 5.6.0, 5.6.1, and now 6.0.0

View solution in original post

4 Replies

Avatar

Employee

What version of AEM are you using? What, if any, feature packs and hotfixes have been installed? What differences exist between /apps/cq/personalization/components/clientcontext and /libs/cq/personalization/components/clientcontext (IIOW, why was the /apps copy created?)?

Avatar

Level 2

Hi Justin,

Thanks for a quick response. I am using AEM version 5.6.2. This code base I got from the client. I don't know for what purpose they kept the clientcontext in apps folder also. But there are differences between clientcontext component present inside lib folder & apps folder. When I try to include it from libs folder, it's working fine now.

Once again, thanks a lot for your help.

 

Regards,

Dimple

Avatar

Correct answer by
Employee

FYI - There is no version 5.6.2. There is 5.6.0, 5.6.1, and now 6.0.0

Avatar

Level 2

Oops, u r right, I am using version 5.6.1.