I believe you are encountering a bug in ant dealing with classloaders.
In classpath of your taskdef for apt, make sure that all of the
JAX-WS classes are included. Also, make sure that you fork 'apt' and
run it in a separate jvm.
ybenigot_at_free.fr wrote:
> I have the java jdk 6 on windows.
>
> I am using Eclipse and trying to create an apt ant task.
>
> Also I have downloaded jaxws-2_0.jar and I use the lib jars in the
> classpath of build.xml.
>
> After a few tries I am able to start apt through a build.xml file, but I
> keep getting :
>
> apt-generate:
> [apt] warning: Bad annotation processor factory:
> java.lang.ClassCastException:
> com.sun.istack.ws.AnnotationProcessorFactoryImpl cannot be cast to
> com.sun.mirror.apt.AnnotationProcessorFactory
> [apt] warning: Bad annotation processor factory:
> java.lang.ClassCastException:
> com.sun.istack.internal.ws.AnnotationProcessorFactoryImpl cannot be cast
> to com.sun.mirror.apt.AnnotationProcessorFactory
> [apt] warning: Annotation types without processors:
> [javax.jws.WebService]
> [apt] 3 warnings
>
> I found that both classes named in the warnings correspond to the JDK on
> one hand, and jaxws on the other hand, but no way to make this work.
> There is some
> incompatibility.
>
> Any idea ?
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jax-ws.dev.java.net
> For additional commands, e-mail: users-help_at_jax-ws.dev.java.net
>
>