Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

HtmlLibraryManager cannot be resolved to a type

Avatar

Avatar
Validate 1
Level 3
premchandr61956
Level 3

Likes

17 likes

Total Posts

25 posts

Correct Reply

2 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile

Avatar
Validate 1
Level 3
premchandr61956
Level 3

Likes

17 likes

Total Posts

25 posts

Correct Reply

2 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile
premchandr61956
Level 3

30-03-2018

We have custom implementation to find the pages / assets which do not have jcr:content.

It was working fine AEM 6.0 version but we are migrating to AEM 6,3 now and we are facing the below error when we open the page

Error during include of component '/apps/misc-tools/components/missingNode'

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: 20
in the generated java file Only a type can be imported. com.day.cq.widget.HtmlLibraryManager resolves to a package 
An error occurred at line: 24 in the jsp file: /apps/misc-tools/components/init/init.jsp HtmlLibraryManager cannot be resolved to a type 21: --%>
<%@include file="/libs/foundation/global.jsp" %>
<% 22: %><%@page import="com.day.cq.wcm.api.WCMMode,com.day.cq.widget.HtmlLibraryManager"%>
<% 23: //if (WCMMode.fromRequest(request) != WCMMode.DISABLED) {
24: HtmlLibraryManager htmlMgr = sling.getService(HtmlLibraryManager.class);
25: if (htmlMgr != null) {
26: htmlMgr.writeCssInclude(slingRequest, out, "cq.wcm.edit");
27: htmlMgr.writeJsInclude(slingRequest, out, "cq.wcm.edit");


Below is the code we have in init.jsp

<%@include file="/libs/foundation/global.jsp" %><%

%><%@page import="com.day.cq.wcm.api.WCMMode,com.day.cq.widget.HtmlLibraryManager"%><%

//if (WCMMode.fromRequest(request) != WCMMode.DISABLED) {

    HtmlLibraryManager htmlMgr = sling.getService(HtmlLibraryManager.class);

    if (htmlMgr != null) {

        htmlMgr.writeCssInclude(slingRequest, out, "cq.wcm.edit");

        htmlMgr.writeJsInclude(slingRequest, out, "cq.wcm.edit");

    }

    String dlgPath = null;

    if (editContext != null && editContext.getComponent() != null) {

        dlgPath = editContext.getComponent().getDialogPath();

    }

//}

%>

Tried downloading the dependency for com.day.cq.widgets but it also throws below error

[INFO] ------------------------------------------------------------------------

Could not find artifact com.adobe.granite:com.day.cq.widget:jar:6.0.0 in adobe-public-releases (https://repo.adobe.com/nexus/content/groups/public)

Can anyone help me on this

Thanks in advance ,

Premchand

Replies

Avatar

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,408 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,408 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile
smacdonald2008
Level 10

31-03-2018

Trying to consume the AEM strongly typed APIs in 6.3 in JSP is older development pattern. Rework this component and use the AEM UBER 6.3 JAR file. Also we recommend converting your components to HTL and move away from JSP.

Avatar

Avatar
Validate 1
Level 1
Chaitanya96
Level 1

Likes

0 likes

Total Posts

7 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
Chaitanya96
Level 1

Likes

0 likes

Total Posts

7 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile
Chaitanya96
Level 1

16-04-2018

I am using AEM uber 6.3 Jar file. Bundle is resolved but i am getting similar exception

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

Only a type can be imported. com.day.cq.widget.HtmlLibraryManager resolves to a package

Tried recompiling all jsp, however no luck. Is there any suggestion you can provide?

Thanks,

Chat

Avatar

Avatar
Boost 500
MVP
Vijayalakshmi_S
MVP

Likes

505 likes

Total Posts

641 posts

Correct Reply

213 solutions
Top badges earned
Boost 500
Give Back 50
Give Back 5
Ignite 10
Ignite 5
View profile

Avatar
Boost 500
MVP
Vijayalakshmi_S
MVP

Likes

505 likes

Total Posts

641 posts

Correct Reply

213 solutions
Top badges earned
Boost 500
Give Back 50
Give Back 5
Ignite 10
Ignite 5
View profile
Vijayalakshmi_S
MVP

16-04-2018

Hi,

Please note that com.day.cq.widget.HtmlLibraryManager is deprecated since 6.1, replacement for the same - com.adobe.granite.ui.clientlibs.HtmlLibraryManager

HtmlLibraryManager ("The Adobe AEM Quickstart and Web Application.")

Avatar

Avatar
Give Back
Level 1
bryanledford
Level 1

Likes

0 likes

Total Posts

1 post

Correct Reply

0 solutions
Top badges earned
Give Back
View profile

Avatar
Give Back
Level 1
bryanledford
Level 1

Likes

0 likes

Total Posts

1 post

Correct Reply

0 solutions
Top badges earned
Give Back
View profile
bryanledford
Level 1

09-02-2021

If it has been deprecated then the Adobe team should update /libs/wcm/foundation/components/responsivegrid/responsivegrid.html and remove the reference.