Announcement Announcement Module
No announcement yet.
AspectJ NullPointerException in Eclipse when autobuilding after Roo changes Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • AspectJ NullPointerException in Eclipse when autobuilding after Roo changes

    Hello everyone,

    I am using the Galileo JavaEE package (not STS, never had this problem there) and am getting a NullPointerException (see below) when Roo performs changes bypassing Eclipse and the automatic build starts. After this, there is a "Building workspace - Invoking AspectJ Builder" task stuck in the Progress "pipeline" that I can only get rid of by restarting Eclipse.

    This is not a Roo problem (guess I would end up with the same problem when I perform those changes manually), but some of you might came along that problem and know a solution. Actually, it does sound pretty conventional (autobuild + background changes), but I could not find anything.

    This is the exception:

    at org.aspectj.ajdt.internal.compiler.lookup.SimpleSyntheticAccessMethodBinding.<init>(
    at org.aspectj.ajdt.internal.compiler.lookup.InterTypeFieldBinding.<init>(
    at org.aspectj.ajdt.internal.compiler.lookup.EclipseTypeMun ...
    Compile error: NullPointerException thrown: null
    AJDT Version: 2.0.3.e35x-20100129-1100
    AspectJ version:

  • #2
    Looks like an AspectJ bug. Is there anyway you can distill a testcase (that you can share) that shows the same issue - I'm not aware of any open AspectJ bugs on this issue.

    Oh, and do you believe the code is 'correct' at the time of compiling? It is just that it might be a problem with building incorrect code - I've seen that a few times where insufficient guards are in place in AspectJ and before the correct syntax error can be produced, the compiler fails.

    Andy Clement
    AspectJ Development


    • #3
      Hi Andy,

      I briefly looked through the open bugs as well (conveniently linked to from within the error message window) and could not found anything. I will try to offer anything reproducible (using a fresh Eclipse installation).

      I can't say if the code is correct but I also had some trouble with the syntax checking/highlighting in those Roo-Aspects-backed classes. I am fairly sure however that the problem is linked to the changes made by Roo in the background, mainly because every time it happened I just made changes in the IDE that triggered Roo to follow up.

      I will observer and report on this later, thanks so far.




      • #4
        I'm having the same problem...

        Eclipse 3.5 (Linux/Ubuntu)
        AJDT 2.0.2
        Using Spring Roo 1.0 framework

        I get regular lock-ups (roughly twice a day), always during an auto build. The task is the same: "Building workspace - Invoking AspectJ Builder". The only way to regain control is to use xkill to force terminate Eclipse, and delete the workspace lock before restarting it...

        I'm currently checking for updates, and will try disabling some of the AspectJ settings to determine what is causing the faults. Unfortunately, the build failures are sporadic and very difficult to reproduce intentionally.


        • #5
          If you are on a relatively up to date JVM, you can use jps to get the java process ID then jstack to dump the stack for the apparently hanging JVM. If you could collect that information, it could be very useful!



          • #6
            jps and jstack output of aspectj builder hang

            We are using roo and constantly getting hangs in the aspectj builder.
            Attached is the output from jps and jstack. The output exceeded your limits for your site so I had to break it into two files.