1

I am using yDoc from www.yworks.com to generate java docs. I however, encounter the following error when using jdk 8. One way to avoid this issue is to use java 7 in my code, but, I cannot take this option because it means I also have to spend refactoring to use java 7 wherever there is java 8 constructs. Is there a way of running the compiler in java 8 and the javadoc in java 7?

I will also appreciate a detailed explanation why this exception is happening because I am aware that java 8 has the class the method com.sun.tools.doclets.internal.toolkit.taglets.TagletManager.getConstructorCustomTags() Below is the full error from maven

[ERROR] Exit code: 1 - javadoc: warning - No source files for package com.ebucks.shop.vouchers.vms.tutuka
[ERROR] javadoc: error - In doclet class ydoc.doclets.YStandard,  method start has thrown an exception java.lang.reflect.InvocationTargetException
[ERROR] java.lang.NoSuchMethodError: com.sun.tools.doclets.internal.toolkit.taglets.TagletManager.getConstructorCustomTags()[Lcom/sun/tools/doclets/internal/toolkit/taglets/Taglet;
[ERROR] at ydoc.doclets.F$_A.<init>(Unknown Source)
[ERROR] at ydoc.doclets.F.B(Unknown Source)
[ERROR] at ydoc.doclets.F.E(Unknown Source)
[ERROR] at ydoc.doclets.J.setSpecificDocletOptions(Unknown Source)
[ERROR] at com.sun.tools.doclets.internal.toolkit.Configuration.setOptions(Configuration.java:560)
[ERROR] at ydoc.doclets.J.setOptions(Unknown Source)
[ERROR] at ydoc.doclets.C.A(Unknown Source)
[ERROR] at ydoc.doclets.YStandard.start(Unknown Source)
[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[ERROR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERROR] at java.lang.reflect.Method.invoke(Method.java:497)
[ERROR] at com.sun.tools.javadoc.DocletInvoker.invoke(DocletInvoker.java:310)
[ERROR] at com.sun.tools.javadoc.DocletInvoker.start(DocletInvoker.java:189)
[ERROR] at com.sun.tools.javadoc.Start.parseAndExecute(Start.java:366)
[ERROR] at com.sun.tools.javadoc.Start.begin(Start.java:219)
[ERROR] at com.sun.tools.javadoc.Start.begin(Start.java:205)
[ERROR] at com.sun.tools.javadoc.Main.execute(Main.java:64)
[ERROR] at com.sun.tools.javadoc.Main.main(Main.java:54)
Peter Szekeli
  • 2,712
  • 3
  • 30
  • 44
sheu
  • 284
  • 5
  • 13
  • Seems like the following question has the same error: [Javadoc error - java.lang.reflect.InvocationTargetException](https://stackoverflow.com/questions/32820086) but it doesn't have a accepted or upvoted answer – Ferrybig Feb 15 '16 at 09:11
  • That is true but here I acknowledge the shortcoming and am looking for a solution for Java 8. – sheu Feb 15 '16 at 10:31
  • On the download page of yWorks they only mention JDK 1.7, so there seems to be no support for JDK 1.8 – Marged Feb 15 '16 at 14:58
  • See if you can run javadoc from the command-line, without using Maven. The exception looks like a class-loading problem, and some of the popular build tools do "bad" things using JDK internal API to manipulate the internals of class loaders like URLClassLoader. – Jonathan Gibbons Aug 30 '17 at 19:22

0 Answers0