java.lang.NoClassDefFoundError: com/sun/mirror/apt/AnnotationProcessorFactory when execute Enunciate ant task
java.lang.NoClassDefFoundError: com/sun/mirror/apt/AnnotationProcessorFactory when execute Enunciate ant task
我在尝试使用 Enunciate 为 Java 项目生成文档时收到以下堆栈跟踪。我正在使用 JDK 1.8.0_25 和 Enunciate 1.30 RC1.
BUILD FAILED
C:\dev\PayWay\make\build.xml:882: java.lang.NoClassDefFoundError: com/sun/mirror/apt/AnnotationProcessorFactory
at org.codehaus.enunciate.main.EnunciateTask.execute(EnunciateTask.java:93)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.Target.performTasks(Target.java:456)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
at org.apache.tools.ant.Main.runBuild(Main.java:851)
at org.apache.tools.ant.Main.startAnt(Main.java:235)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
Caused by: java.lang.ClassNotFoundException: com.sun.mirror.apt.AnnotationProcessorFactory
at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1374)
at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1323)
at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1076)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 17 more
这个问题的原因是什么?
阐明 1.30 RC1 不支持 Java 1.8,因为它依赖于已删除的 类。
这是针对 Enunciate 2 的。
我在尝试使用 Enunciate 为 Java 项目生成文档时收到以下堆栈跟踪。我正在使用 JDK 1.8.0_25 和 Enunciate 1.30 RC1.
BUILD FAILED
C:\dev\PayWay\make\build.xml:882: java.lang.NoClassDefFoundError: com/sun/mirror/apt/AnnotationProcessorFactory
at org.codehaus.enunciate.main.EnunciateTask.execute(EnunciateTask.java:93)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.Target.performTasks(Target.java:456)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
at org.apache.tools.ant.Main.runBuild(Main.java:851)
at org.apache.tools.ant.Main.startAnt(Main.java:235)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
Caused by: java.lang.ClassNotFoundException: com.sun.mirror.apt.AnnotationProcessorFactory
at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1374)
at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1323)
at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1076)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 17 more
这个问题的原因是什么?
阐明 1.30 RC1 不支持 Java 1.8,因为它依赖于已删除的 类。
这是针对 Enunciate 2 的。