Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 286547

Summary: [JUnit] NPE initializing Java tooling
Product: [Eclipse Project] JDT Reporter: Scott Van Wart <silvaran>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert, Olivier_Thomann
Version: 3.5   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Stack trace on startup. none

Description Scott Van Wart CLA 2009-08-13 12:48:40 EDT
Created attachment 144434 [details]
Stack trace on startup.

Build ID: 20090621-0832

Steps To Reproduce:
1. Start Eclipse
2. Watch the log files for a stack trace

More information:
Sometimes I get notified in the GUI, sometimes I don't.  It always appears in the log now.  Most things still seem to work fine, but I can't publish to the server through webtools so all my web development has pretty much halted until I can reinstall Eclipse, get my preferences set up again, and rebuild the workspace.
Comment 1 Scott Van Wart CLA 2009-08-13 13:32:28 EDT
Seems to be related to the built-in junit support.  I had a simple Java project with no dependencies and no relation to my dynamic web projects.  It had a few Java files in it but that's about it.  I created a new junit test case and let Eclipse add JUnit 4 to the build path.  Everything seemed to work fine, I closed Eclipse and went home.

Opened Eclipse today and got the error about Java tooling, and saw the NPE in the log.  My web projects failed to publish (the tmp0/work/Catalina directory created by webtools didn't have any files in it even though my projects were added to the server and the status in the Servers window said, "Synchronized").

I removed JUnit from the build path and existed Eclipse.  When I started Eclipse, there were no errors, and while my little independent Java project failed to build (no junit.jar on the build path), I was able to properly publish my web projects.

So it seems there may be two bugs in this:
1) JUnit (built-in support) on the build path has caused a Java Tooling startup failure, for whatever reason.
2) Webtools gets completely hosed even though (1) occurred to a project unrelated to any web projects.

Thanks.
Comment 2 Olivier Thomann CLA 2009-08-13 14:47:54 EDT
Move to JDT/UI
Comment 3 Olivier Thomann CLA 2009-08-13 14:51:46 EDT
Moving
Comment 4 Dani Megert CLA 2009-08-14 04:21:24 EDT
We think this got fixed by reworking that code in 3.6 and 3.5.1 (e.g. M20090812-0800) builds. Please give it a try and reopen this bug if the problem persists.

*** This bug has been marked as a duplicate of bug 276111 ***
Comment 5 Scott Van Wart CLA 2009-08-14 11:09:52 EDT
(In reply to comment #4)
> We think this got fixed by reworking that code in 3.6 and 3.5.1 (e.g.
> M20090812-0800) builds. Please give it a try and reopen this bug if the problem
> persists.

Does that include non-shared installations?  My entire eclipse installation is in ~/eclipse, owned by me.  I'll try once 3.5.1 is released, I need this for production and I don't yet see the resemblance between this and 27611 (my stuff compiles just fine, I have no dot-eclipse directory as ~/.eclipse) .  Will update with more info later.

Thanks.
Comment 6 Dani Megert CLA 2009-08-17 04:50:06 EDT
The code got rewritten. As said, please reopen with more detailed steps if you still see this using a newer build.