CQ 5.6.0 | Community
Skip to main content
Level 4
October 16, 2015
Solved

CQ 5.6.0

  • October 16, 2015
  • 5 replies
  • 1304 views

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Mshaji

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.

5 replies

MshajiCommunity AdvisorAccepted solution
Community Advisor
October 16, 2015

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.

Community Advisor
October 16, 2015

Please check whether installed bundle is in active state

Sham_HC
Level 10
October 16, 2015

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

Maddy737Author
Level 4
October 16, 2015

Hi,

I have followed as you say but no luck :(

Thanks,

Madhu

Maddy737Author
Level 4
October 16, 2015

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