Submitted On 11-JAN-2005
rydenius
How come this bug is not fixed yet? It is obviously an annoying tool bug that must be very easy to fix?!
Submitted On 09-FEB-2005
ofx
I agree with rydenius. Kind of a pain with a organization with many developers and a large number of classes to use trial and error to find the offending file. Please raise the priority. Thanks!
Submitted On 31-MAY-2005
opinalid
I've hit what seems to be a variant of this bug:
(...)
[javadoc] Loading source files for package com.visionnaire.chart.renderer...
[javadoc] Constructing Javadoc information...
[javadoc] java.util.MissingResourceException: Can't find resource for bundle com.sun.tools.doclets.internal.toolkit.resources.doclets, key doclet.Same_package_name_used
[javadoc] at java.util.ResourceBundle.getObject(ResourceBundle.java:326)
[javadoc] at java.util.ResourceBundle.getString(ResourceBundle.java:286)
[javadoc] at com.sun.tools.doclets.internal.toolkit.util.MessageRetriever.getText(MessageRetriever.java:114)
(...)
Different cause, resourcebundle and resource key, but probably the same bug.
Submitted On 07-JUL-2005
selcukyu
Here is my snipet:
package jawiro;
public interface ConstraintStrategy {
public boolean approveSuspend( );
}
Another snipet:
package jawiro;
public interface RoleInterface {
public boolean isDominant( );
}
These two snippets give me the java.util.MissingResourceException as well. I have shortened these classes to these minimal forms for testing but I still get this annoying exception.
Submitted On 16-SEP-2005
hyzerc
I get this too. Also when fixing please put the offending source file name in the exception. Thanks. chris
Submitted On 12-OCT-2005
rhimo
The easiest way for me to determine which file has the offending comment is:
grep -R -e "<[aA][^[:space:]]" *
This should produce a list of files that could potentially have the problem. Good luck.
Submitted On 24-FEB-2006
mipito
It is very annoying; will this get fixed with 1.5 07 release?
Submitted On 20-APR-2006
cheesmo
This bug is rediculous. There's no excuse for not fixing it in JDK 5.
Submitted On 28-APR-2006
proudchief
I found a way to work around this bug so you can find the error in your javadoc and fix it: create a standard_en.properties file containing the missing message key:
doclet.malformed_html_link_tag=Malformed link: {0}
Put the file in a jar with the correct package structure (com/sun/tools/doclets/formats/html/resources) and place that jar in your JDK's jre/lib/ext directory.
In my case the erroneous text printed out, but not any file/line information. I had to text search my source files to find the problem line. But it's easier than guessing.
Submitted On 02-JUN-2006
If you're building a huge project it's easier to just debug javadoc to find the item in question. First get the doclet source from sun.com.
Then, run javadoc.exe in a debug context by passing in JVM arguments on the command line using the -J switch: (E.g.: -J-Xdebug -J-Xnoagent -J-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5000)
If you're building using Ant, you'll need to use the "additional param" attribute of tje <javadoc> element to include those JVM args; e.g.: additionalparam="-J-Xdebug -J-Xnoagent -J-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5000"
Then set a breakpoint (assuming jdk 1.5.0_06) at HtmlDocletWriter.redirectRelativeLinks, line 1526 which is where the warning is being raised. This will give you the text of the comment being parsed and will allow easier grepping to find the file in question.
Submitted On 02-JUN-2006
Grepping with this reg exp:
.*[*].*<[aA][^[:space:]]
Will look for those that have an asterisk "*" character on the same line before an "<a" sequence which should limit the output quite a bit in some cases
Submitted On 18-JUN-2007
I migrate from 1.4 to 1.5.0_09 and got this error too.
I tried to create the resource bundle but I did not get the message.
Submitted On 13-FEB-2008
I used the regular expression:
.*[*].*<[aA][^[:space:]]
within eclipse text search and it found the file with bad html code.
Submitted On 13-FEB-2008
I was getting the following Exception( using java 1.5_14):
java.util.MissingResourceException: Can't find resource for bundle com.sun.tools.doclets.formats.html.resources.standard, key doclet.malformed_html_link_tag
at java.util.ResourceBundle.getObject(ResourceBundle.java:325)
at java.util.ResourceBundle.getString(ResourceBundle.java:285)
at com.sun.tools.doclets.internal.toolkit.util.MessageRetriever.getText(MessageRetriever.java:114)
at com.sun.tools.doclets.internal.toolkit.util.MessageRetriever.getText(MessageRetriever.java:92)
at com.sun.tools.doclets.internal.toolkit.util.MessageRetriever.getText(MessageRetriever.java:81)
at com.sun.tools.doclets.internal.toolkit.util.MessageRetriever.warning(MessageRetriever.java:290)
at com.sun.tools.doclets.formats.html.HtmlDocletWriter.redirectRelativeLinks(HtmlDocletWriter.java:1526)
at com.sun.tools.doclets.formats.html.HtmlDocletWriter.commentTagsToString(HtmlDocletWriter.java:1438)
at com.sun.tools.doclets.formats.html.HtmlDocletWriter.printCommentTags(HtmlDocletWriter.java:1397)
at com.sun.tools.doclets.formats.html.HtmlDocletWriter.printSummaryComment(HtmlDocletWriter.java:1370)
at com.sun.tools.doclets.formats.html.HtmlDocletWriter.printSummaryComment(HtmlDocletWriter.java:1366)
at com.sun.tools.doclets.formats.html.AbstractIndexWriter.printComment(AbstractIndexWriter.java:192)
at com.sun.tools.doclets.formats.html.AbstractIndexWriter.printDescription(AbstractIndexWriter.java:126)
at com.sun.tools.doclets.formats.html.AbstractIndexWriter.generateContents(AbstractIndexWriter.java:91)
at com.sun.tools.doclets.formats.html.SplitIndexWriter.generateIndexFile(SplitIndexWriter.java:101)
at com.sun.tools.doclets.formats.html.SplitIndexWriter.generate(SplitIndexWriter.java:74)
at com.sun.tools.doclets.formats.html.HtmlDoclet.generateOtherFiles(HtmlDoclet.java:101)
at com.sun.tools.doclets.internal.toolkit.AbstractDoclet.startGeneration(AbstractDoclet.java:122)
at com.sun.tools.doclets.internal.toolkit.AbstractDoclet.start(AbstractDoclet.java:64)
at com.sun.tools.doclets.formats.html.HtmlDoclet.start(HtmlDoclet.java:42)
at com.sun.tools.doclets.standard.Standard.start(Standard.java:23)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.sun.tools.javadoc.DocletInvoker.invoke(DocletInvoker.java:269)
at com.sun.tools.javadoc.DocletInvoker.start(DocletInvoker.java:143)
at com.sun.tools.javadoc.Start.parseAndExecute(Start.java:340)
at com.sun.tools.javadoc.Start.begin(Start.java:128)
at com.sun.tools.javadoc.Main.execute(Main.java:41)
592 warnings
at com.sun.tools.javadoc.Main.main(Main.java:31)
It's not necessarily HTML code that would cause this problem. It's anywhere in the comments read by javadoc that have XML/HMTL like text that is not properly formed (missing closing tags etc.) It helps to look for any classes that have opening and closing brackets anywhere in the comments. The regexs listed in this posting will only look for HTML anchor tags but that might not be your problem, as it could be anything that might be interpreted as malformed HTML. This regex (eclipse syntax) will help find any opening '<' chars in the javadoc comments:
.*[*].*<[a-zA-Z][^[:space:]]
It may give quite a few results but the problem will most likely be in one of the search results.
Submitted On 27-MAY-2008
This bug is annoying and really a shame for java and sun! It's around for YEAAARS! It even exists in a similar way in jdk1.6!
[javadoc] Building index for all the packages and classes...
[javadoc] java.lang.ClassCastException: com.sun.tools.doclets.formats.html.SingleIndexWriter
[javadoc] at com.sun.tools.doclets.formats.html.HtmlDocletWriter.seeTagToString(HtmlDocletWriter.java:1338)
[javadoc] at com.sun.tools.doclets.formats.html.HtmlDocletWriter.commentTagsToString(HtmlDocletWriter.java:1428)
[javadoc] at com.sun.tools.doclets.formats.html.HtmlDocletWriter.printCommentTags(HtmlDocletWriter.java:1397)
[javadoc] at com.sun.tools.doclets.formats.html.HtmlDocletWriter.printSummaryComment(HtmlDocletWriter.java:1370)
[javadoc] at com.sun.tools.doclets.formats.html.HtmlDocletWriter.printSummaryComment(HtmlDocletWriter.java:1366)
[javadoc] at com.sun.tools.doclets.formats.html.AbstractIndexWriter.printComment(AbstractIndexWriter.java:192)
[javadoc] at com.sun.tools.doclets.formats.html.AbstractIndexWriter.printDescription(AbstractIndexWriter.java:164)
Submitted On 01-APR-2009
This affects a lot more than just html links, though that's what it's intended to be (the better expression would definitely be "<a " with the space as noted in the initial report.
In my case it affects stuff like this:
/**
* Return Set<AttrSet> using flexible input criteria consisting of set name, start date,
* end date, ResultFilter, and ResultType.
* Null values are allowed, and are treated as wildcards (no name means search for all names, etc).
*
* @param set name
* @param startDate
* @param endDate
* @param ResultFilter indicating ACTIVE (latest by effectiveDate and availableTimestamp per set name) or ALL
* @param ResultType indicating FULL (with Attr data) or HEADER (without Attr data)
* @return Set<AttrSet>
*/
public Set<AttrSet> getAttrSets(String name, Date startDate, Date endDate, ResultFilter filter, ResultType type);
The @return tag there with generics that happen to start with "A" trigger it.
To find out exactly what files are triggering it make a JAR like proudchief notes and put it in jre/lib/ext and then it shows exactly where this occurs.
Submitted On 01-APR-2009
One correction to my last note, it's actually the JavaDoc body that is affecting it, not the @return tag.
Its this one:
/**
* Return Set<AttrSet> using flexible input criteria consisting of set name, . . .
Parameterized types that start with A with Java 1.5 (seems to work with 1.6) that are in JavaDoc comments trigger it. Bad news for me (I have a crapload of these, so I have to make the JavaDoc a lot dumber, because requiring everyone that builds the project to have the workaround JAR isn't feasible).
PLEASE NOTE: JDK6 is formerly known as Project Mustang
|