Interpreting java.lang.NoSuchMethodError message
Posted
by Doog
on Stack Overflow
See other posts from Stack Overflow
or by Doog
Published on 2010-05-31T20:34:00Z
Indexed on
2010/05/31
20:43 UTC
Read the original article
Hit count: 292
java
|error-message
I get the following runtime error message (along with the first line of the stack trace, which points to line 94). I'm trying to figure out why it says no such method exists.
java.lang.NoSuchMethodError:
com.sun.tools.doclets.formats.html.SubWriterHolderWriter.printDocLinkForMenu(
ILcom/sun/javadoc/ClassDoc;Lcom/sun/javadoc/MemberDoc;
Ljava/lang/String;Z)Ljava/lang/String;
at com.sun.tools.doclets.formats.html.AbstractExecutableMemberWriter.writeSummaryLink(
AbstractExecutableMemberWriter.java:94)
Line 94 of writeSummaryLink is shown below.
QUESTIONS
What does "ILcom" or "Z" mean?
Why there are four types in parentheses
(ILcom/sun/javadoc/ClassDoc;Lcom/sun/javadoc/MemberDoc;Ljava/lang/String;Z)
and one after the parentheses
Ljava/lang/String;
when the method printDocLinkForMenu clearly has five parameters?
CODE DETAIL
The writeSummaryLink method is:
protected void writeSummaryLink(int context, ClassDoc cd, ProgramElementDoc member) {
ExecutableMemberDoc emd = (ExecutableMemberDoc)member;
String name = emd.name();
writer.strong();
writer.printDocLinkForMenu(context, cd, (MemberDoc) emd, name, false); // 94
writer.strongEnd();
writer.displayLength = name.length();
writeParameters(emd, false);
}
Here's the method line 94 is calling:
public void printDocLinkForMenu(int context, ClassDoc classDoc, MemberDoc doc,
String label, boolean strong) {
String docLink = getDocLink(context, classDoc, doc, label, strong);
print(deleteParameterAnchors(docLink));
}
© Stack Overflow or respective owner