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 206923 - Cannot open library source code
Summary: Cannot open library source code
Status: RESOLVED DUPLICATE of bug 206860
Alias: None
Product: java
Classification: Unclassified
Component: Source (show other bugs)
Version: 7.2
Hardware: PC Windows 7
: P2 normal (vote)
Assignee: Jan Lahoda
URL:
Keywords: REGRESSION
Depends on:
Blocks:
 
Reported: 2012-01-04 19:48 UTC by _ gtzabari
Modified: 2012-01-23 19:29 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
messages.log when "-J-Dorg.netbeans.api.java.queries.SourceForBinaryQuery.level=0" was disabled (150.88 KB, application/octet-stream)
2012-01-07 18:42 UTC, _ gtzabari
Details
messages.log when "-J-Dorg.netbeans.api.java.queries.SourceForBinaryQuery.level=0" was enabled (after a restart) (267.56 KB, text/plain)
2012-01-07 18:43 UTC, _ gtzabari
Details
messages.log when unable to open IOException (566.60 KB, text/plain)
2012-01-22 23:04 UTC, _ gtzabari
Details

Note You need to log in before you can comment on or make changes to this bug.
Description _ gtzabari 2012-01-04 19:48:15 UTC
Product Version: NetBeans IDE Dev (Build 201201020601)
Java: 1.7.0_02; Java HotSpot(TM) 64-Bit Server VM 22.0-b10
System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)
User directory: C:\Users\Gili\.netbeans\dev
Cache directory: C:\Users\Gili\.netbeans\dev\var\cache

In the past I used to be able to open the source-code for JDK classes (and project libraries). Now when I look up say ThreadLocal I get a disassembler view of the class file instead of the source-code.

This might be related to bug 206627.
Comment 1 Jan Lahoda 2012-01-04 22:20:11 UTC
Could you please run the IDE with this command line option:
-J-Dorg.netbeans.api.java.queries.SourceForBinaryQuery.level=0

and attach the resulting messages.log? It should print the results of mapping the binary jars to source locations.

Thanks.
Comment 2 _ gtzabari 2012-01-06 15:40:59 UTC
I can no longer reproduce the problem as dev build 201201050601.
Comment 3 _ gtzabari 2012-01-07 18:41:15 UTC
I've run across this problem again in:

Product Version: NetBeans IDE Dev (Build 201201050601)
Java: 1.7.0_02; Java HotSpot(TM) 64-Bit Server VM 22.0-b10
System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)
User directory: C:\Users\Gili\.netbeans\dev
Cache directory: C:\Users\Gili\.netbeans\dev\var\cache

I was using Netbeans for a while. Then I tried opening "FileSystemProvider" and got the class file instead. I exiting the IDE, added "-J-Dorg.netbeans.api.java.queries.SourceForBinaryQuery.level=0" and restarted. FileSystemProvider opened in the editor (still the class file). I closed the file in the editor and reopened it. This time, the source-code opened properly.

I'm going to attach messages.log but I suspect it doesn't contain the information you're looking for because I enabled "-J-Dorg.netbeans.api.java.queries.SourceForBinaryQuery.level=0" too late. I'll leave the flag enabled this time and hopefully I'll reproduce the problem again in the future.
Comment 4 _ gtzabari 2012-01-07 18:42:51 UTC
Created attachment 114707 [details]
messages.log when "-J-Dorg.netbeans.api.java.queries.SourceForBinaryQuery.level=0" was disabled
Comment 5 _ gtzabari 2012-01-07 18:43:16 UTC
Created attachment 114708 [details]
messages.log when "-J-Dorg.netbeans.api.java.queries.SourceForBinaryQuery.level=0" was enabled (after a restart)
Comment 6 _ gtzabari 2012-01-22 23:04:28 UTC
Created attachment 115151 [details]
messages.log when unable to open IOException

Here you go. This messages.log shows that Netbeans was unable to resolve the source-code for IOException. It was reproduced with "-J-Dorg.netbeans.api.java.queries.SourceForBinaryQuery.level=0" enabled so you should have everything you asked for in this file.
Comment 7 Jan Lahoda 2012-01-23 19:29:51 UTC
Thanks. From the log, it is obvious that the SourceForBinaryQuery returns an empty result for the platform jar, and that the correct provider (org.netbeans.modules.java.platform.queries.PlatformSourceForBinaryQuery) is used. Seems like a very probable duplicate of bug #206860. I am afraid that there may be more questions/required information to fix the bug, though.

*** This bug has been marked as a duplicate of bug 206860 ***