Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session

AEM Cloud SDK with CIF not coming up

Avatar

Employee Advisor

I have setup local AEM cloud SDK with CIF addon and installed Venia content package. I stopped the instance and tried to start it after few days but it does not come up. I see below errors in logs. Has anyone else faced the same issue?

 

*ERROR* [FelixLogListener] org.apache.sling.graphql.core.servlet.GraphQLServlet bundle org.apache.sling.graphql.core:0.0.9.T20210125100520-805f473 (511)[org.apache.sling.graphql.core.servlet.GraphQLServlet(2898)] : The activate method has thrown an exception (java.lang.IllegalArgumentException: A metric named org.apache.sling.graphql.core.servlet.GraphQLServlet.rt:graphql/sites/components/endpoint.m:GET_POST.e:json.cache_hit_rate already exists)
java.lang.IllegalArgumentException: A metric named org.apache.sling.graphql.core.servlet.GraphQLServlet.rt:graphql/sites/components/endpoint.m:GET_POST.e:json.cache_hit_rate already exists
at com.codahale.metrics.MetricRegistry.register(MetricRegistry.java:91) [io.dropwizard.metrics.core:3.2.4]
at org.apache.sling.graphql.core.servlet.GraphQLServlet.activate(GraphQLServlet.java:199)


*ERROR* [FelixLogListener] org.apache.sling.servlets.resolver FrameworkEvent ERROR (org.apache.felix.log.LogException: org.osgi.framework.ServiceException: Service factory returned null. (Component: org.apache.sling.graphql.core.GraphQLServlet (2898)))
org.apache.felix.log.LogException: org.osgi.framework.ServiceException: Service factory returned null. (Component: org.apache.sling.graphql.core.GraphQLServlet (2898))
at org.apache.felix.framework.ServiceRegistrationImpl.getFactoryUnchecked(ServiceRegistrationImpl.java:385)

*ERROR* [OsgiInstallerImpl] org.apache.jackrabbit.vault.packaging.registry.impl.JcrPackageRegistry Stream is not a content package. Missing 'jcr_root'.
13.06.2021 11:28:55.907 *INFO* [OsgiInstallerImpl] com.adobe.granite.installer.factory.packages.impl.PackageTransformer Unable to check content package {}
java.io.IOException: Stream is not a content package. Missing 'jcr_root'.
at org.apache.jackrabbit.vault.packaging.registry.impl.JcrPackageRegistry.upload(JcrPackageRegistry.java:377) [org.apache.jackrabbit.vault:3.4.0]
at org.apache.jackrabbit.vault.packaging.impl.JcrPackageManagerImpl.upload(JcrPackageManagerImpl.java:183) [org.apache.jackrabbit.vault:3.4.0]
at com.adobe.granite.installer.factory.packages.impl.PackageTransformer.checkForPackage(PackageTransformer.java:183) [com.adobe.granite.installer.factory.packages:1.0.18]
at com.adobe.granite.installer.factory.packages.impl.PackageTransformer.transform(PackageTransformer.java:132) [com.adobe.granite.installer.factory.packages:1.0.18]
at org.apache.sling.installer.core.impl.OsgiInstallerImpl.transformResources(OsgiInstallerImpl.java:974) [org.apache.sling.installer.core:3.11.4]
at org.apache.sling.installer.core.impl.OsgiInstallerImpl.run(OsgiInstallerImpl.java:298) [org.apache.sling.installer.core:3.11.4]
at java.base/java.lang.Thread.run(Thread.java:834)

13 Replies

Avatar

Community Advisor

Hi @shelly-goel,

Could you please let know if you were able to access system/console. If yes, can you try to restart the framework in your local instance via http://localhost:4502/system/console/vmstat

 

Avatar

Community Advisor

@shelly-goel,

Can you confirm if the instance is only with CIF add on and Venia package when it was last working or were there any changes done on top. 

If yes, please share high level details

 

