[JSR308] java.lang.NoSuchMethodError

Christian Haack chaack at cs.ru.nl
Sat May 24 05:14:05 EDT 2008


Hi Martin,

I had the same problem when I tried to install the binaries. It worked 
for me when I built from source (both the JSR-308 prototype and the 
checkers) following the installation instructions in the JSR-308 README 
and the checkers documentation.

Christian

jsr308-request at lists.csail.mit.edu wrote:
> Send JSR308 mailing list submissions to
> 	jsr308 at lists.csail.mit.edu
> 
> To subscribe or unsubscribe via the World Wide Web, visit
> 	https://lists.csail.mit.edu/mailman/listinfo/jsr308
> or, via email, send a message with subject or body 'help' to
> 	jsr308-request at lists.csail.mit.edu
> 
> You can reach the person managing the list at
> 	jsr308-owner at lists.csail.mit.edu
> 
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of JSR308 digest..."
> 
> 
> Today's Topics:
> 
>    1. java.lang.NoSuchMethodError: ( Mart?n Rouaux )
>    2. Re: java.lang.NoSuchMethodError: (Mahmood Ali)
>    3. Re: java.lang.NoSuchMethodError: ( Mart?n Rouaux )
> 
> 
> ----------------------------------------------------------------------
> 
> Message: 1
> Date: Fri, 23 May 2008 20:06:44 -0300
> From: " Mart?n Rouaux " <martinfr at gmail.com>
> Subject: [JSR308] java.lang.NoSuchMethodError:
> To: "JSR 308 (Annotations) mailing list" <jsr308 at lists.csail.mit.edu>
> Message-ID:
> 	<a4f601b80805231606n4fb4c534q41f1ac7c6c626977 at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
> 
> 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.
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: https://lists.csail.mit.edu/pipermail/jsr308/attachments/20080523/bb2b7879/attachment-0001.htm 
> 
> ------------------------------
> 
> Message: 2
> Date: Fri, 23 May 2008 19:35:34 -0400
> From: Mahmood Ali <mahmood at MIT.EDU>
> Subject: Re: [JSR308] java.lang.NoSuchMethodError:
> To: "Mart?n Rouaux" <martinfr at gmail.com>
> Cc: "JSR 308 \(Annotations\) mailing list"
> 	<jsr308 at lists.csail.mit.edu>
> Message-ID: <250CD3B2-85F3-4A3F-82C4-BBE0289656D3 at mit.edu>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes
> 
> 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.
> 
> 
> 
> 
> ------------------------------
> 
> Message: 3
> Date: Fri, 23 May 2008 20:42:34 -0300
> From: " Mart?n Rouaux " <martinfr at gmail.com>
> Subject: Re: [JSR308] java.lang.NoSuchMethodError:
> To: "Mahmood Ali" <mahmood at mit.edu>
> Cc: "JSR 308 \(Annotations\) mailing list"
> 	<jsr308 at lists.csail.mit.edu>
> Message-ID:
> 	<a4f601b80805231642s5b2a0b39q9f6ec2fc7c5048b6 at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
> 
> Thanks for the response.  I'm using the last java release, 1.7.
> 
> On Fri, May 23, 2008 at 8:35 PM, Mahmood Ali <mahmood at mit.edu> wrote:
> 
>> 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.
>>>
>>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: https://lists.csail.mit.edu/pipermail/jsr308/attachments/20080523/61e808af/attachment.htm 
> 
> ------------------------------
> 
> _______________________________________________
> JSR308 mailing list
> JSR308 at lists.csail.mit.edu
> https://lists.csail.mit.edu/mailman/listinfo/jsr308
> 
> 
> End of JSR308 Digest, Vol 13, Issue 9
> *************************************




More information about the JSR308 mailing list