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 235812 - Junit window not showing due to " is not a valid classpath entry; it must end with a slash"
Summary: Junit window not showing due to " is not a valid classpath entry; it must end...
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Classpath (show other bugs)
Version: 7.4
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Tomas Zezula
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-11 11:57 UTC by vidhyadharantechdays
Modified: 2013-09-19 12:57 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
messages.log for analysing (841.96 KB, application/octet-stream)
2013-09-11 11:57 UTC, vidhyadharantechdays
Details
Attach sources dialog should not accept file other then zip files (244.94 KB, image/png)
2013-09-12 11:42 UTC, vidhyadharantechdays
Details
example to reproduce (26.86 KB, application/octet-stream)
2013-09-12 11:59 UTC, vidhyadharantechdays
Details

Note You need to log in before you can comment on or make changes to this bug.
Description vidhyadharantechdays 2013-09-11 11:57:39 UTC
Created attachment 139931 [details]
messages.log for analysing

I have added INMConfiguration.java "C:/work/trunk/configAPI/com/softwareag/centrasite/inmconfiguration/v2/INMConfiguration.java" when i click INMConfiguration class in the java source code . 

Public static void main (String... args){
.
.
.
.
INMConfiguration exp = new INMConfiguration ();

.
.
.
}
It was redirected to INMConfiguration.class file and a button asked to "attach source" i choose attach source then i navigate to C:/work/trunk/configAPI/com/softwareag/centrasite/inmconfiguration/v2/INMConfiguration.java instead of path. IDE haven't prompt any error or warning message.

After that whatever window or module access class path . I got this serious bug

I found this bug while running Junit Tests , however test was executing background, the Test Results window was remains empty.

Please fix this issue as soon as possible. 

Note : due to this issue i am moving from netbeans to eclipse for testing my enterprise product.
Comment 1 Jiri Kovalsky 2013-09-11 13:54:19 UTC
Reassigning.
Comment 2 Jiri Rechtacek 2013-09-12 08:02:55 UTC
(In reply to vidhyadharantechdays from comment #0)
> Created attachment 139931 [details]
> messages.log for analysing
It's NB74 Beta - could you reproduce it with latest Dev builds of NetBeans? bits.netbeans.org/download/trunk/nightly/latest

> I have added INMConfiguration.java
> "C:/work/trunk/configAPI/com/softwareag/centrasite/inmconfiguration/v2/
> INMConfiguration.java" when i click INMConfiguration class in the java
> source code . 
> 
> Public static void main (String... args){
> .
> .
> .
> .
> INMConfiguration exp = new INMConfiguration ();
> 
> .
> .
> .
> }
> It was redirected to INMConfiguration.class file and a button asked to
> "attach source" i choose attach source then i navigate to
> C:/work/trunk/configAPI/com/softwareag/centrasite/inmconfiguration/v2/
> INMConfiguration.java instead of path. IDE haven't prompt any error or
> warning message.
> 
> After that whatever window or module access class path . I got this serious
> bug
> 
> I found this bug while running Junit Tests , however test was executing
> background, the Test Results window was remains empty.

Can you describe the problem step-by-step?

> Please fix this issue as soon as possible. 
> 
> Note : due to this issue i am moving from netbeans to eclipse for testing my
> enterprise product.
Bad choice, anyway.
Comment 3 vidhyadharantechdays 2013-09-12 10:31:50 UTC
Due to this i am getting following exception

java.lang.IllegalArgumentException: Invalid ClassPath root: file:/C:/work/trunk/configAPI/com/softwareag/centrasite/inmconfiguration/v2/INMConfiguration.java/. The root must be a folder.(exists: true file: true directory: false read: true write: true root: null _root: C:\work\trunk\configAPI\com\softwareag\centrasite\inmconfiguration\v2\INMConfiguration.java@59ed71c5:73bdcd23)
	at org.netbeans.api.java.classpath.ClassPath$Entry.getRoot(ClassPath.java:816)
	at org.netbeans.api.java.classpath.ClassPath.createRoots(ClassPath.java:284)
	at org.netbeans.api.java.classpath.ClassPath.getRoots(ClassPath.java:268)
	at org.netbeans.api.java.classpath.ClassPath.findOwnerRoot(ClassPath.java:531)
	at org.netbeans.modules.java.j2seplatform.libraries.J2SELibrarySourceLevelQueryImpl.getSourceLevel(J2SELibrarySourceLevelQueryImpl.java:109)
	at org.netbeans.api.java.queries.SourceLevelQuery.getSourceLevel(SourceLevelQuery.java:122)
	at org.netbeans.api.java.queries.SourceLevelQuery$Result.getSourceLevel(SourceLevelQuery.java:320)
	at org.netbeans.modules.java.source.parsing.JavacParser.createJavacTask(JavacParser.java:736)
	at org.netbeans.modules.java.source.parsing.CompilationInfoImpl.getJavacTask(CompilationInfoImpl.java:398)
	at org.netbeans.modules.java.source.parsing.JavacParser.getResult(JavacParser.java:516)
	at org.netbeans.modules.java.source.parsing.JavacParser.getResult(JavacParser.java:174)
	at org.netbeans.modules.parsing.impl.TaskProcessor.callGetResult(TaskProcessor.java:615)
	at org.netbeans.modules.parsing.impl.SourceCache.getResult(SourceCache.java:247)
[catch] at org.netbeans.modules.parsing.impl.TaskProcessor$CompilationJob.run(TaskProcessor.java:727)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
	at java.util.concurrent.FutureTask.run(FutureTask.java:166)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1432)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2042)
Comment 4 vidhyadharantechdays 2013-09-12 11:40:40 UTC
Hi 

i have verified in development version. The issue has been resolved. 

however if i give source file instead of zip or jar or directory. IDE should not accept. It should throw valid  exception 
Please find the attach screen shot
Comment 5 vidhyadharantechdays 2013-09-12 11:42:36 UTC
Created attachment 139978 [details]
Attach sources dialog should not accept file other then zip files
Comment 6 vidhyadharantechdays 2013-09-12 11:58:09 UTC

kindly find the attached sample JavaApplication1.zip, javalibrary1.zip
---------------------------------------
Setup the javalibrary1.zip
1. Build and generate the jar file. copy the jar file to another directory for ex(c:/javalibrary1.jar)
2. close the javalibrary1 project from netbeans
3.Setup javaApplication1.zip, and attach the dependency ie. c:/javalibrary1.jar

Now open the TestReporduceBugImpl from source code via ctrl+click.
You will be navigated to "generated source file" click attach source button. 
please refer https://bugzilla-attachments-235812.netbeans.org/bugzilla/attachment.cgi?id=139978
Comment 7 vidhyadharantechdays 2013-09-12 11:59:58 UTC
Created attachment 139981 [details]
example to reproduce
Comment 8 Tomas Zezula 2013-09-17 14:29:45 UTC
Fixed jet-main 62a982a67bc1
Comment 9 Tomas Zezula 2013-09-17 14:31:11 UTC
The IDE now filters out all non valid (non jar, non folders) files got from JFileChooser.
Comment 10 Quality Engineering 2013-09-19 12:57:48 UTC
Integrated into 'main-silver', will be available in build *201309191137* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/62a982a67bc1
User: Tomas Zezula <tzezula@netbeans.org>
Log: #235812:Junit window not showing due to " is not a valid classpath entry; it must end with a slash"