Cannot compile trunk

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Cannot compile trunk

Valeri Felberg
I get the following on SuSE 10.0 with jdk1.6.0_02 and Maven 2.0.7. It worked some time ago...

[INFO] [stapler:apt-compile]
[INFO] Compiling 272 source files to /home/valeri/hudson/hudson/main/core/target/classes
error: Could not create declaration for annotation type QuickSilver
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 org.kohsuke.stapler.ExportedBeanAnnotationProcessor.process (ExportedBeanAnnotationProcessor.java:56)
        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 org.kohsuke.stapler.AptCompiler.compileInProcess (AptCompiler.java:63)
        at org.kohsuke.stapler.AptCompiler.compile(AptCompiler.java:50)
        at org.kohsuke.stapler.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:486)
        at org.kohsuke.stapler.CompilerMojo.execute (CompilerMojo.java:111)
        at org.kohsuke.stapler.AptMojo.execute(AptMojo.java:22)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:443)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals (DefaultLifecycleExecutor.java:539)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:480)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal (DefaultLifecycleExecutor.java:459)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments (DefaultLifecycleExecutor.java:278)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:280)
        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] Trace
org.apache.maven.lifecycle.LifecycleExecutionException : Fatal error compiling
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:564)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle (DefaultLifecycleExecutor.java:480)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:459)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures (DefaultLifecycleExecutor.java:311)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute (DefaultLifecycleExecutor.java:143)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
        at org.apache.maven.cli.MavenCli.main (MavenCli.java:280)
        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)
Caused by: org.apache.maven.plugin.MojoExecutionException : Fatal error compiling
        at org.kohsuke.stapler.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:491)
        at org.kohsuke.stapler.CompilerMojo.execute(CompilerMojo.java:111)
        at org.kohsuke.stapler.AptMojo.execute (AptMojo.java:22)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:443)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java :539)
        ... 16 more
Caused by: org.codehaus.plexus.compiler.CompilerException: APT failed: 4
        at org.kohsuke.stapler.AptCompiler.compileInProcess(AptCompiler.java:66)
        at org.kohsuke.stapler.AptCompiler.compile (AptCompiler.java:50)
        at org.kohsuke.stapler.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:486)
        ... 20 more

Reply | Threaded
Open this post in threaded view
|

Re: Cannot compile trunk

Valeri Felberg
A fresh checkout solves the problem. Sorry for spam.

On 8/8/07, Valeri Felberg <[hidden email] > wrote:
I get the following on SuSE 10.0 with jdk1.6.0_02 and Maven 2.0.7. It worked some time ago...

[INFO] [stapler:apt-compile]
[INFO] Compiling 272 source files to /home/valeri/hudson/hudson/main/core/target/classes
error: Could not create declaration for annotation type QuickSilver
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 org.kohsuke.stapler.ExportedBeanAnnotationProcessor.process (ExportedBeanAnnotationProcessor.java:56)
        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 org.kohsuke.stapler.AptCompiler.compileInProcess (AptCompiler.java:63)
        at org.kohsuke.stapler.AptCompiler.compile(AptCompiler.java:50)
        at org.kohsuke.stapler.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:486)
        at org.kohsuke.stapler.CompilerMojo.execute (CompilerMojo.java:111)
        at org.kohsuke.stapler.AptMojo.execute(AptMojo.java:22)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:443)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals (DefaultLifecycleExecutor.java:539)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:480)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal (DefaultLifecycleExecutor.java:459)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments (DefaultLifecycleExecutor.java:278)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:280)
        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] Trace
org.apache.maven.lifecycle.LifecycleExecutionException : Fatal error compiling
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:564)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle (DefaultLifecycleExecutor.java:480)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:459)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures (DefaultLifecycleExecutor.java:311)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute (DefaultLifecycleExecutor.java:143)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
        at org.apache.maven.cli.MavenCli.main (MavenCli.java:280)
        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)
