Reputation: 1441
In one of my aspects i have the following method:
@Before("execution (* org.xx.xx.xx..*.*(@Standardized (*),..))")
public void standardize(JoinPoint jp) throws Throwable {
}
The goal is to find all methods of my application packages which have at least one parameter annotated with @Standardized (not with a type annotated with @Standardized which is different)
ps: @Standardized is a custom annotation.
From what i've read on the documentation, this configuration should be the correct one (let me know if not), but when i deploy my application under a JBoss server, i have the following exception:
java.lang.IllegalArgumentException: warning no match for this type name: Standardized
Details:
11.05.12 17:02:35 ERROR - ContextLoader.java@initWebApplicationContext: Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.transaction.annotation.AnnotationTransactionAttributeSource#0': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.transaction.config.internalTransactionAdvisor': Initialization of bean failed; nested exception is java.lang.IllegalArgumentException: warning no match for this type name: Standardized [Xlint:invalidAbsoluteTypeName]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:450)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:290)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
I tried with (@Standardized *,..) instead of (@Standardized (*),..) (which would not have the same result i know) but i still have the same error.
Does somebody know why ?
Thanks in advance for any help.
Regards.
Upvotes: 0
Views: 858
Reputation: 31795
Unless @Standardized
annotation is in default package, you need to specify FQN name for your annotation or use a pattern like @*..Standardized
.
Upvotes: 2