Hi Team,
I have installed packages created in CQ 5.6.1 in environment having the version CQ 5.6.0 and when i opened am getting the following error.
Cannot serve request to /apps/cq/core/content/welcome.html in /apps/cq/core/components/welcome/welcome.jsp
Exception:
org.apache.sling.scripting.jsp.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 17 in the generated java file
Only a type can be imported. com.adobe.cq.history.api.HistoryEntry resolves to a package
An error occurred at line: 18 in the generated java file
Only a type can be imported. com.adobe.cq.history.api.HistoryService resolves to a package
An error occurred at line: 19 in the generated java file
Only a type can be imported. com.adobe.cq.history.filter.ResourceTypesFilter resolves to a package
An error occurred at line: 50 in the jsp file: /apps/cq/core/components/welcome/welcome.jsp
HistoryService cannot be resolved to a type
47: name = session.getUserID();
48: }
49:
50: HistoryService history = sling.getService(HistoryService.class);
51:
52: XSSProtectionService xssService = sling.getService(XSSProtectionService.class);
53: if (xssService != null) {
An error occurred at line: 50 in the jsp file: /apps/cq/core/components/welcome/welcome.jsp
HistoryService cannot be resolved to a type
47: name = session.getUserID();
48: }
49:
50: HistoryService history = sling.getService(HistoryService.class);
51:
52: XSSProtectionService xssService = sling.getService(XSSProtectionService.class);
53: if (xssService != null) {
An error occurred at line: 159 in the jsp file: /apps/cq/core/components/welcome/welcome.jsp
HistoryEntry cannot be resolved to a type
156: if (showHistory) {
157: Collection<String> filtered = Arrays.asList(consoleProps.get("historyResourceTypes", new String[0]));
158: Long historyCount = consoleProps.get("historyCount", 10L);
159: Collection<HistoryEntry> historyEntries = history.readEntries(resourceResolver, session.getUserID(), historyCount.intValue(), new ResourceTypesFilter(filtered));
Please Help!!!
Thanks,
Madhu
Solved! Go to Solution.
Views
Replies
Total Likes
It could be some carriage feed characters might be causing this issue which may not be visible. I experienced similar issues couple of times, whenever I experience this issue I go to the appropriate file in crxde, edit manually and save it.
If you have a statement like
import com.adobe.cq.history.api.HistoryService;
I delete this and manually enter the same again, if that doesn't work I enter
import com.adobe.cq.history.api.*;
When you run this on the browser, you may see either the errors get reduced or it fixes completely.
Views
Replies
Total Likes
It could be some carriage feed characters might be causing this issue which may not be visible. I experienced similar issues couple of times, whenever I experience this issue I go to the appropriate file in crxde, edit manually and save it.
If you have a statement like
import com.adobe.cq.history.api.HistoryService;
I delete this and manually enter the same again, if that doesn't work I enter
import com.adobe.cq.history.api.*;
When you run this on the browser, you may see either the errors get reduced or it fixes completely.
Views
Replies
Total Likes
Please check whether installed bundle is in active state
Views
Replies
Total Likes
Error stack trace indicates you have customized. Try your luck with Make sure all bundles are running and recompile the jsps. Otherwise check your overlay implementation if it is in par with 5.6.1
Views
Replies
Total Likes
Hi,
I have followed as you say but no luck :(
Thanks,
Madhu
Views
Replies
Total Likes
Hi Sham,
We haven't customized anything. We just installed the packages of 5.6.1 into 5.6.0 and the above error throws.
Thanks,
Madhu
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies