Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 127368 - IllegalArgumentException: view is invalid
IllegalArgumentException: view is invalid
Status: RESOLVED FIXED
Product: platform
Classification: Unclassified
Component: Help System
6.x
All All
: P2 (vote)
: 7.1
Assigned To: Jaroslav Havlin
issues@platform
http://statistics.netbeans.org/except...
EXCEPTIONS_REPORT
: REGRESSION, TEST
: 155325 187702 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-02-14 10:29 UTC by Jindrich Sedek
Modified: 2012-09-13 11:28 UTC (History)
13 users (show)

See Also:
Issue Type: DEFECT
:


Attachments
stacktrace (3.33 KB, text/plain)
2008-02-14 10:29 UTC, Jindrich Sedek
Details
stacktrace (2.00 KB, text/plain)
2010-12-27 12:42 UTC, Jan Becicka
Details
stacktrace (2.66 KB, text/plain)
2011-01-07 10:13 UTC, Petr Jiricka
Details
stacktrace (3.77 KB, text/plain)
2011-01-10 22:02 UTC, Vince Kraemer
Details
stacktrace (2.00 KB, text/plain)
2011-01-18 13:48 UTC, Alexander Simon
Details
stacktrace (3.21 KB, text/plain)
2011-02-02 12:58 UTC, Tomas Stupka
Details
stacktrace (2.00 KB, text/plain)
2011-05-06 14:45 UTC, Jan Becicka
Details
stacktrace (4.12 KB, text/plain)
2011-05-09 08:54 UTC, Jiri Skrivanek
Details
Correct jar from daily build. (462.69 KB, application/java-archive)
2011-05-12 11:06 UTC, Jiri Skrivanek
Details
Incorrect jar from bertram. (403.85 KB, application/java-archive)
2011-05-12 11:07 UTC, Jiri Skrivanek
Details
stacktrace (3.69 KB, text/plain)
2011-07-28 10:35 UTC, Petr Jiricka
Details
Ant build error - stacktrace (4.19 KB, text/plain)
2011-09-29 10:22 UTC, Jaroslav Havlin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jindrich Sedek 2008-02-14 10:29:46 UTC
Build: NetBeans IDE Dev (Build 080214)
VM: Java HotSpot(TM) Client VM, 1.6.0_10-ea-b07
OS: SunOS, 5.11, x86

User Comments: 
try to open help using F1 or using menu Help / Contents
Comment 1 Jindrich Sedek 2008-02-14 10:29:53 UTC
Created attachment 56664 [details]
stacktrace
Comment 2 mslama 2008-02-26 16:45:28 UTC
JavaHelp issue. I filed issue https://javahelp.dev.java.net/issues/show_bug.cgi?id=22 against JavaHelp. Closing here as
we cannot fix it. Hiding exception is probably not good solution as Help window creation fails so pressing F1 or
selecting Help -> Contents (or any other Help menu item) will fail in sich case.
Comment 3 Jindrich Sedek 2008-03-03 16:30:38 UTC
verified.
NetBeans IDE 6.1 Beta (Build 200803031027)
Comment 4 Exceptions Reporter 2008-05-27 06:15:04 UTC
This issue has already 50 duplicates 
Comment 5 Exceptions Reporter 2008-06-21 09:17:06 UTC
This issue has already 100 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=3169
Comment 6 vieiro 2008-12-13 09:04:04 UTC
It seems this is related to a MissingResourceException, somewhere inside NetBeans

Please see http://article.gmane.org/gmane.comp.java.netbeans.modules.openide.devel/36588

I'm reopening it, requesting for an evaluation.

Thanks,
Antonio
Comment 7 mslama 2008-12-13 12:28:20 UTC
We have xml logs from exception reporter but I do not see MissingResourceException there. So your link showing MRE seems
just coincidence. It looks like some race condition in JavaHelp to me. If you have any sample module or any way how to
reproduce this and show that original cause is MRE please send it to me. Without that I am not able to do anything.
Comment 8 kaa 2008-12-17 21:05:41 UTC
Product Version: NetBeans IDE Dev (Build 200812170242)
Java: 1.6.0_06; Java HotSpot(TM) Client VM 10.0-b22
System: Windows XP version 5.1 running on x86; MS932; ja_JP (nb)
Userdir: U:\tmp\M1_002

