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 218765 - After installation of full IDE, junit is present but not loaded
Summary: After installation of full IDE, junit is present but not loaded
Status: CLOSED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Module System (show other bugs)
Version: 7.3
Hardware: PC Windows 8 x64
: P1 normal (vote)
Assignee: Jiri Rechtacek
URL: http://www.netbeans.org/community/iss...
Keywords:
Depends on: 218827
Blocks:
  Show dependency tree
 
Reported: 2012-09-21 12:49 UTC by ttokoly
Modified: 2014-12-20 05:45 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: A java.lang.InternalError exception has occurred.


Attachments
output log (204 bytes, text/plain)
2012-09-21 13:13 UTC, Jiri Rechtacek
Details
verbose output log (41.04 KB, text/plain)
2012-09-21 13:16 UTC, Jiri Rechtacek
Details
Project with JUnit test and results in text file (1.36 MB, application/octet-stream)
2012-12-11 12:26 UTC, manu-sogeti
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ttokoly 2012-09-21 12:49:32 UTC
1. Install full IDE
2. Check if "Check for updates" checkbox is on
3. After installation is finished, it says that JUnit is installed and all plugins are up to date
(junit is present in IDE instalation folder - Netbeans 7.3 Beta/platform/modules/ext/junit-4.10)
4. Run IDE
5. Create new Java SE project (e.g. AnagramGame)
6. It shows "Resolve problems" dialog asking for JUnit
7. In main menu Tools | Ant Libraries JUnit is not present
8. After rebooting the IDE, it is OK
Comment 1 ttokoly 2012-09-21 12:57:12 UTC
In Java SE distribution is the same problem.
Comment 2 Jiri Rechtacek 2012-09-21 13:12:42 UTC
Jardo, when autoupdate.cli installs JUnit while installation, JUnit is not loaded correctly. It causes JUnit is not cached thus IDE cannot see the JUnit although it's present in the installation.

Simple run this command and check the output (also it's attached there) <netbeans-73beta>/bin/netbeans -J-Dnetbeans.close=true --nosplash -J-Dorg.netbeans.core.WindowSystem.show=false --userdir /tmp/tmpnb --modules --install ".*junit.*" --update-all

Tomas, Marian, are you sure it's a stopper?
Comment 3 Jiri Rechtacek 2012-09-21 13:13:25 UTC
Created attachment 124714 [details]
output log
Comment 4 Jiri Rechtacek 2012-09-21 13:16:17 UTC
Created attachment 124715 [details]
verbose output log
Comment 5 Tomas Danek 2012-09-21 13:44:53 UTC
based on scenario, I tend to say yes, but OTOH last minute fixes in such core parts can bring far more damage then benefits:(
Let's wait for Jarda's evaluation and we'll know more...

> Tomas, Marian, are you sure it's a stopper?
Comment 6 Marian Mirilovic 2012-09-21 14:34:28 UTC
We can rely on reboot as workaround, and use it in replies in case it's mentioned by users, but I would rather like to know how risky is the fix.
Comment 7 Jiri Rechtacek 2012-09-22 16:27:13 UTC
I've integrated a workaround which makes JUnit installation by IDE installer more robust - I think it's a safe and it would be applicable to 73beta branch. Please verify on trunk, first. Thanks
http://hg.netbeans.org/core-main/rev/d843919572f7
I filed the original cause this problem as a issue 218827, it might be solved later after 73beta.
Comment 8 Quality Engineering 2012-09-23 02:12:40 UTC
Integrated into 'main-golden', will be available in build *201209230001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/d843919572f7
User: Jiri Rechtacek <jrechtacek@netbeans.org>
Log: #218765: a workaround - After installation of full IDE, junit is present but not loaded
Comment 9 Marian Mirilovic 2012-09-23 06:59:36 UTC
I tested it in 20120923 and it looks like it's fixed ... so please proceed with integration into release73 branch, thanks in advance.
Comment 10 Jiri Rechtacek 2012-09-23 11:46:21 UTC
(In reply to comment #9)
> I tested it in 20120923 and it looks like it's fixed ... so please proceed with
> integration into release73 branch, thanks in advance.
Integration in release73_beta - http://hg.netbeans.org/releases/rev/b312b6e68523
Comment 11 Tomas Danek 2012-09-24 13:29:18 UTC
verified 

Product Version: NetBeans IDE 7.3 Beta (Build 201209232010)
Java: 1.7.0_07; Java HotSpot(TM) Client VM 23.3-b01
System: Windows 7 version 6.1 running on x86; Cp1252; en_US (nb)
User directory: C:\Users\tester\AppData\Roaming\NetBeans\7.3beta
Cache directory: C:\Users\tester\AppData\Local\NetBeans\Cache\7.3beta
Comment 12 manu-sogeti 2012-12-11 12:26:42 UTC
Created attachment 129201 [details]
Project with JUnit test and results in text file

Hi dear support,

I try my Junit test on Netbeans 7.3 beta but the issue is not resolved.
I attached a new project that contains a new Junit test and the results in
the file TestResults.txt.

The project was be made on netbeans 7.2.1

To RUN the Junit test file BugFileObjectTest.java open the project ProjectBugName
and call the actions "debug file" or "debug test files". With this actions the
test folders under module1 will be found.

With this test you can see that for 2 folders an identical hash code is generated
and when i try to get a child file (with the same name). the method getFileObject()
returns the child file of previous folder !

I saw in netbeans sources that a global map store the FileObjects using like key
the HashCode of files, but this HashCode is not unique.

For my company this issues is critical because if we can't get the good data file, our mathematical 
calculations will be wrong.

Thanks for your help.

manu
Comment 13 manu-sogeti 2012-12-11 12:35:18 UTC
Sorry,

You can ignore my files and comments. 
I made a mistake.
Best regards.