Community
Participate
Working Groups
I'm using Eclipse RC2 w/ the latest AJDT development drop, 1.2.1.20050615132409. Now, whenever I launch any of the applications in my workspace, the launch fails with the following stacktrace: java.lang.NullPointerException at org.eclipse.ajdt.internal.ui.actions.UICoreOperations.sourceFilesChanged(UICoreOperations.java:58) at org.eclipse.ajdt.core.builder.AJBuilder.build(AJBuilder.java:168) at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:593) at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:1038) at org.eclipse.core.runtime.Platform.run(Platform.java:775) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:168) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:202) at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:231) at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:1038) at org.eclipse.core.runtime.Platform.run(Platform.java:775) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:234) at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:303) at org.eclipse.core.internal.resources.Project.build(Project.java:106) at org.eclipse.debug.core.model.LaunchConfigurationDelegate.buildProjects(LaunchConfigurationDelegate.java:335) at org.eclipse.debug.core.model.LaunchConfigurationDelegate.buildForLaunch(LaunchConfigurationDelegate.java:94) at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:569) at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:515) at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:733) at org.eclipse.debug.internal.ui.DebugUIPlugin$6.run(DebugUIPlugin.java:931) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:76)
John, What exactly are you doing? Debug As > Java Application? From a AspectJ project presumably. Does the AspectJ project depend on one or more Java projects? It looks like that could be the problem.
This happens running either an Eclipse application or a JUnit test, neither of which are AspectJ projects, but both have dependencies on AspectJ projects. We do have a project (non-AspectJ) that was compiled using JDK 1.3, but due to different environments that it ran in, contained source code from a few JDK 1.4 classes, which sounds like what you're referring to.
I've put in a fix for the NPE, and it is available in the latest dev build: BUILD COMPLETE - build.415 Date of build: 06/17/2005 11:47:13 Time to build: 21 minutes 9 seconds Last changed: 06/17/2005 11:30:55 Last log entry: probable fix to bug 100400: NPE when launching But I don't know whether that is fixing the root cause or just a symptom of something else, as I haven't been able to reproduce the failure. So it would be good to hear whether this build fixes things for you, and also can you try reproducing the problem in a simple testcase that you can attach here? I created a test Java project depending on an AJ project, but couldn't get the failure.
I've been able to recreate this NPE under very simple conditions: Ensure that auto building is on and that you're using Incremental building, then: (1) Create an AspectJ plugin project (2) Create a Java plugin project (3) Make the AspectJ plugin have a plugin dependency on the Java plugin (4) add a white space to the plugin class in the Java Plugin (5) Save the class by pressing "Ctrl+S" You will then get a warning in the error log. Expanding the node next to this warning lists the NPE: java.lang.NullPointerException at org.eclipse.ajdt.internal.ui.actions.UICoreOperations.sourceFilesChanged(UICoreOperations.java:58) at org.eclipse.ajdt.core.builder.AJBuilder.build(AJBuilder.java:168) at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:564) at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:615) at org.eclipse.core.runtime.Platform.run(Platform.java:747) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:157) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:249) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:202) at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:229) at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:615) at org.eclipse.core.runtime.Platform.run(Platform.java:747) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:232) at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:268) at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:297) at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:155) at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:212) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:66) It's slightly different in that I was saving rather than running, but we NPE in the same place. (note this is on Eclipse 3.0, in a development environment and with the AJDT code base of friday 17th June)
I can't reproduce the NPE using the above steps with the current build.
I no longer see the problem either.
Closing as fixed