[JSR308] java.lang.NoSuchMethodError:

Mahmood Ali mahmood at MIT.EDU
Fri May 23 19:35:34 EDT 2008


Hi Martin,

JSR308 compiler requires running on at least Java 6.  Can you check  
the version you are running? You can check by running 'java -version'.

Also, Apple just released Java 6 for Mac OS X.  However, I found  
soylatte to be more reliable for command-line applications; it's more  
conforming to Javac behavior.

Regards,
Mahmood

On May 23, 2008, at 7:06 PM, Martín Rouaux wrote:

> Hi,
>   Can anybody help me with this error? I installed the JSR 3008  
> 0.6.1 on a Windows XP. When I try to run the example for  
> NonNullExampleWithWarnings.java I get a NoSuchMethodError
>
> javac -typeprocessor checkers.nonnull.NonNullChecker examples/ 
> NonNullExampleWithWarnings.java
>
> An annotation processor threw an uncaught exception.
> Consult the following stack trace for details.
> java.lang.NoSuchMethodError:  
> javax.annotation.processing.Messager.printMessage(L
> javax/tools/Diagnostic$Kind;Ljava/lang/CharSequence;Lcom/sun/source/ 
> tree/Tree;Lc
> om/sun/source/tree/CompilationUnitTree;)V
>         at checkers.source.SourceChecker.message(SourceChecker.java: 
> 240)
>         at checkers.source.SourceChecker.report(SourceChecker.java: 
> 362)
>         at  
> checkers.basetype.BaseTypeVisitor.commonAssignmentCheck(BaseTypeVisit
> or.java:584)
>         at  
> checkers.basetype.BaseTypeVisitor.commonAssignmentCheck(BaseTypeVisit
> or.java:547)
>         at  
> checkers.basetype.BaseTypeVisitor.commonAssignmentCheck(BaseTypeVisit
> or.java:529)
>         at  
> checkers.basetype.BaseTypeVisitor.visitAssignment(BaseTypeVisitor.jav
> a:121)
>         at com.sun.tools.javac.tree.JCTree 
> $JCAssign.accept(JCTree.java:1463)
>         at  
> com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:67)
>         at  
> checkers.basetype.BaseTypeVisitor.scan(BaseTypeVisitor.java:107)
>         at  
> com.sun.source.util.TreeScanner.visitExpressionStatement(TreeScanner.
> java:239)
>         at com.sun.tools.javac.tree.JCTree 
> $JCExpressionStatement.accept(JCTree.j
> ava:1155)
>         at  
> com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:67)
>         at  
> checkers.basetype.BaseTypeVisitor.scan(BaseTypeVisitor.java:107)
>         at  
> com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:80)
>         at com.sun.source.util.TreeScanner.scan(TreeScanner.java:90)
>         at  
> com.sun.source.util.TreeScanner.visitBlock(TreeScanner.java:159)
>         at com.sun.tools.javac.tree.JCTree 
> $JCBlock.accept(JCTree.java:781)
>         at  
> com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:67)
>         at  
> checkers.basetype.BaseTypeVisitor.scan(BaseTypeVisitor.java:107)
>         at  
> com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:80)
>         at  
> com.sun.source.util.TreeScanner.visitMethod(TreeScanner.java:143)
>         at  
> checkers.basetype.BaseTypeVisitor.visitMethod(BaseTypeVisitor.java:21
> 2)
>         at com.sun.tools.javac.tree.JCTree 
> $JCMethodDecl.accept(JCTree.java:681)
>         at  
> com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:67)
>         at  
> checkers.basetype.BaseTypeVisitor.scan(BaseTypeVisitor.java:107)
>         at  
> com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:80)
>         at com.sun.source.util.TreeScanner.scan(TreeScanner.java:90)
>         at  
> com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:98)
>         at  
> com.sun.source.util.TreeScanner.visitClass(TreeScanner.java:132)
>         at  
> checkers.basetype.BaseTypeVisitor.visitClass(BaseTypeVisitor.java:135
> )
>         at com.sun.tools.javac.tree.JCTree 
> $JCClassDecl.accept(JCTree.java:604)
>         at  
> com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:49)
>         at checkers.source.SourceChecker.process(SourceChecker.java: 
> 189)
>         at  
> com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcess
> or(JavacProcessingEnvironment.java:733)
>         at  
> com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAnd
> RunProcs(JavacProcessingEnvironment.java:662)
>         at  
> com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessin
> g(JavacProcessingEnvironment.java:807)
>         at  
> com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler
> .java:995)
>         at  
> com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:741)
>         at com.sun.tools.javac.main.Main.compile(Main.java:380)
>         at com.sun.tools.javac.main.Main.compile(Main.java:306)
>         at com.sun.tools.javac.main.Main.compile(Main.java:297)
>         at com.sun.tools.javac.Main.compile(Main.java:82)
>         at com.sun.tools.javac.Main.main(Main.java:67)
>
>
> Thanks, Martin.




More information about the JSR308 mailing list