Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 286547 - [JUnit] NPE initializing Java tooling
Summary: [JUnit] NPE initializing Java tooling
Status: RESOLVED DUPLICATE of bug 276111
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.5   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-13 12:48 EDT by Scott Van Wart CLA
Modified: 2009-08-17 04:50 EDT (History)
2 users (show)

See Also:


Attachments
Stack trace on startup. (3.65 KB, text/plain)
2009-08-13 12:48 EDT, Scott Van Wart CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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.