Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 199207 - JUnit not found when running standalone module
JUnit not found when running standalone module
Status: RESOLVED WORKSFORME
Product: platform
Classification: Unclassified
Component: Autoupdate
7.0.1
PC Windows 7 x64
: P3 (vote)
: TBD
Assigned To: Jaroslav Tulach
au-issues
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-06-06 17:31 UTC by mienamoo
Modified: 2011-06-07 06:32 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mienamoo 2011-06-06 17:31:54 UTC
When running a standalone module, the following error occurs in the build-init target:

C:\Program Files\NetBeans 7.0.1-201106020000\netbeans\harness\build.xml:174: Cannot find module C:\Program Files\NetBeans 7.0.1-201106020000\netbeans\java\modules\org-netbeans-modules-junitlib.jar from C:\Program Files\NetBeans 7.0.1-201106020000\netbeans\java\config\Modules\org-netbeans-modules-junitlib.xml
BUILD FAILED (total time: 0 seconds)

Steps to reproduce:

1. Extract the .zip distro of the IDE.
2. Install JUnit when prompted at first startup.
3. Create a new Standalone Module running on the platform included with the IDE (7.0.1).
4. Run the module.

Some more notes:

- This problem persists after restarting the IDE.
- When running a module that is a part of a suite, this problem is not encountered.
- Changing to the platform included with NB 7.0 resolves the issue.
Comment 1 mienamoo 2011-06-06 17:53:40 UTC
Update: the same error occurs when running module suites based on 7.0.1, but not for NetBeans Platform Applications.
Comment 2 mienamoo 2011-06-06 17:55:52 UTC
(In reply to comment #1)
Ah, jumped to a (wrong) conclusion there. The error occurs for suites that have at least one module. Empty suites run without problems.
Comment 3 Jesse Glick 2011-06-06 19:09:46 UTC
(In reply to comment #0)
> ...\harness\build.xml:174: Cannot find module ...\java\modules\org-netbeans-modules-junitlib.jar from ...\java\config\Modules\org-netbeans-modules-junitlib.xml

This message is printed when the named JAR file does not in fact exist, which it ought to. Sounds like the junitlib NBM was only partly installed? Your log file might provide clues.

> Steps to reproduce:
> 
> 1. Extract the .zip distro of the IDE.
> 2. Install JUnit when prompted at first startup.
> 3. Create a new Standalone Module running on the platform included with the IDE
> (7.0.1).
> 4. Run the module.

I tried this using http://bits.netbeans.org/netbeans/7.0.1/daily/netbeans-7.0.1-201106020000-ml.zip (on Ubuntu) and it worked fine for me.
Comment 4 mienamoo 2011-06-06 19:31:34 UTC
(In reply to comment #3)
There was indeed a problem that was encountered during the installation:

INFO [org.netbeans.updater]: File installed C:\Program Files\NetBeans 7.0.1-201106020000\netbeans\java\update_tracking\org-netbeans-modules-junitlib.xml@0
INFO [org.netbeans.updater]: File installed C:\Program Files\NetBeans 7.0.1-201106020000\netbeans\platform\config\Modules\org-netbeans-libs-junit4.xml@0
INFO [org.netbeans.updater]: File installed C:\Program Files\NetBeans 7.0.1-201106020000\netbeans\platform\modules\org-netbeans-libs-junit4.jar.pack.gz@0
INFO [org.netbeans.updater]: File installed C:\Program Files\NetBeans 7.0.1-201106020000\netbeans\platform\update_tracking\org-netbeans-libs-junit4.xml@0
INFO [org.netbeans.core.startup.NbEvents]: Warning: the module C:\Program Files\NetBeans 7.0.1-201106020000\netbeans\bin\modules\org-netbeans-modules-junitlib.jar could not be found, ignoring...
INFO [org.netbeans.modules.autoupdate.services.InstallSupportImpl]: Timeout waiting for loading module org.netbeans.modules.junitlib@1.0
INFO [org.netbeans.modules.autoupdate.ui.wizards.InstallStep]: timeout of loading JUnit[org.netbeans.modules.junitlib/1.0]
org.netbeans.api.autoupdate.OperationException: timeout of loading JUnit[org.netbeans.modules.junitlib/1.0]
	at org.netbeans.modules.autoupdate.services.InstallSupportImpl$3.call(InstallSupportImpl.java:466)
	at org.netbeans.modules.autoupdate.services.InstallSupportImpl$3.call(InstallSupportImpl.java:318)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
	at java.util.concurrent.FutureTask.run(FutureTask.java:166)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)

Tried it again, and it works for me as well now.
Comment 5 Jesse Glick 2011-06-06 20:27:11 UTC
(In reply to comment #4)
> INFO [org.netbeans.updater]: File installed ...\java\update_tracking\org-netbeans-modules-junitlib.xml@0
> INFO [org.netbeans.updater]: File installed ...\platform\config\Modules\org-netbeans-libs-junit4.xml@0
> INFO [org.netbeans.updater]: File installed ...\platform\modules\org-netbeans-libs-junit4.jar.pack.gz@0
> INFO [org.netbeans.updater]: File installed ...\platform\update_tracking\org-netbeans-libs-junit4.xml@0

Is that all of the "file installed" messages? There should be six. Strange.
Comment 6 mienamoo 2011-06-06 20:36:26 UTC
(In reply to comment #5)
There is one more, just before the part of the log file that I posted earlier:

INFO [org.netbeans.updater]: File installed C:\Program Files\NetBeans 7.0.1-201106020000\netbeans\java\config\Modules\org-netbeans-modules-junitlib.xml@0
INFO [org.netbeans.updater]: Ignore non-readable files 
java.io.IOException: Wrong CRC for C:\Program Files\NetBeans 7.0.1-201106020000\netbeans\java\docs\junit-4.8.2-api.zip
[catch] at org.netbeans.updater.ModuleUpdater.unpack(ModuleUpdater.java:445)
	at org.netbeans.updater.ModuleUpdater.run(ModuleUpdater.java:142)

I searched through the log file - the sixth "File installed" is definitely missing in action.
Comment 7 Jesse Glick 2011-06-06 20:54:18 UTC
(In reply to comment #5)
> There should be six.

In core-main #11f131e5ffbf I will make AU print the other five (*.external) entries, by the way.
Comment 8 Jesse Glick 2011-06-06 20:55:59 UTC
(In reply to comment #6)
> INFO [org.netbeans.updater]: Ignore non-readable files 
> java.io.IOException: Wrong CRC for C:\Program Files\NetBeans
> 7.0.1-201106020000\netbeans\java\docs\junit-4.8.2-api.zip
> [catch] at org.netbeans.updater.ModuleUpdater.unpack(ModuleUpdater.java:445)

Hmm, this is certainly suspicious. If you can, attach the entire log file.
Comment 9 Quality Engineering 2011-06-07 06:32:28 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/
User: 
Log:


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo