4

I am trying to generate the uml diagram from yDoc library. It basically uses Javadoc to parse tha Java source files. However, when I am trying to execute the command from terminal(OS X), I am getting following error:

javadoc: error - In doclet class ydoc.doclets.YStandard,  method start has thrown  
an exception  
java.lang.reflect.InvocationTargetException java.lang.NoSuchMethodError:

com.sun.tools.doclets.internal.toolkit.taglets.TagletManager.  
getConstructorCustomTags()[Lcom/sun/tools/doclets/internal/toolkit/taglets/Taglet;


at ydoc.doclets.F$_A.<init>(Unknown Source)
at ydoc.doclets.F.B(Unknown Source)
at ydoc.doclets.F.E(Unknown Source)
at ydoc.doclets.J.setSpecificDocletOptions(Unknown Source)
at com.sun.tools.doclets.internal.toolkit.Configuration.setOptions(Configuration.java:560)
at ydoc.doclets.J.setOptions(Unknown Source)
at ydoc.doclets.C.A(Unknown Source)
at ydoc.doclets.YStandard.start(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.sun.tools.javadoc.DocletInvoker.invoke(DocletInvoker.java:310)
at com.sun.tools.javadoc.DocletInvoker.start(DocletInvoker.java:189)
at com.sun.tools.javadoc.Start.parseAndExecute(Start.java:366)
at com.sun.tools.javadoc.Start.begin(Start.java:219)
at com.sun.tools.javadoc.Start.begin(Start.java:205)
at com.sun.tools.javadoc.Main.execute(Main.java:64)
at com.sun.tools.javadoc.Main.main(Main.java:54)

I ran the following execution command:

javadoc @doc/examples/options.sample.linux <Java file path>

I am also getting same error when trying from Eclipse IDE.

codeblues
  • 71
  • 1
  • 8
  • I am getting the exact same error trace following their instructions for running it in eclipse. I am also on OS X. https://www.yworks.com/products/yDoc/doc/usersguide.html – Grant M Oct 15 '15 at 06:08
  • I also tried instructions at https://power2build.wordpress.com/2015/02/24/uml-doclet-in-eclipse/ adding JRE source compatibility 1.5 and other VM options – Grant M Oct 15 '15 at 06:23

1 Answers1

0

@codeblues and @Grant M, I just noticed this question. I am the author of that blog post Grant M mentioned. I just tried my instructions again, I am getting Javadoc with UML diagram as expected.

To me, this sounds like a version mismatch between JDK (and JavaDoc)and Ydoc.jar. Javadoc related classes are in a jar called tools.jar in jdk\lib folder. You may want to check your classpath to see if it includes the right JDK. You can probably try which javadoc on *nix (or "where javadoc" on Win 7+ to find out the JDK location used).

The mention "Unknown source' in your exception seems to indicate you are pointing to JRE instead of JDK?? Also, see this Stackoverflow post about "(unknown source)" in Java Exceptions.

I hope you can get this to work, to see the UMLs jump into your Javadoc!

HTH

Sam

Community
  • 1
  • 1
svaratech
  • 241
  • 1
  • 4
  • 17
  • OK, I just tried changing a few settings - when I changed the Javadoc command to be from Java 1.8 (C:\Java\jre1,8.0_65\bin\javadoc.exe), with all else same, I was able to get this error. I did try JDK 1.6 and 1.7, they worked fine. And I just noticed on yworks page, https://www.yworks.com/en/products_ydoc.html; they only mention upto 1.7. So, I am guessing mixing Java 1.8 with ydoc is your issue. – svaratech Nov 10 '15 at 00:55