Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AspectJ expression gives formal unbound in pointcut error

I have within aspectJ the expression:

@Pointcut("within(com.param.cpms.dao.impl.ProjectMetaDaoImpl)")
public void daoExceptionHandle() {

}

At Spring 3.0 startup, I am getting the following error :

nested exception is java.lang.IllegalArgumentException: error at ::0 formal unbound in pointcut
like image 399
param Avatar asked Sep 07 '25 14:09

param


2 Answers

Probably the problem is not in your pointcut, but in an advice using that pointcut and using a parameter which does not exist in the pointcut. Just remove the parameter from the advice (well, or add it to the pointcut).

like image 85
kriegaex Avatar answered Sep 09 '25 05:09

kriegaex


It was Joinpoint ("p lowercase)

org.aopalliance.intercept.Joinpoint;

Change to JointPoint("P uppercase)

org.aspectj.lang.JoinPoint; 
like image 30
Dapper Dan Avatar answered Sep 09 '25 04:09

Dapper Dan