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 194653 - Disabling remote Javadoc inside JavadocHelper.getJavadoc
Summary: Disabling remote Javadoc inside JavadocHelper.getJavadoc
Alias: None
Product: java
Classification: Unclassified
Component: Source (show other bugs)
Version: 7.0
Hardware: PC Mac OS X
: P2 normal (vote)
Assignee: Jan Lahoda
: 194017 196788 (view as bug list)
Depends on:
Blocks: 41443
  Show dependency tree
Reported: 2011-01-24 12:47 UTC by Kenneth Ganfield
Modified: 2012-04-10 18:45 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:

messages.log (63.70 KB, application/octet-stream)
2011-01-24 13:02 UTC, Kenneth Ganfield
profiler snapshot when lenght operation dialog appears (20.06 KB, application/octet-stream)
2011-03-04 16:04 UTC, Kenneth Ganfield

Note You need to log in before you can comment on or make changes to this bug.
Description Kenneth Ganfield 2011-01-24 12:47:11 UTC
Product Version: NetBeans IDE Dev (Build 201101200001)
Java: 1.6.0_22; Java HotSpot(TM) 64-Bit Server VM 17.1-b03-307
System: Mac OS X version 10.5.8 running on x86_64; MacRoman; en_US (nb)
Userdir: /Applications/NetBeans/userdirs/7.0-20110120

This dialog appears very often when trying to use the hints, insert code and fix imports dialogs. For example on a very simple session bean with 1 method.

The IDE log displays the following output:

WARNING [org.netbeans.modules.progress.ui.RunOffEDTImpl]: Lengthy operation: org.netbeans.modules.editor.codegen.NbGenerateCodeAction$1:63,858:5:17,576:12771.60
WARNING [org.netbeans.modules.progress.ui.RunOffEDTImpl]: Lengthy operation: org.netbeans.modules.editor.codegen.NbGenerateCodeAction$1:75,126:6:17,576:12521.00
WARNING [org.netbeans.modules.progress.ui.RunOffEDTImpl]: Lengthy operation: org.netbeans.modules.editor.codegen.NbGenerateCodeAction$1:86,556:7:17,576:12365.14
WARNING [org.netbeans.modules.parsing.impl.TaskProcessor]: ParserManager.parse called in AWT event thread by: org.netbeans.modules.web.project.WebEMGenStrategyResolver.isInjectionTarget(
WARNING [org.netbeans.modules.parsing.impl.TaskProcessor]: ParserManager.parse called in AWT event thread by: org.netbeans.modules.web.beans.impl.model.WebBeansModelImplementation.runReadAction(
WARNING [org.netbeans.modules.parsing.impl.TaskProcessor]: ParserManager.parse called in AWT event thread by: org.netbeans.modules.j2ee.dd.impl.ejb.annotation.EjbJarMetadataModelImpl.runReadAction(
WARNING [org.netbeans.modules.parsing.impl.TaskProcessor]: ParserManager.parse called in AWT event thread by: org.netbeans.modules.j2ee.persistence.action.EntityManagerGenerator.generate(
Adding a fold that is identical with another previously added fold from the same FoldManager is not allowed.
Existing fold: [code-block] E1 <544,579>, desc='{...}', hash=0x1c7c0115, [545, 578] {545, 578}; FoldManager:
     New fold: [code-block] E1 <544,579>, desc='{...}', hash=0x49786c8a, [545, 578] {545, 578}; FoldManager:
WARNING [org.netbeans.modules.progress.ui.RunOffEDTImpl]: Lengthy operation:$2:78,930:3:53,533:26310.00
WARNING [org.netbeans.modules.progress.ui.RunOffEDTImpl]: Lengthy operation:$2:90,636:4:53,533:22659.00
Comment 1 Kenneth Ganfield 2011-01-24 13:02:52 UTC
Created attachment 105301 [details]

attaching messages log file
Comment 2 Kenneth Ganfield 2011-02-22 13:13:30 UTC
bumping priority up to p2 because this really makes a lot of functionality such as hints and fix imports unusable for me. The workaround seems to be to type or paste some code, then wait 5 or 10 minutes, then fix imports, which is extremely inconvenient
Comment 3 Jan Lahoda 2011-02-22 17:44:42 UTC
I rarely see the dialog (normally only in case the IDE is swapped off, or is scanning is running). Could you please generate some profile me snapshots so that we can see what is taking the time? Thanks.
Comment 4 Kenneth Ganfield 2011-03-04 16:04:28 UTC
Created attachment 106718 [details]
profiler snapshot when lenght operation dialog appears

adding profiler snapshot
Comment 5 Jan Lahoda 2011-03-08 13:35:27 UTC
Thanks for the snapshot. The problem is quite clear now: the TreeLoader tries to load javadoc for a class using JavadocHelper.getJavadoc(Element). This method itself may still do a network connection. If this network connection fails after a significant amount of time, which is what seems to happen in Ken's case, the JavadocHelper will try this connection each time again, each time taking the time to fail. I personally do not see a different solution than to allow disabling of the remote Javadoc on JavadocHelper.getJavadoc level:
Comment 6 Jesse Glick 2011-03-08 14:51:27 UTC
Tomas worked on this most recently I think. Fix seems reasonable; remote Javadoc is intended for viewing but should not be used for obtaining method parameter names and the like (unless perhaps a cache is implemented).

Better would be if -g:vars were used when compiling important APIs, I guess. Can java.source retrieve param names from bytecode where present?
Comment 7 Tomas Zezula 2011-03-08 14:58:05 UTC
I was fixing the code completion. This problem is a bit different, the http request is done from TreeLoader before the tree loader gets the TextStream to be able to check if it's remote.
Comment 8 Quality Engineering 2011-03-09 05:34:27 UTC
Integrated into 'main-golden', will be available in build *201103090000* on (upload may still be in progress)
User: Jan Lahoda <>
Log: #194653: really disabling remote javadoc in TreeLoader.
Comment 9 Dusan Balek 2011-03-17 12:37:15 UTC
*** Bug 196788 has been marked as a duplicate of this bug. ***
Comment 10 vieiro 2011-03-17 12:53:03 UTC
I'm afraid I'm still seeing this in 

Product Version: NetBeans Platform Dev (Build 201103120400)
Java: 1.6.0_24; Java HotSpot(TM) 64-Bit Server VM 19.1-b02-334
System: Mac OS X version 10.6.6 running on x86_64; MacRoman; es_ES (test)
Userdir: /Users/antonio/.netbeans/dev

A stack trace available at
Comment 12 Jesse Glick 2012-04-10 18:45:08 UTC
*** Bug 194017 has been marked as a duplicate of this bug. ***