Caused by: org.apache.maven.plugin.MojoExecutionException : Fatal error compiling
        at org.kohsuke.stapler.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:491)
        at org.kohsuke.stapler.CompilerMojo.execute(CompilerMojo.java:111)
        at org.kohsuke.stapler.AptMojo.execute (AptMojo.java:22)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:443)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java :539)
        ... 16 more
Caused by: org.codehaus.plexus.compiler.CompilerException: APT failed: 4
        at org.kohsuke.stapler.AptCompiler.compileInProcess(AptCompiler.java:66)
        at org.kohsuke.stapler.AptCompiler.compile (AptCompiler.java:50)
        at org.kohsuke.stapler.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:486)
        ... 20 more


Reply | Threaded
Open this post in threaded view
|

Re: Cannot compile trunk

Stephen Connolly-2
How are you getting it to compile on Linux???

I am still unable to compile on Linux (for some time now)

I've tried updating to Java 1.6.0_02 with no avail!

We have a long standing issue raised in this regard.

The only difference that I see is that you are running SuSE and we are not.

Peter is running Fedora and RHEL4
I'm running Ubuntu 7.04 (on both amd64 and x86)
Kohsuke has tried on Ubuntu 7.04

What is going on here.

-Stephen.
Valeri Felberg wrote
A fresh checkout solves the problem. Sorry for spam.

On 8/8/07, Valeri Felberg <valeri.felberg@gmail.com> wrote:
>
> I get the following on SuSE 10.0 with jdk1.6.0_02 and Maven 2.0.7. It
> worked some time ago...
>
> [INFO] [stapler:apt-compile]
> [INFO] Compiling 272 source files to
> /home/valeri/hudson/hudson/main/core/target/classes
> error: Could not create declaration for annotation type QuickSilver
> Problem encountered during annotation processing;
> see stacktrace below for more information.
> java.lang.ClassCastException: com.sun.tools.apt.mirror.type.ClassTypeImplcannot 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 org.kohsuke.stapler.ExportedBeanAnnotationProcessor.process (
> ExportedBeanAnnotationProcessor.java:56)
>         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 org.kohsuke.stapler.AptCompiler.compileInProcess (
> AptCompiler.java:63)
>         at org.kohsuke.stapler.AptCompiler.compile(AptCompiler.java:50)
>         at org.kohsuke.stapler.AbstractCompilerMojo.execute(
> AbstractCompilerMojo.java:486)
>         at org.kohsuke.stapler.CompilerMojo.execute (CompilerMojo.java
> :111)
>         at org.kohsuke.stapler.AptMojo.execute(AptMojo.java:22)
>         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(
> DefaultPluginManager.java:443)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals (
> DefaultLifecycleExecutor.java:539)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle
> (DefaultLifecycleExecutor.java:480)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(
> DefaultLifecycleExecutor.java:459)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures
> (DefaultLifecycleExecutor.java:311)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments (
> DefaultLifecycleExecutor.java:278)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(
> DefaultLifecycleExecutor.java:143)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:280)
>         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] Trace
> org.apache.maven.lifecycle.LifecycleExecutionException : Fatal error
> compiling
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
> DefaultLifecycleExecutor.java:564)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(
> DefaultLifecycleExecutor.java:480)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal
> (DefaultLifecycleExecutor.java:459)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(
> DefaultLifecycleExecutor.java:311)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
> DefaultLifecycleExecutor.java:278)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute (
> DefaultLifecycleExecutor.java:143)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
>         at org.apache.maven.cli.MavenCli.main (MavenCli.java:280)
>         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)
> Caused by: org.apache.maven.plugin.MojoExecutionException : Fatal error
> compiling
>         at org.kohsuke.stapler.AbstractCompilerMojo.execute(
> AbstractCompilerMojo.java:491)
>         at org.kohsuke.stapler.CompilerMojo.execute(CompilerMojo.java:111)
>         at org.kohsuke.stapler.AptMojo.execute (AptMojo.java:22)
>         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(
> DefaultPluginManager.java:443)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
> DefaultLifecycleExecutor.java :539)
>         ... 16 more
> Caused by: org.codehaus.plexus.compiler.CompilerException: APT failed: 4
>         at org.kohsuke.stapler.AptCompiler.compileInProcess(
> AptCompiler.java:66)
>         at org.kohsuke.stapler.AptCompiler.compile (AptCompiler.java:50)
>         at org.kohsuke.stapler.AbstractCompilerMojo.execute(
> AbstractCompilerMojo.java:486)
>         ... 20 more
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Cannot compile trunk

