NPE when generating benchmark code

Mark Price Mark.Price at lmax.com
Wed May 21 12:41:43 UTC 2014


Hi Aleksey,
thanks for the response.

ant version is 1.9.2
java version is 1.6.0_37

the ant file is embarrassingly tangled, but it boils down to:

<javac srcdir="src/test/java" destdir="build/test/classes" debug="on" fork="yes" encoding="UTF-8" target="1.6"
                   source="1.6" debuglevel="lines,source,vars" deprecation="on" includeantruntime="no" memorymaximumsize="256m">
                <compilerarg value="-Xlint:unchecked"/>
                <compilerarg value="-XDignore.symbol.file"/>
                <compilerarg value="-s"/>
                <compilerarg value="build/test/classes"/>
                <classpath>
                    <path refid="${@{module}.@{artifact}.conf.compile}-path"/>
                    <extra-classpath/>
                </classpath>
            </javac>




Mark

----- Original Message -----
> Hi Mark,
> 
> On 05/21/2014 03:51 PM, Mark Price wrote:
> > Hi, I'm using JMH in the non-recommended ant mode, and seeing an
> > exception while compiling my benchmark.
> 
> Just checked our jmh-ant-sample and it works, which means the problem is
> specific to your scenario. The attachments were scrubbed, but I got them
> in the moderator note. Can you publish the Ant build file as well? "ant
> -v" and "java -version" would also be appreciated.
> 
> These lines are important:
> 
> > [javac] error: Compiler control generators had thrown the unexpected
> > exception java.lang.NullPointerException
> ...
> > [javac] 	at
> > org.openjdk.jmh.generators.core.CompilerControlPlugin.process(CompilerControlPlugin.java:67)
> 
> That's a separate @CompilerControl processor, and this is why the
> benchmark is still generated.
> 
> > though it seems to generate a file for the single benchmark that I
> > have included (attached, along with original benchmark source).
> 
> No need to publish the generated source.
> 
> Thanks,
> -Aleksey.
> 


More information about the jmh-dev mailing list