Expand my Community achievements bar.

Clean, OOB Archetype on restart: AuthenticationSupport service missing

Avatar

Level 2

Mvn; 3.8.4, clear .m2/repository

AEM: 6.5.0

Build cmd used: mvn -B archetype:generate -D archetypeGroupId=com.adobe.aem -D archetypeArtifactId=aem-project-archetype -D archetypeVersion=32 -D appTitle="test" -D appId="test" -D groupId="com.test" -D includeExamples=n -D frontendModule=angular -D aemVersion=6.5.0

It will install, build and run fine but restarting the instance result in failure.

 

The test.core bundle reports this: 


org.apache.sling.api.servlets,version=[2.3,3) -- Cannot be resolved

This is the first error above the AuthenticationSupport message in the error log:

06.12.2021 20:58:00.266 *ERROR* [FelixDispatchQueue] test.core FrameworkEvent ERROR (org.osgi.framework.BundleException: Unable to resolve test.core [583](R 583.0): missing requirement [test.core [583](R 583.0)] osgi.wiring.package; (&(osgi.wiring.package=org.apache.sling.api.servlets)(version>=2.3.0)(!(version>=3.0.0))) Unresolved requirements: [[test.core [583](R 583.0)] osgi.wiring.package; (&(osgi.wiring.package=org.apache.sling.api.servlets)(version>=2.3.0)(!(version>=3.0.0)))])
org.osgi.framework.BundleException: Unable to resolve test.core [583](R 583.0): missing requirement [test.core [583](R 583.0)] osgi.wiring.package; (&(osgi.wiring.package=org.apache.sling.api.servlets)(version>=2.3.0)(!(version>=3.0.0))) Unresolved requirements: [[test.core [583](R 583.0)] osgi.wiring.package; (&(osgi.wiring.package=org.apache.sling.api.servlets)(version>=2.3.0)(!(version>=3.0.0)))]

As mentioned this is pure OOB, no changes have been made to the generated code.  If I backup in a content package and nuke crx-quickstart every time I want to reboot the instance everything will work fine, but I wasn't expecting to have to do that

3 Replies

Avatar

Community Advisor

Hi,

Could you please check your pom file for dependancy based on your AEM version.

As I know the above version of bundle in 6.5.7 is 

 

<dependency>
	<artifactId>org.apache.sling.api</artifactId>
	<version>2.22.0</version>
	<groupId>org.apache.sling</groupId>
	<scope>provided</scope>
</dependency>


Arun Patidar

Avatar

Level 2

Something changed in the last 12hrs, I replicated the steps above and there's no dependency error in the bundles now.

Doing a clean install with PautoInstallSinglePackage really turns the site into a dog's breakfast though:

07.12.2021 12:06:57.900 *ERROR* [FelixDispatchQueue] com.adobe.cq.sample.we.retail.core FrameworkEvent ERROR (org.osgi.framework.BundleException: Unable to resolve com.adobe.cq.sample.we.retail.core [581](R 581.0): missing requirement [com.adobe.cq.sample.we.retail.core [581](R 581.0)] osgi.wiring.package; (&(osgi.wiring.package=com.adobe.cq.wcm.core.components.models)(version>=12.6.0)(!(version>=13.0.0))) [caused by: Unable to resolve com.adobe.cq.core.wcm.components.core [579](R 579.1): missing requirement [com.adobe.cq.core.wcm.components.core [579](R 579.1)] osgi.wiring.package; (&(osgi.wiring.package=com.day.cq.wcm.api)(version>=1.28.0)(!(version>=2.0.0)))] Unresolved requirements: [[com.adobe.cq.sample.we.retail.core [581](R 581.0)] osgi.wiring.package; (&(osgi.wiring.package=com.adobe.cq.wcm.core.components.models)(version>=12.6.0)(!(version>=13.0.0)))])
org.osgi.framework.BundleException: Unable to resolve com.adobe.cq.sample.we.retail.core [581](R 581.0): missing requirement [com.adobe.cq.sample.we.retail.core [581](R 581.0)] osgi.wiring.package; (&(osgi.wiring.package=com.adobe.cq.wcm.core.components.models)(version>=12.6.0)(!(version>=13.0.0))) [caused by: Unable to resolve com.adobe.cq.core.wcm.components.core [579](R 579.1): missing requirement [com.adobe.cq.core.wcm.components.core [579](R 579.1)] osgi.wiring.package; (&(osgi.wiring.package=com.day.cq.wcm.api)(version>=1.28.0)(!(version>=2.0.0)))] Unresolved requirements: [[com.adobe.cq.sample.we.retail.core [581](R 581.0)] osgi.wiring.package; (&(osgi.wiring.package=com.adobe.cq.wcm.core.components.models)(version>=12.6.0)(!(version>=13.0.0)))]

 

07.12.2021 12:07:16.307 *ERROR* [sling-default-5-health-com.day.cq.compat.codeupgrade.impl.hc.MissingPackagesHealthCheck] com.adobe.granite.queries.impl.hc.QueryHealthCheckMetrics Error in refreshing the health check gauge
com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected a string but was BEGIN_OBJECT at line 1 column 1480105 path $.data[580].contentPackage

 

07.12.2021 12:11:13.763 *ERROR* [0:0:0:0:0:0:0:1 [1638897073681] GET /content/test/us/en/home.html HTTP/1.1] com.day.cq.wcm.core.impl.WCMDeveloperModeFilter Error during include of SlingRequestPathInfo: path='/content/test/us/en/home/jcr:content', selectorString='null', extension='html', suffix='null'
org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: Compilation errors in org/apache/sling/scripting/sightly/apps/spa__002d__project__002d__core/components/page/page_html.java:
Line 45, column 2590 : com.adobe.aem.spa.project.core.models.Page cannot be resolved to a type
Line 46, column 2698 : com.adobe.cq.wcm.core.components.models.PWA cannot be resolved to a type

 

Avatar

Level 2

Unfortunately I can't include the OOTB pom generated by Adobe because this form mistakenly thinks it's >30k chars.  After deploy, the site (except for /system/xxx) will return 503.  I ended up using v4.0.0 - it doesn't come with so much as a HelloWorld model, but it was easier than trying to untangle the dependency problems with Arch 32.