HTTP ERROR 404 Not Found – CRX/DE Not available
Many times while working on AEM development environments, we encounter situation when we get HTTP Error 404 Not Found after starting AEM instance. After validating couple of troubleshooting steps like :-
- Whether all AEM bundles are active or not.
- What error we are seeing in error logs.
We may end up in situations, where we spin up a new instance. In this post we will see how to resolve HTTP Error 404 Not Found issue while starting AEM instance.
Root Cause:-
This issue occurs when AEM instance is up from a very long time and normal shutdown of instance was not successful and we go ahead to kill/terminate the AEM java process. This issue is mostly reproducible when we start AEM using command prompt by assigning high java heap memory. In such cases to protect your content in JCR repository , AEM safeguards mechanism apply lock on the repository. Due to which we get 404 error with MESSAGE:Not FoundSERVLET:org.apache.felix.http.base.internal.dispatch.DispatcherServlet after the restart.
When we debug error logs we can see exception as mentioned below:-
at org.apache.felix.framework.Felix.startBundle(Felix.java:2308)
at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1566)
at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)
at java.base/java.lang.Thread.run(Thread.java:829)
31.05.2023 09:20:13.066 *ERROR* [FelixLogListener] Events.Framework.adobe-lc-forms-xmlform-bmc FrameworkEvent ERROR (org.apache.felix.log.LogException: org.osgi.framework.BundleException: Unable to resolve adobe-lc-forms-xmlform-bmc [672](R 672.0): missing requirement [adobe-lc-forms-xmlform-bmc [672](R 672.0)] osgi.wiring.package; (&(osgi.wiring.package=com.adobe.service.ManagerPackage)(version>=1.0.0)(!(version>=2.0.0))) [caused by: Unable to resolve adobe-aemds-core-bmc [598](R 598.0): missing requirement [adobe-aemds-core-bmc [598](R 598.0)] osgi.wiring.package; (&(osgi.wiring.package=com.adobe.aemds.connector.repository)(version>=1.9.0)(!(version>=2.0.0))) [caused by: Unable to resolve adobe-aemds-core-common [601](R 601.0): missing requirement [adobe-aemds-core-common [601](R 601.0)] osgi.wiring.package; (&(osgi.wiring.package=com.adobe.idp)(version>=10.0.0)(!(version>=11.0.0)))]] Unresolved requirements: [[adobe-lc-forms-xmlform-bmc [672](R 672.0)] osgi.wiring.package; (&(osgi.wiring.package=com.adobe.service.ManagerPackage)(version>=1.0.0)(!(version>=2.0.0)))])
Solution :-
In order to solve HTTP Error 404 Not Found issue while starting AEM instance follow below steps:-
- Stop your AEM instance.
- Navigate to local file system.
- Delete file /author/crx-quickstart/repository/segmentstore/repo.lock.
Note:- Usually this solves the issue.
- If deleting repo.lock file along doesn’t fix the issue. Delete /author/crx-quickstart/launchpad/felix/cache.lock file as well.
- Once done, start the AEM instance and try accessing crx/de http://localhost:4502/crx/de/index.jsp or AEM login page http://localhost:4502/libs/granite/core/content/login.html.
- [Optional] If the issue is not resolved by above two steps, then In few instance repoinit file is the culprit along with the lock. Delete /crx-quickstart/launchpad/config/org/apache/sling/jcr/repoinit also and try restarting AEM instance.
Leave a Reply