While trying to create AEM 6.4 project using Adobe Maven Archetype 13 using the following command:"mvn org.apache.maven.plugins:maven-archetype-plugin:2.4:generate -DarchetypeGroupId=com.adobe.granite.archetypes -DarchetypeArtifactId=aem-project-archetype -DarchetypeVersion=13 -DarchetypeCatalog=htt...
My issue has been resolved when I used getSlingHelper() instead of creating a new object using new keyword in the Activate() method.AccessPageProp accessPageProp = getSlingScriptHelper().getService(AccessPagePropImpl.class);
I used below import statement for @Reference import org.osgi.service.component.annotations.Reference;I used logger to print exception in my catch block like,catch (Exception e) {logger.info("Exception...." + e.toString());e.printStackTrace();}It prints the below message,com.myproject.core.AcccessPag...
I used the Symbolic name of my OSGi Bundle in user mapper service, I gave all the required permissions to my system user and I followed this article too but still I am getting Null Pointer Exception.
I am trying to access page properties using services in AEM 6.4I have created an interface,public interface AccessPageProp {public String getPageProp();}I have created a class that implements this interface,@Component(service = AcccessPagePropImpl.class, immediate = true)public class AcccessPagePro...