Valeri Felberg
On 8/11/07, Stephen Connolly <[hidden email]> wrote:

How are you getting it to compile on Linux???

Well, I'm not doing anything special, just check out (as guest) and maven install. What errors do you get? I suppose I've read something on the user list about infinite recursion...

I am still unable to compile on Linux (for some time now)

I've tried updating to Java 1.6.0_02 with no avail!

We have a long standing issue raised in this regard.

The only difference that I see is that you are running SuSE and we are not.

Peter is running Fedora and RHEL4
I'm running Ubuntu 7.04 (on both amd64 and x86)
Kohsuke has tried on Ubuntu 7.04

What is going on here.

-Stephen.

Valeri Felberg wrote:
>
> A fresh checkout solves the problem. Sorry for spam.
>
> On 8/8/07, Valeri Felberg <[hidden email]> wrote:

>>
>> I get the following on SuSE 10.0 with jdk1.6.0_02 and Maven 2.0.7. It
>> worked some time ago...
>>
>> [INFO] [stapler:apt-compile]
>> [INFO] Compiling 272 source files to
>> /home/valeri/hudson/hudson/main/core/target/classes
>> error: Could not create declaration for annotation type QuickSilver
>> Problem encountered during annotation processing;
>> see stacktrace below for more information.
>> java.lang.ClassCastException:
>> com.sun.tools.apt.mirror.type.ClassTypeImplcannot 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 org.kohsuke.stapler.ExportedBeanAnnotationProcessor.process (
>> ExportedBeanAnnotationProcessor.java:56)
>>         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 org.kohsuke.stapler.AptCompiler.compileInProcess (
>> AptCompiler.java:63)

>>         at org.kohsuke.stapler.AptCompiler.compile(AptCompiler.java:50)
>>         at org.kohsuke.stapler.AbstractCompilerMojo.execute(
>> AbstractCompilerMojo.java :486)
>>         at org.kohsuke.stapler.CompilerMojo.execute (CompilerMojo.java
>> :111)
>>         at org.kohsuke.stapler.AptMojo.execute(AptMojo.java:22)
>>         at org.apache.maven.plugin.DefaultPluginManager.executeMojo (
>> DefaultPluginManager.java:443)
>>         at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals (
>> DefaultLifecycleExecutor.java:539)
>>         at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle
>> (DefaultLifecycleExecutor.java:480)
>>         at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal (
>> DefaultLifecycleExecutor.java:459)
>>         at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures
>> (DefaultLifecycleExecutor.java:311)
>>         at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments (
>> DefaultLifecycleExecutor.java:278)
>>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(
>> DefaultLifecycleExecutor.java:143)

>>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
>>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
>>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:280)
>>         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] Trace
>> org.apache.maven.lifecycle.LifecycleExecutionException : Fatal error
>> compiling
>>         at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
>> DefaultLifecycleExecutor.java:564)
>>         at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle (
>> DefaultLifecycleExecutor.java:480)
>>         at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal
>> (DefaultLifecycleExecutor.java:459)
>>         at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(

>> DefaultLifecycleExecutor.java:311)
>>         at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments (
>> DefaultLifecycleExecutor.java:278)
>>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute (
>> DefaultLifecycleExecutor.java:143)
>>         at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:334)
>>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
>>         at org.apache.maven.cli.MavenCli.main (MavenCli.java:280)
>>         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)
>> Caused by: org.apache.maven.plugin.MojoExecutionException : Fatal error
>> compiling
>>         at org.kohsuke.stapler.AbstractCompilerMojo.execute(
>> AbstractCompilerMojo.java:491)
>>         at
>> org.kohsuke.stapler.CompilerMojo.execute(CompilerMojo.java:111)
>>         at org.kohsuke.stapler.AptMojo.execute (AptMojo.java:22)
>>         at org.apache.maven.plugin.DefaultPluginManager.executeMojo (
>> DefaultPluginManager.java:443)
>>         at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
>> DefaultLifecycleExecutor.java :539)
>>         ... 16 more
>> Caused by: org.codehaus.plexus.compiler.CompilerException: APT failed: 4
>>         at org.kohsuke.stapler.AptCompiler.compileInProcess(
>> AptCompiler.java:66)
>>         at org.kohsuke.stapler.AptCompiler.compile (AptCompiler.java:50)
>>         at org.kohsuke.stapler.AbstractCompilerMojo.execute(
>> AbstractCompilerMojo.java:486)
>>         ... 20 more
>>
>>
>
>

--
View this message in context: http://www.nabble.com/Cannot-compile-trunk-tf4248570.html#a12107239
Sent from the Hudson dev mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: Cannot compile trunk

Kohsuke Kawaguchi
Administrator
In reply to this post by Stephen Connolly-2
Stephen Connolly wrote:

> How are you getting it to compile on Linux???
>
> I am still unable to compile on Linux (for some time now)
>
> I've tried updating to Java 1.6.0_02 with no avail!
>
> We have a long standing issue raised in this regard.
>
> The only difference that I see is that you are running SuSE and we are not.
>
> Peter is running Fedora and RHEL4
> I'm running Ubuntu 7.04 (on both amd64 and x86)
> Kohsuke has tried on Ubuntu 7.04
>
> What is going on here.
There are apparently two different errors. One is this
ClassCastException and the other is the infinite recursion problem.

I have an environment to reproduce the latter problem but not the former.

If Valeri or others continues to see the former problem, one thing we
can try is to move the QuickSilver annotation to another module. Looking
at the javac source code, it appears to me that the problem is somehow
Javac creating ClassTypeImpl for QuickSilver whereas it's supposed to
create AnnotationTypeImpl. Moving it to another module would cause this
annotation to be loaded as a binary, so I suspect it will fix the problem.

>
> -Stephen.
>
> Valeri Felberg wrote:
>>
>> A fresh checkout solves the problem. Sorry for spam.
>>
>> On 8/8/07, Valeri Felberg <[hidden email]> wrote:
>>>
>>> I get the following on SuSE 10.0 with jdk1.6.0_02 and Maven 2.0.7. It
>>> worked some time ago...
>>>
>>> [INFO] [stapler:apt-compile]
>>> [INFO] Compiling 272 source files to
>>> /home/valeri/hudson/hudson/main/core/target/classes
>>> error: Could not create declaration for annotation type QuickSilver
>>> Problem encountered during annotation processing;
>>> see stacktrace below for more information.
>>> java.lang.ClassCastException:
>>> com.sun.tools.apt.mirror.type.ClassTypeImplcannot 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 org.kohsuke.stapler.ExportedBeanAnnotationProcessor.process (
>>> ExportedBeanAnnotationProcessor.java:56)
>>>         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 org.kohsuke.stapler.AptCompiler.compileInProcess (
>>> AptCompiler.java:63)
>>>         at org.kohsuke.stapler.AptCompiler.compile(AptCompiler.java:50)
>>>         at org.kohsuke.stapler.AbstractCompilerMojo.execute(
>>> AbstractCompilerMojo.java:486)
>>>         at org.kohsuke.stapler.CompilerMojo.execute (CompilerMojo.java
>>> :111)
>>>         at org.kohsuke.stapler.AptMojo.execute(AptMojo.java:22)
>>>         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(
>>> DefaultPluginManager.java:443)
>>>         at
>>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals (
>>> DefaultLifecycleExecutor.java:539)
>>>         at
>>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle
>>> (DefaultLifecycleExecutor.java:480)
>>>         at
>>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(
>>> DefaultLifecycleExecutor.java:459)
>>>         at
>>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures
>>> (DefaultLifecycleExecutor.java:311)
>>>         at
>>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments (
>>> DefaultLifecycleExecutor.java:278)
>>>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(
>>> DefaultLifecycleExecutor.java:143)
>>>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
>>>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
>>>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:280)
>>>         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] Trace
>>> org.apache.maven.lifecycle.LifecycleExecutionException : Fatal error
>>> compiling
>>>         at
>>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
>>> DefaultLifecycleExecutor.java:564)
>>>         at
>>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(
>>> DefaultLifecycleExecutor.java:480)
>>>         at
>>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal
>>> (DefaultLifecycleExecutor.java:459)
>>>         at
>>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(
>>> DefaultLifecycleExecutor.java:311)
>>>         at
>>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
>>> DefaultLifecycleExecutor.java:278)
>>>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute (
>>> DefaultLifecycleExecutor.java:143)
>>>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
>>>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
>>>         at org.apache.maven.cli.MavenCli.main (MavenCli.java:280)
>>>         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)
>>> Caused by: org.apache.maven.plugin.MojoExecutionException : Fatal error
>>> compiling
>>>         at org.kohsuke.stapler.AbstractCompilerMojo.execute(
>>> AbstractCompilerMojo.java:491)
>>>         at
>>> org.kohsuke.stapler.CompilerMojo.execute(CompilerMojo.java:111)
>>>         at org.kohsuke.stapler.AptMojo.execute (AptMojo.java:22)
>>>         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(
>>> DefaultPluginManager.java:443)
>>>         at
>>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
>>> DefaultLifecycleExecutor.java :539)
>>>         ... 16 more
>>> Caused by: org.codehaus.plexus.compiler.CompilerException: APT failed: 4
>>>         at org.kohsuke.stapler.AptCompiler.compileInProcess(
>>> AptCompiler.java:66)
>>>         at org.kohsuke.stapler.AptCompiler.compile (AptCompiler.java:50)
>>>         at org.kohsuke.stapler.AbstractCompilerMojo.execute(
>>> AbstractCompilerMojo.java:486)
>>>         ... 20 more
>>>
>>>
>>
>>
>

--
Kohsuke Kawaguchi
Sun Microsystems                   [hidden email]

smime.p7s (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Cannot compile trunk

Valeri Felberg
On 8/12/07, Kohsuke Kawaguchi <[hidden email]> wrote:
Stephen Connolly wrote:

> How are you getting it to compile on Linux???
>
> I am still unable to compile on Linux (for some time now)
>
> I've tried updating to Java 1.6.0_02 with no avail!
>
> We have a long standing issue raised in this regard.
>
> The only difference that I see is that you are running SuSE and we are not.
>
> Peter is running Fedora and RHEL4
> I'm running Ubuntu 7.04 (on both amd64 and x86)
> Kohsuke has tried on Ubuntu 7.04
>
> What is going on here.

There are apparently two different errors. One is this
ClassCastException and the other is the infinite recursion problem.

I have an environment to reproduce the latter problem but not the former.

If Valeri or others continues to see the former problem, one thing we
can try is to move the QuickSilver annotation to another module. Looking
at the javac source code, it appears to me that the problem is somehow
Javac creating ClassTypeImpl for QuickSilver whereas it's supposed to
create AnnotationTypeImpl. Moving it to another module would cause this
annotation to be loaded as a binary, so I suspect it will fix the problem.

As I said, I don't see the ClassCastException any more after a fresh checkout (I hadn't updated for a quite long time) but I'll capture the environment the next time I see it.

I've never seen the infinite recursion. You may want to send me the environment to reproduce it so that I compare it with my environment. May be that will somehow help...

>

> -Stephen.
>
> Valeri Felberg wrote:
>>
>> A fresh checkout solves the problem. Sorry for spam.
>>
>> On 8/8/07, Valeri Felberg <[hidden email]> wrote:
>>>
>>> I get the following on SuSE 10.0 with jdk1.6.0_02 and Maven 2.0.7. It
>>> worked some time ago...
>>>
>>> [INFO] [stapler:apt-compile]
>>> [INFO] Compiling 272 source files to
>>> /home/valeri/hudson/hudson/main/core/target/classes
>>> error: Could not create declaration for annotation type QuickSilver
>>> Problem encountered during annotation processing;
>>> see stacktrace below for more information.
>>> java.lang.ClassCastException:
>>> com.sun.tools.apt.mirror.type.ClassTypeImplcannot 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 org.kohsuke.stapler.ExportedBeanAnnotationProcessor.process (
>>> ExportedBeanAnnotationProcessor.java:56)
>>>         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 org.kohsuke.stapler.AptCompiler.compileInProcess (
>>> AptCompiler.java:63)
>>>         at org.kohsuke.stapler.AptCompiler.compile(AptCompiler.java:50)
>>>         at org.kohsuke.stapler.AbstractCompilerMojo.execute(

>>> AbstractCompilerMojo.java:486)
>>>         at org.kohsuke.stapler.CompilerMojo.execute (CompilerMojo.java
>>> :111)
>>>         at org.kohsuke.stapler.AptMojo.execute(AptMojo.java:22)
>>>         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(
>>> DefaultPluginManager.java:443)
>>>         at
>>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals (
>>> DefaultLifecycleExecutor.java:539)
>>>         at
>>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle
>>> (DefaultLifecycleExecutor.java:480)
>>>         at
>>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(
>>> DefaultLifecycleExecutor.java:459)
>>>         at
>>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures
>>> (DefaultLifecycleExecutor.java:311)
>>>         at
>>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments (
>>> DefaultLifecycleExecutor.java:278)
>>>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(
>>> DefaultLifecycleExecutor.java:143)
>>>         at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:334)
>>>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
>>>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:280)
>>>         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] Trace
>>> org.apache.maven.lifecycle.LifecycleExecutionException : Fatal error
>>> compiling
>>>         at
>>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
>>> DefaultLifecycleExecutor.java:564)
>>>         at
>>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle (
>>> DefaultLifecycleExecutor.java:480)
>>>         at
>>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal
>>> (DefaultLifecycleExecutor.java:459)
>>>         at
>>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(
>>> DefaultLifecycleExecutor.java:311)
>>>         at
>>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments (
>>> DefaultLifecycleExecutor.java:278)
>>>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute (
>>> DefaultLifecycleExecutor.java:143)
>>>         at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:334)
>>>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
>>>         at org.apache.maven.cli.MavenCli.main (MavenCli.java:280)
>>>         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)
>>> Caused by: org.apache.maven.plugin.MojoExecutionException : Fatal error
>>> compiling
>>>         at org.kohsuke.stapler.AbstractCompilerMojo.execute(
>>> AbstractCompilerMojo.java:491)
>>>         at
>>> org.kohsuke.stapler.CompilerMojo.execute(CompilerMojo.java:111)
>>>         at org.kohsuke.stapler.AptMojo.execute (AptMojo.java:22)
>>>         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(
>>> DefaultPluginManager.java:443)
>>>         at
>>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
>>> DefaultLifecycleExecutor.java :539)
>>>         ... 16 more
>>> Caused by: org.codehaus.plexus.compiler.CompilerException : APT failed: 4
>>>         at org.kohsuke.stapler.AptCompiler.compileInProcess(
>>> AptCompiler.java:66)
>>>         at org.kohsuke.stapler.AptCompiler.compile (AptCompiler.java:50)
>>>         at org.kohsuke.stapler.AbstractCompilerMojo.execute(
>>> AbstractCompilerMojo.java:486)
>>>         ... 20 more
>>>
>>>
>>
>>
>


--
Kohsuke Kawaguchi
Sun Microsystems                   [hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: Cannot compile trunk

Kohsuke Kawaguchi
Administrator
Valeri Felberg wrote:
> As I said, I don't see the ClassCastException any more after a fresh
> checkout (I hadn't updated for a quite long time) but I'll capture the
> environment the next time I see it.
>
> I've never seen the infinite recursion. You may want to send me the
> environment to reproduce it so that I compare it with my environment. May be
> that will somehow help...

I think what we need to do is to attach the debugger and get some
details so that the compiler team can fix it.

Ideally a reproducible test case is nice.

--
Kohsuke Kawaguchi
Sun Microsystems                   [hidden email]

smime.p7s (4K) Download Attachment