Skip to content

Instantly share code, notes, and snippets.

@nking
Created May 18, 2012 22:28
Show Gist options
  • Save nking/2727904 to your computer and use it in GitHub Desktop.
Save nking/2727904 to your computer and use it in GitHub Desktop.
javadoc Annotation processing exceptions
If you're seeing
java.lang.ClassCastException: com.sun.tools.javadoc.ClassDocImpl cannot be cast to com.sun.javadoc.AnnotationTypeDoc
the classloader used by the javadoc tool is not finding your 3rd party annotation definitions.
This is a problem present in JDK 1.6.
An quick workaround to enable the classloader to find the annotation definitions is to add them to the bootclasspath using the -bootclasspath option for javadoc.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment