We are using ant jwsc to generate webservice. Everything working fine in JDK 7, While migrating to JDK 8 (jdk8 u 131) we get the below error and webservice build fails. any workaround for this ?
Quick google search returning annotationprocessorfactory is removed from jdk8
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
After upgrading the JAXB jars the issue is resolved. Build is Success.