I can't reproduce the issue, probably it depends on jdk version.
I was able to use F1, Help->Help Contents, Help button from dialogs.
Help window was opened properly.
Comment 9 Alexei Mokeev 2008-12-18 10:51:36 UTC
So far this issue looks dependent on JH #22. Will see what's possible to do for 7.0.
Comment 10 Oleg Barbashov 2008-12-19 13:30:43 UTC
*** Issue 155325 has been marked as a duplicate of this issue. ***
Comment 11 Oleg Barbashov 2008-12-19 15:40:19 UTC
Can't reproduce. Need additional data: ideally the copy of NB & user dir, as minimum all jar's that contains *.hs files
and full description of build (date, origin, type, etc.).
Comment 12 Oleg Barbashov 2008-12-19 17:48:25 UTC
Can't reproduce. Need additional data: ideally the copy of NB & user dir, as minimum all jar's that contains *.hs files
and full description of build (date, origin, type, etc.).
Comment 13 Oleg Barbashov 2009-01-11 11:51:41 UTC
The most probable reason of this bug are broken modules obtained from update center. Currently the Jindent module
provoke this error.
Comment 14 Alexei Mokeev 2009-01-11 14:08:56 UTC
Yes, looks like in some cases this issue is caused by plugins from UC.
(http://www.netbeans.org/issues/show_bug.cgi?id=155556)

Can we workaround, so a plug-in problem would not be an IDE problem ? Or improve diagnostics at least.
Comment 15 Oleg Barbashov 2009-01-11 14:59:20 UTC
Technically - yes. But is it correct from methodic point of view? In case we have incorrectly built module I think it
would be better to elimanate a problem with module rather than hide exception. 
Comment 16 Oleg Barbashov 2009-01-11 15:02:53 UTC
Diagnostic message had recently been improved to show help set caused the problem.
Comment 17 Alexei Mokeev 2009-01-11 15:13:23 UTC
It's not about hiding the exception but about showing Help. 
Two statements are here:
- Keep IDE in a good shape even if some plugin has a problem with HelpSet
- Provide diagnostic message about a problem in certain plugin.

Good to see that 2nd is done. Is 1st technically doable w/o JH modifications ?
Comment 18 Oleg Barbashov 2009-01-11 17:18:07 UTC
I don't exprect problems with changing exception to message and isolating bad helpset. Involved code is already
subclassed. Just not sure that such failure-resistance is really nedeed. 
Comment 19 Alexei Mokeev 2009-01-12 07:19:31 UTC
This exception was reported more than 260 times since 6.0 so failure resistance is highly appreciated. 
Comment 20 Alexei Mokeev 2009-03-05 13:57:40 UTC
Moving JH issues to Victor.
Comment 21 Marian Mirilovic 2009-04-15 08:21:51 UTC
definitely not INCOMPLETE ... 

owner, if you improved message it should be enough for now (I would say) ... so close as FIXED ... we'll wait for new
exception and report all those excs to particular modules.
Comment 22 Alexei Mokeev 2009-04-15 10:34:13 UTC
The latest build when this exception is reproduced is 081110. 
Comment 23 Victor Vasilyev 2009-04-15 11:15:38 UTC
This issue claims that the IAE has occurred on the Solaris platform.
The attached stack trace shows that the JavaHelp implementation can't load SearchEngine via the reflection mechanism in
the method 
private SearchEngine makeEngine(NavigatorView view) of the javax.help.search.MergingSearchEngine class
Please note, in our case there are guaranties that non-null argument "view" is specified when the method is invoked.

All points mentioned above give me an idea that a cause of this issue is the same as for the Issue #159586 , but it has
been fixed.
Comment 24 Alexei Mokeev 2009-04-15 11:22:39 UTC
AFAIK the original problem was that in very different cases the very same exception was thrown. Now we should be able to
deal with each on case by case basis.
Comment 25 Alexei Mokeev 2009-04-15 13:06:34 UTC
FYI:
http://hg.netbeans.org/main/rev/41f1fb3d4a99
Comment 26 Jindrich Sedek 2009-04-17 12:02:54 UTC
v.
Comment 27 Jesse Glick 2010-01-11 18:07:01 UTC
Applied upstream as rev 76.
Comment 28 Tomas Stupka 2010-11-26 10:44:18 UTC
3 new duplicates in dev builds
Comment 29 Antonin Nebuzelsky 2010-12-21 21:16:11 UTC
*** Bug 187702 has been marked as a duplicate of this bug. ***
Comment 30 Jan Becicka 2010-12-27 12:42:45 UTC
Created attachment 104522 [details]
stacktrace
Comment 31 Petr Jiricka 2011-01-07 10:13:51 UTC
Created attachment 104781 [details]
stacktrace

Opened help.
Comment 32 Vince Kraemer 2011-01-10 22:02:14 UTC
Created attachment 104857 [details]
stacktrace

hit the help button on the plugins window.

The current selection was 'Java Web and EE' in the Installed tab
Comment 33 Alexander Simon 2011-01-18 13:48:24 UTC
Created attachment 105093 [details]
stacktrace
Comment 34 Tomas Stupka 2011-02-02 12:58:57 UTC
Created attachment 105595 [details]
stacktrace
Comment 35 Antonin Nebuzelsky 2011-03-15 18:43:56 UTC
Just a few reports recently, decreasing priority. Not a P2.
Comment 36 Jan Becicka 2011-05-06 14:45:22 UTC
Created attachment 108152 [details]
stacktrace
Comment 37 Jan Becicka 2011-05-06 14:50:19 UTC
I cannot avoid this exception. Quick search is unusable.
Comment 38 Jiri Skrivanek 2011-05-09 08:54:28 UTC
Created attachment 108189 [details]
stacktrace

To reproduce:
- unzip IDE from http://bertram.netbeans.org/hudson/job/jet-main/3979/artifact/nbbuild/NetBeans-dev-jet-main-3979-on-20110508-full.zip
- disable ergonomics cluster in etc/netbeans.clusters
- run IDE
- call "Help|Help Contents" from main menu and exception is thrown
Comment 39 Jesse Glick 2011-05-10 19:45:28 UTC
Working fine for me in a fresh dev build from core-main (cluster.config=full, ergonomics cluster deleted) on Ubuntu / JDK 6u24.
Comment 40 Jiri Skrivanek 2011-05-12 08:56:34 UTC
It fails for me just with builds from bertram.netbeans.org. Lastly I tried  jet-main-3998-on-20110512. I don't know what is different on these builds.
Comment 41 Jiri Skrivanek 2011-05-12 11:06:57 UTC
Created attachment 108244 [details]
Correct jar from daily build.

The case I am able to reproduce is caused by corrupted/missing content in org/netbeans/modules/apisupport/project/docs/JavaHelpSearch in org-netbeans-modules-apisupport-kit.jar. I see another difference in manifest.mf but I don't know if this is the reason.

- bertram manifest
Ant-Version: Apache Ant 1.7.1
Created-By: 11.0-b12 (Sun Microsystems Inc.)

- daily manifest
Ant-Version: Apache Ant 1.8.0
Created-By: 1.6.0_18-b07 (Sun Microsystems Inc.)
Comment 42 Jiri Skrivanek 2011-05-12 11:07:44 UTC
Created attachment 108245 [details]
Incorrect jar from bertram.
Comment 43 Antonin Nebuzelsky 2011-05-19 12:26:46 UTC
> jbecicka: I cannot avoid this exception. Quick search is unusable.

> jskrivanek: Working fine for me in a fresh dev build. The case I am able to reproduce is caused by corrupted/missing content in org/netbeans/modules/apisupport/project/docs/JavaHelpSearch in org-netbeans-modules-apisupport-kit.jar.

+ only three reports from users in the exception report list in the last three months

-> P3
Comment 44 Jesse Glick 2011-05-24 19:43:56 UTC
(In reply to comment #41)
> The case I am able to reproduce is caused by corrupted/missing content in
> org/netbeans/modules/apisupport/project/docs/JavaHelpSearch in
> org-netbeans-modules-apisupport-kit.jar.

Indeed, the JAR is corrupt. Also broken in apisupport.kit/build/classes/, so the problem is in indexing, not creating the JAR.

> I see another difference in
> manifest.mf but I don't know if this is the reason.
> 
> - bertram manifest
> Ant-Version: Apache Ant 1.7.1
> Created-By: 11.0-b12 (Sun Microsystems Inc.)
> 
> - daily manifest
> Ant-Version: Apache Ant 1.8.0
> Created-By: 1.6.0_18-b07 (Sun Microsystems Inc.)

Well I tried building this module locally using Ant 1.7.1 and it looked OK to me. Same when building using JDK 6u10.

Also looks broken on web-main-test-dist, built on bertram master; and main-silver-test-dist, built on beefy. Looks OK on NB-Core-Build, on deadlock master, and nbms-and-javadoc, on a slave.

Maybe a Solaris-specific problem? But then I would expect every production build to be broken.

Console log shows tons of exceptions such as:

Note: Indexing 11 HTML files in .../maven/src/org/netbeans/modules/maven/docs into org/netbeans/modules/maven/docs/JavaHelpSearch/
java.lang.Exception: ConfigFile and/or IndexBuilder not set
	at com.sun.java.help.search.DefaultIndexerKit.storeToken(DefaultIndexerKit.java:145)
	at com.sun.java.help.search.DefaultIndexerKit.parseIntoTokens(DefaultIndexerKit.java:106)
	at com.sun.java.help.search.HTMLIndexerKit$HTMLParserCallback.addContent(HTMLIndexerKit.java:1056)
	at com.sun.java.help.search.HTMLIndexerKit$HTMLParserCallback.addContent(HTMLIndexerKit.java:1028)
	at com.sun.java.help.search.HTMLIndexerKit$HTMLParserCallback.handleText(HTMLIndexerKit.java:400)
	at javax.swing.text.html.parser.DocumentParser.handleText(DocumentParser.java:241)
	at javax.swing.text.html.parser.Parser.handleText(Parser.java:345)
	at javax.swing.text.html.parser.Parser.endTag(Parser.java:427)
	at javax.swing.text.html.parser.Parser.parseTag(Parser.java:1807)
	at javax.swing.text.html.parser.Parser.parseContent(Parser.java:2044)
	at javax.swing.text.html.parser.Parser.parse(Parser.java:2211)
	at javax.swing.text.html.parser.DocumentParser.parse(DocumentParser.java:105)
	at javax.swing.text.html.parser.ParserDelegator.parse(ParserDelegator.java:73)
	at com.sun.java.help.search.HTMLIndexerKit.parse(HTMLIndexerKit.java:105)
	at com.sun.java.help.search.Indexer.parseFile(Indexer.java:248)
	at com.sun.java.help.search.Indexer.parseFile(Indexer.java:260)
	at com.sun.java.help.search.Indexer.compile(Indexer.java:208)
	at com.sun.java.help.search.Indexer.main(Indexer.java:76)
	at org.netbeans.modules.javahelp.HelpSetRegistrationProcessor.handleProcess(HelpSetRegistrationProcessor.java:169)

Treating this as a P2 - build products from bertram are broken.
Comment 45 Jesse Glick 2011-05-24 20:37:53 UTC
(In reply to comment #44)
>     at com.sun.java.help.search.DefaultIndexerKit.storeToken(DefaultIndexerKit.java:145)

This line number does not correspond to JH 2.0_05. It seems that JDKs on bertram have some obsolete version of JH in their classpath?
Comment 46 Jesse Glick 2011-05-24 21:19:56 UTC
On http://bertram.netbeans.org/hudson/script entering

println(new ProcessBuilder(['sh', '-c', '/space/soft/jdk1.6.0_10/bin/jrunscript -e "println(new com.sun.java.help.search.Indexer().getClass().protectionDomain.codeSource.location)"']).start().text)

points to the culprit:

file:/usr/jdk/packages/javax.help-2.0/lib/jhall.jar

This seems to be 2.0_03, despite the file name.

I am still not sure how this gets into the default Java classpath, but it must be removed.
Comment 47 Jesse Glick 2011-05-24 21:24:15 UTC
I downloaded that copy of jhall.jar and tried

ANT_OPTS=-Xbootclasspath/a:/tmp/jhall.jar ant -f apisupport.kit/build.xml clean netbeans

which I can confirm loaded Indexer.class from the mentioned JAR, but the resulting JavaHelpSearch dir looked fine. So I am not sure how to reproduce this problem locally.
Comment 48 pgebauer 2011-06-06 09:48:28 UTC
I have understood from comments above that this is not the production bits issue. If so, I would say this is not P2.

I have no access to bertram machine itself. Will try to find out somebody who can update JH there.
Comment 49 Jesse Glick 2011-06-06 17:24:48 UTC
(In reply to comment #48)
> this is not the production bits issue.

Correct.

> If so, I would say this is not P2.

I am not sure. It is a serious error thrown when the IDE is built in certain environments, with no warning or explanation.

(As mentioned in comment #47, I do not know how to reproduce on my own computer. If I did, I would just make the build fail in this circumstance.)
Comment 50 Jan Becicka 2011-06-30 14:42:05 UTC
>I would say this is not P2.
This is P2 according bug priority guidelines:

* Affects another developer's progress
Affects my progress. I'm trying to fix issues in quick search and I'm always getting this exception.  

* The issue has more then 20 exception reports or more then 10 duplicates + votes
This issue has 292 reports.
Comment 51 Jiri Rechtacek 2011-07-01 08:00:39 UTC
It doesn't affect end-users of IDE thus doesn't sense to fix it in NB701.
Comment 52 Petr Jiricka 2011-07-28 10:35:18 UTC
Created attachment 109663 [details]
stacktrace

Pressed F1
Comment 53 Jaroslav Havlin 2011-09-29 10:22:06 UTC
Created attachment 111303 [details]
Ant build error - stacktrace

I have just seen this error when building a module on Mac:

Note: Indexing 21 HTML files in /data/work/src/netbeans-cm/db/src/org/netbeans/modules/db/docs into org/netbeans/modules/db/docs/JavaHelpSearch/
java.io.FileNotFoundException: /var/folders/ h/ hnakHZqE10Cpgs4i0FeHk   TI/-Tmp-/jhindexer-out241111078710371151/TMAP (No such file or directory)
    at java.io.RandomAccessFile.open(Native Method)
    at java.io.RandomAccessFile.<init>(RandomAccessFile.java:216)
    at java.io.RandomAccessFile.<init>(RandomAccessFile.java:101)
    at com.sun.java.help.search.RAFFile.<init>(RAFFile.java:63)
Comment 54 Jesse Glick 2011-10-26 13:43:32 UTC
(In reply to comment #38)
> To reproduce:

jhavlin says this now works (with NetBeans-dev-jet-main-4920-on-20111026-full.zip).

(In reply to comment #44)
> Also broken in apisupport.kit/build/classes/

No longer broken in the Hudson workspace that I can see.

> java.lang.Exception: ConfigFile and/or IndexBuilder not set
>     at com.sun.java.help.search.DefaultIndexerKit.storeToken

BTW I made this a fatal error as of SVN revision 85.

(In reply to comment #46)
> file:/usr/jdk/packages/javax.help-2.0/lib/jhall.jar

Seems to be gone; perhaps the OS was upgraded on these machines? As discussed in comment #47, not clear if that was really the culprit anyway.

(In reply to comment #53)
> I have just seen this error when building a module on Mac:

This was an unrelated bug #201194.

No known remaining way to reproduce; closing.
Comment 55 Marian Mirilovic 2012-09-13 07:54:16 UTC
*** Bug 217555 has been marked as a duplicate of this bug. ***


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