Getting issue while deploying Spring containing aspect annotation with parenthesis.

Solution Verified - Updated -

Issue

  • Getting the following exception when trying to deploy Spring 3.1.2 application containing aspect annotation with parenthesis.
ERROR [org.springframework.web.context.ContextLoader] (MSC service thread 1-5) Context initialization failed: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'customBean': Injection of autowired dependencies failed;

...

Caused by: java.lang.IllegalArgumentException: error Type referred to is not an annotation type: abc$xyz$pqr$MyAspectClass
    at org.aspectj.weaver.tools.PointcutParser.parsePointcutExpression(PointcutParser.java:301) 
    at org.springframework.aop.aspectj.AspectJExpressionPointcut.buildPointcutExpression(AspectJExpressionPointcut.java:207) 
    at org.springframework.aop.aspectj.AspectJExpressionPointcut.getFallbackPointcutExpression(AspectJExpressionPointcut.java:358) 
        ...
  • Getting java.lang.IllegalArgumentException: error Type referred to is not an annotation type while deploying a Spring application with a class having aspect annotation with parenthesis.

Environment

  • Red Hat JBoss Application Platform (EAP)

    • 6.x
  • Spring Framework

    • 3.1.2
    • 3.2.4

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.