Menu

AEM service unsatisfied

When you see your AEM service and servlet is showing in state unsatisfied. Then click on the class name and see the detail, on the OSGi console that what causing this issue and which reference is unsatisfied.

Unsatisfied
Service Name: org.apache.sling.api.resource.ResourceResolver
Cardinality: 1..1
Policy: static
Policy Option: reluctant
No Services bound


ResourceResolver is not satisfied or the way of creating ResourceResolver object is not correct.


Policy Option

RELUCTANT
          The reluctant policy option is the default policy option for both static and dynamic reference policies.


References

1. Reference Policy Option

Cannot find matching toolchain definitions for the following toolchain types jdk

In this case to resolve the build issue we need to create a toolchains.xml file in .m2 directory. And add the following lines into that file.


<?xml version="1.0" encoding="UTF-8"?>

<toolchains>

  <!-- JDK toolchains -->

  <toolchain>

    <type>jdk</type>

    <provides>

      <version>11</version>

      <vendor>oracle</vendor>

    </provides>

    <configuration>

      <jdkHome>C:\Program Files\Java\jdk-11.0.15</jdkHome>

    </configuration>

  </toolchain>

</toolchains>


Here you need to update the version of JDK and jdkHome path according to installed JDK version in your machine.

After updating toolchains.xml file, go back to your project and execute the command to build the project.


fatal: refusing to merge unrelated histories

While merge the two different branches one could face this issue when both the branches are not created with same parent or base branch. If still there is a need to merge or pull the code from another branch, then use the --allow-unrelated-histories with git pull command. This will ignore the histories error and forcefully pull the code from another branch.

e.g.

 git pull origin feature-new-git --allow-unrelated-histories