AspectJ expression gives formal unbound in pointcut error

param picture param · Sep 4, 2012 · Viewed 35.4k times · Source

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

Answer

kriegaex picture kriegaex · Sep 4, 2012

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).