roycezhc / doclava

Automatically exported from code.google.com/p/doclava
Apache License 2.0
0 stars 0 forks source link

can't javadoc guice struts2 plugin #22

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Doclava fails when it tries to source the struts2 extension for Guice.  It 
prints out this exception:

javadoc: error - In doclet class com.google.doclava.Doclava,  method start has 
thrown an exception java.lang.reflect.InvocationTargetException
java.lang.ClassCastException: com.sun.tools.javadoc.ClassDocImpl cannot be cast 
to com.sun.javadoc.AnnotationTypeDoc
    at com.sun.tools.javadoc.AnnotationDescImpl.annotationType(AnnotationDescImpl.java:46)
    at com.google.doclava.ProjectBuilder.obtainAnnotationInstance(ProjectBuilder.java:486)
    at com.google.doclava.ProjectBuilder.convertAnnotationInstances(ProjectBuilder.java:475)
    at com.google.doclava.ProjectBuilder.obtainMethod(ProjectBuilder.java:343)
    at com.google.doclava.ProjectBuilder.convertMethods(ProjectBuilder.java:305)
    at com.google.doclava.ProjectBuilder.initClass(ProjectBuilder.java:157)
    at com.google.doclava.ProjectBuilder.build(ProjectBuilder.java:70)
    at com.google.doclava.Doclava.start(Doclava.java:246)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
1 error
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
100 warnings
    at java.lang.reflect.Method.invoke(Method.java:597)
    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)
    at com.sun.tools.javadoc.Main.main(Main.java:31)

checkout the guice code & uncomment the struts2 src in trunk/build.xml:javadoc 
(and run the javadoc target) to reproduce.

Original issue reported on code.google.com by sberlin on 1 Nov 2010 at 12:46

GoogleCodeExporter commented 9 years ago
I believe this is VM-dependent. Try swapping OpenJDK for the Oracle JVM.

Original comment by limpbizkit on 1 Nov 2010 at 3:09

GoogleCodeExporter commented 9 years ago
I have the same issue, with maven javadoc plugin. I reproduced it on :
- macosx 10.6 jdk (update 22)
- windows oracle jdk 1.6

I use a fresh doclava build from trunk, and used the wiki given maven 
configuration

Regards,

Original comment by jerome.raduget on 10 Nov 2010 at 10:18

GoogleCodeExporter commented 9 years ago
Precision, my test is not performed for the project Guice ;-) 

Original comment by jerome.raduget on 10 Nov 2010 at 10:24

GoogleCodeExporter commented 9 years ago
Also seems to fail with OpenJDK on Linux.  

Original comment by sberlin on 27 Dec 2010 at 4:19