Menu

Insufficient Heap Memory

Issue "Insufficient Heap Memory"

Using 64bit VM settings, min.heap=1024MB, min permgen=256MB, default fork arguments=[-Xmx1024m, -XX:MaxPermSize=256m]

**** WARNING: insufficent heap memory ****
The JVM reports 910 MB but we recommend at least 1024 MB +/- 20
Use your JVM's heap size option (like -Xmx1024M) to set that size.
Will fork a JVM to get enough memory.
********************************************************************************
Available memory below specified limits and low-memory action set to fork, will fork to get enough memory
Not forking JVM as -nofork option is set
Setting properties from file

Resolution

If you have just closed any java program then wait for a few minutes and give chance to garbage collection to remove the unwanted space and clean the Heap memory.

AEM Sling Model injection and annotation

In this article, we will understand what all are the ways to reading authored values of AEM component using sling model in AEM

Using ValueMapValue annotation of package org.apache.sling.models.annotations.injectorspecific

@ValueMapValue(injectionStrategy = InjectionStrategy.OPTIONAL)
private String classStartDateLabel;

Using Inject annotation of package javax.inject


@Inject
@Via("resource")
@Optional
private String classStartDateLabel;


Getter method for this injection


public String getClassStartDateLabel() {
return classStartDateLabel;
}

sun.misc - cannot be resolved | AEM Bundle

sun.misc -- Cannot be resolved but is not required and overwritten by Boot Delegation

Resolution

This error we see sometimes while installing bundle in Adobe Experience Manager(AEM). If you are seeing this error just after the installation of the package then wait for a few minutes to resolve the dependencies. Most of the time it will resolve automatically as soon as the dependent library or service will available. After a few minutes if this is not getting resolved then check your POM and ensure you are adding the correct dependency which is available in the system.