我们正在使用 ant jwsc 来生成 web 服务。在 JDK 7 中一切正常,在迁移到 JDK 8 (jdk8 u 131) 时,我们收到以下错误并且 Web 服务构建失败。有什么解决方法吗?
从 jdk8 中删除快速谷歌搜索返回 annotationprocessorfactory
weblogic.wsee.tools.WsBuildException: Error processing JAX-WS web services
at weblogic.wsee.tools.jws.jaxws.JAXWSProcessor.finish(JAXWSProcessor.java:238)
at weblogic.wsee.tools.jws.process.CompositeProcessor.finish(CompositeProcessor.java:58)
at weblogic.wsee.tools.jws.build.JwsCompiler.buildWebServices(JwsCompiler.java:544)
at weblogic.wsee.tools.jws.build.JwsCompiler.compile(JwsCompiler.java:493)
at weblogic.wsee.tools.anttasks.JwsModule.generate(JwsModule.java:379)
at weblogic.wsee.tools.anttasks.JwsModule.build(JwsModule.java:256)
at weblogic.wsee.tools.anttasks.JwscTask.execute(JwscTask.java:184)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
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:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
at org.apache.tools.ant.Main.runBuild(Main.java:758)
at org.apache.tools.ant.Main.startAnt(Main.java:217)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
Caused by: java.lang.NoClassDefFoundError: com/sun/mirror/apt/AnnotationProcessorFactory
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at org.apache.tools.ant.AntClassLoader.defineClassFromData(AntClassLoader.java:1146)
at org.apache.tools.ant.AntClassLoader.getClassFromStream(AntClassLoader.java:1324)
at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1388)
at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1341)
at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1088)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at weblogic.wsee.tools.jws.jaxws.JAXWSProcessor.runApt(JAXWSProcessor.java:390)
at weblogic.wsee.tools.jws.jaxws.JAXWSProcessor.finish(JAXWSProcessor.java:143)
... 22 more
Caused by: java.lang.ClassNotFoundException: com.sun.mirror.apt.AnnotationProcessorFactory
at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1400)
at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1341)
at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1088)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 32 more