<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Java Spring Framework]]></title><description><![CDATA[<p dir="auto">මේ Error එක එනව main claas eke එකෙ "ApplicationContext context = new ClassPathXmlApplicationContext("applicationContextFile.xml");" line එකෙන්</p>
<p dir="auto">Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.aop.aspectj.annotation.AnnotationAwareAspectJAutoProxyCreator#0' defined in class path resource [applicationContextFile.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.aop.aspectj.annotation.AnnotationAwareAspectJAutoProxyCreator]</p>
<p dir="auto">applicationContextFile.xml</p>
<pre><code>&lt;beans xmlns="http://www.springframework.org/schema/beans"  
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  
xmlns:aop="http://www.springframework.org/schema/aop"   
   xsi:schemaLocation="http://www.springframework.org/schema/beans   
   http://www.springframework.org/schema/beans/spring-beans.xsd   
   http://www.springframework.org/schema/aop   
   http://www.springframework.org/schema/aop/spring-aop.xsd"&gt;  
  
  &lt;bean id="opBean" class="aspectdeclaresasaspect.Operation"&gt;&lt;/bean&gt;
  &lt;bean id="trackMyBean" class="aspectdeclaresasaspect.TrackOperation"&gt;&lt;/bean&gt;
  &lt;bean class="org.springframework.aop.aspectj.annotation.AnnotationAwareAspectJAutoProxyCreator"&gt;&lt;/bean&gt; 
  
&lt;/beans&gt;  
</code></pre>
<p dir="auto">main class "Test.java"</p>
<p dir="auto">public class Test {</p>
<pre><code>public static void main(String[] args) {
	// TODO Auto-generated method stub
	ApplicationContext context = new ClassPathXmlApplicationContext("applicationContextFile.xml");
	Operation o = (Operation) context.getBean("opBean");

	System.out.println("Calling msg.....");
	o.msg();

	System.out.println("Calling m.....");
	o.m();

	System.out.println("Calling k.....");
	o.k();
}
</code></pre>
<p dir="auto">}</p>
]]></description><link>https://lankadevelopers.lk/topic/850/java-spring-framework</link><generator>RSS for Node</generator><lastBuildDate>Wed, 11 Mar 2026 10:36:05 GMT</lastBuildDate><atom:link href="https://lankadevelopers.lk/topic/850.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 29 Aug 2021 05:45:29 GMT</pubDate><ttl>60</ttl></channel></rss>