Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any way to get rid of these spring/aspectj warnings when building the project?

I've frequently put up with this for a long time, but I'm a little worried that it's slowing my build process down now. There are a good few seconds that are taken up as Spring/AspectJ reports these warnings. I'd rather try and make the cleanest build possible, even if it doesn't end up speeding it up.

Here are the warnings:

Found @DeclareAnnotation while current release does not support it (see 'org.aspectj.weaver.bcel.AtAjAttributes')
advice defined in org.springframework.orm.jpa.aspectj.JpaExceptionTranslatorAspect has not been applied [Xlint:adviceDidNotMatch]
advice defined in org.springframework.mock.staticmock.AnnotationDrivenStaticEntityMockingControl has not been applied [Xlint:adviceDidNotMatch]
advice defined in org.springframework.mock.staticmock.AbstractMethodMockingControl has not been applied [Xlint:adviceDidNotMatch]
advice defined in org.springframework.scheduling.aspectj.AbstractAsyncExecutionAspect has not been applied [Xlint:adviceDidNotMatch]

I'm sure if you've used spring, you've seen these. Any way to get rid of them?

like image 232
egervari Avatar asked Nov 06 '22 05:11

egervari


1 Answers

If you see here, the readAj5ClassAttributes method throws this exception. It looks like you are using some kind of annotation that your current version doesn't support. If you inspect the method, you will see that this exception is thrown only when the class is not "org.aspectj.lang.annotation" and when you have "Lorg/aspectj/lang/annotation/DeclareAnnotation;" or @DeclareAnnotation somewhere.

So either don't use this annotation or check to see the versions of the jar since it says:

while current release does not support it

. A good place to start is by traversing these: http://www.jarfinder.com/index.php/java/info/org.aspectj.weaver.bcel.AtAjAttributes
http://www.jarvana.com/jarvana/search?search_type=class&java_class=org.aspectj.weaver.bcel.AtAjAttributes

Kind Regards,
Despot

like image 152
despot Avatar answered Nov 09 '22 04:11

despot