Expand my Community achievements bar.

SOLVED

Issues with activating the models.

Avatar

Level 5

Hello Community - I have some issues with the bundles which is causing the issues with authoring the components in the project. The bundle has several sling models and servlets in it. If I install the same bundle in my local, I am able to successfully activate the bundles, activate the models and servlets without any issues. In the case of installing in higher environments, we are having issues with the bundles. Even though the bundles are active status and also all the dependencies are resolved without any issues, I see the below errors in the logs. I have even verified the model status (/system/console/status-adapters) and the model is available. AEM version (6.5) is same in my local and higher environments.Could some please help with this issue.

 

Caused by: org.apache.sling.scripting.sightly.SightlyException: Compilation errors in org/apache/sling/scripting/sightly/apps/test/components/content/testproduct/test__002d__product__002d__preview_html.java:
Line 41, column 1953 : com.abc.xyz.aem.core.models.testModel cannot be resolved to a type

 

I have run Maven clean install multiple times with no luck.

 

mvn -B archetype:generate -D archetypeGroupId=com.adobe.granite.archetypes -D archetypeArtifactId=aem-project-archetype -D archetypeVersion=23 -D aemVersion=6.5.0 -D appTitle="Company Components" -D appId="company components" -D groupId="com.xxx.yyy.aem" -D frontendModule=none -D includeExamples=n -D includeDispatcherConfig=n

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @v1101,

Given that the problem is only with higher environments and same model class works fine in local, I suggest to restart the below bundles once and try. 

If it is reproducible in all higher environments, I suggest to try first in immediate higher environment to local/DEV

Highlighted in red are the bundles related to HTL. The ones in green are responsible for compiling HTL files and converting to Java class.

Perhaps you can try green first and then followed by rest only if it is not solvable with ones in green. 

Vijayalakshmi_S_0-1597853436659.png

 

View solution in original post

3 Replies

Avatar

Correct answer by
Community Advisor

Hi @v1101,

Given that the problem is only with higher environments and same model class works fine in local, I suggest to restart the below bundles once and try. 

If it is reproducible in all higher environments, I suggest to try first in immediate higher environment to local/DEV

Highlighted in red are the bundles related to HTL. The ones in green are responsible for compiling HTL files and converting to Java class.

Perhaps you can try green first and then followed by rest only if it is not solvable with ones in green. 

Vijayalakshmi_S_0-1597853436659.png

 

Avatar

Level 5
@Vijayalakshmi_S - Thank you so much for your inputs. The issue is resolved. It looks like the deleted bundle reference was still in the registry. Whenever I delete any bundle from the console and verify the packages used by the bundles by using depfinder, I could see the deleted bundle reference was there in the list. After I had clicked the button "refresh" & "refresh packages", the deleted bundle reference is completely gone and I was able to use the components in the page without any issues.