• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1284
  • Last Modified:

spring AOP aspect4j logger on the spring mvc application exception

>>>java.lang.IllegalStateException: Failed to load ApplicationContext
                at org.springframework.test.context.TestContext.getApplicationContext(TestContext.java:203)


Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'updateIndicatorClient' defined in class path resource [applicationContext-xyz.xml]: Initialization of bean failed; nested exception is org.springframework.aop.framework.AopConfigException: Could not generate CGLIB subclass of class [class $Proxy15]: Common causes of this problem include using a final class or a non-visible class; nested exception is java.lang.IllegalArgumentException: Cannot subclass final class class $Proxy15



When running spring AOP aspect4j logger on the spring mvc application getting above exception.

How can i resolve it.
Any ideas, resources,sample code,links,  highly appreciated. thanks in advance.
0
gudii9
Asked:
gudii9
2 Solutions
 
objectsCommented:
looks like your trying to proxy a class defined as final
you cannot proxy final classes as they need to be subclassed
0
 
Sathish David Kumar NCommented:
>>>>>>>>java.lang.IllegalStateException: Failed to load ApplicationContext
                at org.springframework.test.context.TestContext.getApplicationContext(TestContext.java:203)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'updateIndicatorClient' defined in class path resource [applicationContext-xyz.xml]:

Your define 'updateIndicatorClient'  class in the applicationContext-xyz.xml but your not properly define setter method for that class ....

You need to check...
is setter method is there ?
'updateIndicatorClient'  is this class name is corret ?
you define the path is correct or not ?
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now