I have built a custom AEM component 'Byline' by following AEM WKND tutorial. However, after deployment, I am not able to find my component model in AEM web console for Sling models. I am using AEM 6.4 quickstart, getting following errors while using this component:
Caused by: org.apache.sling.scripting.sightly.SightlyException: Compilation errors in org/apache/sling/scripting/sightly/apps/wknd/components/content/byline/byline_html.java:
Line 28, column 1272 : Only a type can be imported. com.adobe.aem.guides.wknd.core.components.Byline resolves to a package
Line 49, column 2354 : Byline cannot be resolved to a type
at org.apache.sling.scripting.sightly.impl.engine.SightlyJavaCompilerService.compileSource(SightlyJavaCompilerService.java:173) [org.apache.sling.scripting.sightly:22.214.171.124_3_1]
... 286 common frames omitted
Unable to resolve com.adobe.aem.guides.wknd.core (R 551.19): missing requirement [com.adobe.aem.guides.wknd.core (R 551.19)] osgi.wiring.package; (&(osgi.wiring.package=com.adobe.cq.wcm.core.components.models)(version>=12.5.0)(!(version>=13.0.0))) Unresolved requirements: [[com.adobe.aem.guides.wknd.core (R 551.19)] osgi.wiring.package; (&(osgi.wiring.package=com.adobe.cq.wcm.core.components.models)(version>=12.5.0)(!(version>=13.0.0)))]
at org.apache.sling.installer.core.impl.tasks.BundleStartTask.execute(BundleStartTask.java:97) [org.apache.sling.installer.core:3.8.12]
at org.apache.sling.installer.core.impl.OsgiInstallerImpl.doExecuteTasks(OsgiInstallerImpl.java:902) [org.apache.sling.installer.core:3.8.12]
at org.apache.sling.installer.core.impl.OsgiInstallerImpl.executeTasks(OsgiInstallerImpl.java:737) [org.apache.sling.installer.core:3.8.12]
at org.apache.sling.installer.core.impl.OsgiInstallerImpl.run(OsgiInstallerImpl.java:287) [org.apache.sling.installer.core:3.8.12]
Also, I can see following error while viewing my site OSGi bundle in AEM Web console:
com.adobe.cq.wcm.core.components.models,version=[12.5,13) -- Cannot be resolved
I am not sure if I am missing any configuration or mvn dependency. Can I please get some help to resolve these errors?
Thanks for replying. It seems the tutorial was recently updated to use Core components 2.2.0 and I was using Core components 2.0.4 for models as required earlier. I have updated the configurations accordingly which has resolved all errors.
Yes, I was talking about pom.xml file I updated.
I am using VSCode, I experienced the same error, the parent POM already updated to core 2.4.0.
When I built with mvn, there is no error.
I wonder what else can I look at? How would I know which version of core should be used?
Thanks in advanced.
Thanks for replying!
I am using AEM 126.96.36.199. I have all per-requisites installed and have already followed all steps for project setup described in Chapter 1 and have been following all steps in subsequent chapters as well. I am not sure why I am still getting this error, I don't see anything described in the tutorial missing from my configurations. Do you have any other pointers to proceed?
I am getting similar errors in creating any other model component as well. I am stuck with these errors for so long now and would really appreciate getting some help to resolve them.
I m still trying to figure out what and where the issue is.
Yeah I have
in my pom.xml but still have the same error
What did you update in your configurations? Are you referring to the pom.xml files?
thanks for posting your fix!