-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Binary type being null resulting in a NullPointerException #171
Comments
Thanks for the detailed error description. What would really help the most, is a reproducer. Maybe a little GitHub project, ideally Maven, but whatever helps me to reproduce this is fine. |
For now through trial and error I discovered that it was connected with this annotation @ConfigurationProperties(prefix = "bts-report.prdb") Removing it fixed the compilation. Digging further I came accross issue Spring Boot #4825 and found out that in my case indeed adding <configuration>
<sources/>
</configuration> to the Maven config of the aspectj-maven-plugin indeed fixed the problem. |
Hm, that bug was fixed 5 years ago in JDT Core (the project containing ECJ), and hence it probably was fixed in AspectJ, too, because AJC forks and regularly refreshes JDT Core. I would really need a reproducer in order to assess whether we have a problem in AspectJ or not. Your XML snippet alone does not help much, because I have no idea what you are excluding from where and what the situation is. I can only speculate, which I hate to do, because I could be completely wrong in assuming that you might be including an aspect designed for Spring AOP into an AspectJ compiler run, maybe leading to it being woven twice (once by AspectJ, then again by Spring AOP during runtime). I really cannot say. If you would prepare an MCVE, we could both learn something. I would find out if there is an AspectJ problem, you could get an explanation what the real root cause of your problem is and whether your workaround is actually correct or simply sweeping a problem under the rug for now. |
@Cibor, because you did not respond within one full month after I responded the very same day you created the issue, I am closing this issue as invalid. I will consider reopening it, if you provide the MCVE I requested. |
Note to myself: This error occurs in the exact same line 172 of |
Hi,
In our project based on Java 11 I'm getting this error during compilation
Internal compiler error: java.lang.Exception: java.lang.IllegalStateException: Error processing configuration meta-data on com.mycomnpany.PrdbProperties at org.aspectj.org.eclipse.jdt.internal.compiler.apt.dispatch.RoundDispatcher.handleProcessor(RoundDispatcher.java:172)
[ERROR]
I debugged the compilation and discovered the root cause. In LookupEnvironment there is this piece of code (line 1050) inside the method createBinaryTypeFrom()
In my case cachedType is resolved but it isn't binary (whatever that means). So the method returns a null. The consequence is that after returning from this method to AjLookupEnvironment when this line is executed
the sourceType variable is null so a NullPointerException is thrown.
I am not sure what is happening, especially what a binary type is. Is there a quick workaround that I could apply to my project to make this error go away?
There seems to be nothing particular about the PrdbProperties class. A POJO containing the following annotations
The text was updated successfully, but these errors were encountered: