This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 196403 - JUnit installs but is not available after shutdown/restart of IDE
Summary: JUnit installs but is not available after shutdown/restart of IDE
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: JUnit (show other bugs)
Version: 7.0
Hardware: PC Linux
: P2 normal (vote)
Assignee: Jiri Rechtacek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-07 16:46 UTC by areeda
Modified: 2011-03-09 05:33 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
2 message.log files one with good install one bad (15.16 KB, application/zip)
2011-03-07 16:46 UTC, areeda
Details

Note You need to log in before you can comment on or make changes to this bug.
Description areeda 2011-03-07 16:46:05 UTC
Created attachment 106790 [details]
2 message.log files one with good install one bad

This is the second time I've had this happen out of many updates.

The scenario is:

    * Update to latest nightly build
    * Open NB with projects using JUnit (modules in class library projects even have unit tests ;-) )
    * Get the "Reference Problem" dialog
    * Click on one of the projects using Junit, resolve reference problem and NB does a great job of downloading libraries
    * A little weird but other projects that use JUnit are still red.  Open resolve conflict dialog and it lists Junit4 and Junit3 but all I can do is close it.  Then it goes away.

The problem happens if I close NetBeans.  Next time I open NetBeans

    * I get the "Reference Problem" dialog.
    * When I right click and select resolve reference problem it says JUnit & Junit4 must be defined but resolve opens the library list, which does not contain JUnit libraries.  However the NetBeans directory already has the jars:

    netbeans-dev-201103060000/platform/modules/ext/junit-4.8.2.jar
    netbeans-dev-201103060000/java/ant/etc/junit-frames.xsl
    netbeans-dev-201103060000/java/ant/etc/junit-frames-xalan1.xsl
    netbeans-dev-201103060000/java/ant/etc/junit-noframes.xsl
    netbeans-dev-201103060000/java/docs/junit-4.8.2-api.zip
    netbeans-dev-201103060000/java/docs/junit-3.8.2-api.zip
    netbeans-dev-201103060000/java/docs/junit-4.8.2-src.jar
    netbeans-dev-201103060000/java/modules/ext/junit-3.8.2.jar
----------
After this install, JUnit was not in library manager or on plugins.

I uninstalled and reinstalled the same nightly build and it seems to work fine.

2 message.log files are attached as one zip file (seems I can only attach one file)
Comment 1 Tomas Danek 2011-03-08 10:44:56 UTC
hello, we integrated change yesterday (see http://netbeans.org/bugzilla/show_bug.cgi?id=195249), which might resolved this problem. Could you please check in today's build? I cannot reproduce your scenario in this build, but I'm on MacOS:

Product Version: NetBeans IDE Dev (Build 201103080000)
Java: 1.6.0_22; Java HotSpot(TM) 64-Bit Server VM 17.1-b03-307
System: Mac OS X version 10.6.6 running on x86_64; MacRoman; en_US (nb)
Userdir: /Users/tomas/.netbeans/dev
Comment 2 Jiri Rechtacek 2011-03-08 11:42:41 UTC
I'm not able to reproduce it too, based on your logs I did a patch for case JUnit already installed but not active - core-main/rev/914b0e0e45fe
Joseph, please verify it with your userdir and with fresh userdir as well. Thank you. For more verbose logging run your IDE with a switch -J-Dorg.netbeans.modules.junit.JUnitLibraryDownloader.level=FINE
Comment 3 areeda 2011-03-08 15:28:53 UTC
Perhaps I wasn't clear about the prevalence of this bug.  It is a rare occurrence for me.  I update nightly builds almost daily (since November 2010) and it's happened twice, both times an uninstall and reinstall fixed it.  It's hard to imagine something that occurs with this frequency and I've only seen it after working all day and shutting down.

That said, I downloaded todays and it worked fine.  It even refreshed all open projects requiring JUnit, thank you!

I will let you know if I see it again.
Comment 4 Quality Engineering 2011-03-09 05:33:17 UTC
Integrated into 'main-golden', will be available in build *201103090000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/914b0e0e45fe
User: Jiri Rechtacek <jrechtacek@netbeans.org>
Log: #196403: JUnit installed but no active