dev@jaxb.java.net

What has changed between b17 and b23 of jaxb

From: Bhakti Mehta <Bhakti.Mehta_at_Sun.COM>
Date: Mon, 04 May 2009 13:59:36 -0700

Martin,
Today I integrated metro 2.0 b10 in v3. However if I pulled b23 promoted
jaxb bits in v3 I was running into a wierd annotation processing error.
This hardly gives any info to identify the problem so wanted to know
what were the changes between the 2 builds that cause this error
Hence I did not integrate jaxb b23 but just used jaxb b17 in v3
Thanks,
Bhakti

INFO]
------------------------------------------------------------------------
[INFO] Building JSR-109 implementation to deploy Metro
[INFO] task-segment: [install]
[INFO]
------------------------------------------------------------------------
[INFO] [enforcer:enforce {execution: enforce-versions}]
[INFO] [osgiversion:compute-osgi-version {execution: compute-osgi-version}]
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [hk2:hk2-compile]
[INFO] Compiling 65 source files to
/Users/bhakti/J1branch/3.0-Preview/webservices/jsr109-impl/target/classes
error: Could not create declaration for annotation type NotNull
Problem encountered during annotation processing;
see stacktrace below for more information.
java.lang.ClassCastException:
com.sun.tools.apt.mirror.type.ClassTypeImpl cannot be cast to
com.sun.mirror.type.AnnotationType
    at
com.sun.tools.apt.mirror.declaration.AnnotationMirrorImpl.getAnnotationType(AnnotationMirrorImpl.java:82)
    at
com.sun.tools.apt.mirror.apt.AnnotationProcessorEnvironmentImpl$CollectingAP$CollectingVisitor.visitDeclaration(AnnotationProcessorEnvironmentImpl.java:118)
    at
com.sun.mirror.util.SimpleDeclarationVisitor.visitMemberDeclaration(SimpleDeclarationVisitor.java:60)
    at
com.sun.mirror.util.SimpleDeclarationVisitor.visitExecutableDeclaration(SimpleDeclarationVisitor.java:140)
    at
com.sun.mirror.util.SimpleDeclarationVisitor.visitMethodDeclaration(SimpleDeclarationVisitor.java:160)
    at
com.sun.tools.apt.mirror.declaration.MethodDeclarationImpl.accept(MethodDeclarationImpl.java:41)
    at
com.sun.mirror.util.SourceOrderDeclScanner.visitExecutableDeclaration(SourceOrderDeclScanner.java:213)
    at
com.sun.mirror.util.DeclarationScanner.visitMethodDeclaration(DeclarationScanner.java:214)
    at
com.sun.tools.apt.mirror.declaration.MethodDeclarationImpl.accept(MethodDeclarationImpl.java:41)
    at
com.sun.mirror.util.SourceOrderDeclScanner.visitClassDeclaration(SourceOrderDeclScanner.java:207)
    at
com.sun.tools.apt.mirror.declaration.ClassDeclarationImpl.accept(ClassDeclarationImpl.java:95)
    at
com.sun.tools.apt.mirror.apt.AnnotationProcessorEnvironmentImpl$CollectingAP.process(AnnotationProcessorEnvironmentImpl.java:126)
    at
com.sun.tools.apt.mirror.apt.AnnotationProcessorEnvironmentImpl.getDeclarationsAnnotatedWith(AnnotationProcessorEnvironmentImpl.java:100)
    at
com.sun.enterprise.tools.apt.CompanionSeedGenerator.process(CompanionSeedGenerator.java:72)
    at
com.sun.mirror.apt.AnnotationProcessors$CompositeAnnotationProcessor.process(AnnotationProcessors.java:60)
    at
com.sun.mirror.apt.AnnotationProcessors$CompositeAnnotationProcessor.process(AnnotationProcessors.java:60)
    at
com.sun.mirror.apt.AnnotationProcessors$CompositeAnnotationProcessor.process(AnnotationProcessors.java:60)
    at com.sun.tools.apt.comp.Apt.main(Apt.java:454)
    at com.sun.tools.apt.main.JavaCompiler.compile(JavaCompiler.java:258)
    at com.sun.tools.apt.main.Main.compile(Main.java:1102)
    at com.sun.tools.apt.main.Main.compile(Main.java:964)
    at com.sun.tools.apt.Main.processing(Main.java:95)
    at com.sun.tools.apt.Main.process(Main.java:85)
    at
com.sun.enterprise.module.maven.HK2CompileMojo$1.compileInProcess(HK2CompileMojo.java:123)
    at
com.sun.enterprise.module.maven.AptCompiler.compile(AptCompiler.java:103)
    at
org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:521)
    at
com.sun.enterprise.module.maven.CompilerMojo.execute(CompilerMojo.java:149)
    at
com.sun.enterprise.module.maven.HK2CompileMojo.execute(HK2CompileMojo.java:137)
    at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451)
    at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
    at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:499)
    at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:478)
    at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330)
    at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:291)
    at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
    at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
    at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
    at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Fatal error compiling

Embedded error: APT failed: 4
[INFO]
------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 21 seconds
[INFO] Finished at: Mon May 04 13:58:03 PDT 2009
[INFO] Final Memory: 54M/139M
[INFO]
------------------------------------------------------------------------
/Users/bhakti/J1branch/3.0-Preview/webservices %