Avatar

Community Advisor

@shelly-goel,

Per the issue statement, GraphQLServlet(from GraphQL core bundle) has issue in Activate method which results in Service Registration issue.

Also, just realized the below issue on missing jcr_root

*ERROR* [OsgiInstallerImpl] org.apache.jackrabbit.vault.packaging.registry.impl.JcrPackageRegistry Stream is not a content package. Missing 'jcr_root'.

If you are able to recollect which package might have been installed by the timestamp - 13.06.2021 11:28:55.907, we can arrive at the problematic package. 

 

If not, given that it is local instance, I suggest to set up fresh following this article. (In the same sequence as mentioned in Local Set up section)

https://experienceleague.adobe.com/docs/experience-manager-cloud-service/content-and-commerce/storef...

Explicit note based on the article :

  • Cross check if you have Java 11
  • Latest CIF add on Sling Feature archive (.far) as that of Cloud service SDK version 
  • Before installing any new AEM archetype commerce project (includeCommerce=y) or Venia Store front packages, cross check if all the bundles(in particular GraphQL core/GraphQL related bundles) are active and configurations/bundles related to GraphQL are available via OSGI Installer. - http://localhost:4502/system/console/osgi-installer + no errors in error.log file. 

Avatar

Employee Advisor

@Vijayalakshmi_S 

I did not install any package other than venia and it all worked fine till I was using this instance. I just shut down this instance and started it few days later that it did not work.

 

Avatar

Employee

The errors you see related to the org.apache.sling.graphql.core.servlet.GraphQLServlet are from CIF and Commerce. This is used by AEM Content Fragment GraphQL.

Avatar

Administrator

@mhaack Good to see you back in the AEM community.



Kautuk Sahni

Avatar

Level 4

I tried to install Commerce Add-On package on AEM SDK on my local. After installation, GraphQL client bundle is not able resolve the dependencies and failing with below errors:

 

 

25.03.2022 15:20:39.369 *ERROR* [FelixLogListener] LogService.org.apache.felix.http.jetty Bundles: Cannot start (org.apache.felix.log.LogException: org.osgi.framework.BundleException: Unable to resolve com.adobe.commerce.cif.graphql-client [573](R 573.0): missing requirement [com.adobe.commerce.cif.graphql-client [573](R 573.0)] osgi.wiring.package; (&(osgi.wiring.package=com.codahale.metrics)(version>=3.2.0)(!(version>=4.0.0))) Unresolved requirements: [[com.adobe.commerce.cif.graphql-client [573](R 573.0)] osgi.wiring.package; (&(osgi.wiring.package=com.codahale.metrics)(version>=3.2.0)(!(version>=4.0.0)))])
org.apache.felix.log.LogException: org.osgi.framework.BundleException: Unable to resolve com.adobe.commerce.cif.graphql-client [573](R 573.0): missing requirement [com.adobe.commerce.cif.graphql-client [573](R 573.0)] osgi.wiring.package; (&(osgi.wiring.package=com.codahale.metrics)(version>=3.2.0)(!(version>=4.0.0))) Unresolved requirements: [[com.adobe.commerce.cif.graphql-client [573](R 573.0)] osgi.wiring.package; (&(osgi.wiring.package=com.codahale.metrics)(version>=3.2.0)(!(version>=4.0.0)))]
at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4398)

Avatar

Level 4

Adobe Experience Manager (6.5.0)

AEM Commerce Add-On v2022.02.24.00 for AEM 6.5

Avatar

Level 1

@mhaack @kautuk_sahni  Any idea on what is causing this error? Are you able to replicate it at your end?

Avatar

Employee

I tried and could not reproduce. The combination AEM 6.5 + Service Pack AEM 6.5.12.0 (I just got the latest) + AEM Commerce Add-On v2022.02.24.00 for AEM 6.5 is working for me. I cannot reproduce the failing bundle starts.