Sign in to Community
Sign in to view all badges
Am trying to load bean.xml file but am getting following error
ApplicationContext context = new ClassPathXmlApplicationContext("bean.xml");
bean.xml file present in src/main/resources folder
provide any solution ASAP..
THIS API (org.springframework.context.ApplicationContxt) is not an AEM API.
Looks like you are attempting to use Spring MVC API in AEM.
To develop in AEM - you should use Sling APIs, OSGi, etc, See this article as a guideline on how to develop against AEM:
Getting Started with AEM Sites - WKND Tutorial
I have dependency on external customized jar so i have to use ApplicationContext to load bean.xmlis there any solution ? because which is working in eclipse but not in AEM server .
The reason it's not working is that you are attempting to use AEM as if its a Spring-based platform.
ApplicationContext is a Spring API: Understanding application-context
As discussed in the WEEKEND tutorial - an AEM site is implemented using:
Not Spring APIs.
I also know SPRING MVC and how it works with Controllers, Views, and Models and annotations like @autowired. AEM uses none of these.
AEM uses OSGi based R6, R7 annotations (like @Reference) : Using OSGi R6 annotations (>= AEM6.2) - Experience Delivers