1
java.lang.VerifyError: Expecting a stackmap frame at branch target 11 in method
tests.FieldTest.<init>()V at offset 4
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:190)

anybody got an idea?

build.xml

<?xml version="1.0" encoding="UTF-8"?>
<project name="TicTacToe" default="jar" basedir=".">

    <property name="src.dir" value="${basedir}/src" />
    <property name="src.dir.tests" value="${src.dir}/tests" />

    <property name="lib.dir" value="${basedir}/lib" />
    <property name="lib.dir.compile" value="${lib.dir}/compile" />
    <property name="lib.dir.test" value="${lib.dir}/test" />

    <property name="target.dir" value="${basedir}/target" />
    <property name="target.dir.classes" value="${target.dir}/classes" />
    <property name="target.dir.test.classes" value="${target.dir}/test-classes" />
    <property name="target.dir.test.reports" value="${target.dir}/test-reports" />
    <property name="target.dir.test.coverage" location="${target.dir}/coverage" />
    <property name="target.dir.test.coverage.meta" location="${target.dir}/coverage/metadata" />
    <property name="target.dir.test.instrumentation" location="${target.dir}/instr-classes" />
    <property name="target.dir.doc" value="${target.dir}/doc" />

    <path id="project.classpath">
        <fileset dir="${lib.dir.compile}" includes="*.jar" />
    </path>

    <path id="path.classes.run">
        <path refid="project.classpath" />
        <path location="${target.dir.classes}" />
    </path>

    <path id="path.test.run">
        <path refid="path.classes.run" />
        <path location="target.dir.test.classes" />
    </path>

    <target name="clean">
        <delete dir="${target.dir}" />
    </target>

    <target name="prepare">
        <mkdir dir="${target.dir}" />
        <mkdir dir="${target.dir.classes}" />
        <mkdir dir="${target.dir.classes}" />
        <mkdir dir="${target.dir.doc}" />
        <mkdir dir="${target.dir.test.classes}" />
        <mkdir dir="${target.dir.test.reports}" />
        <mkdir dir="${target.dir.test.coverage}" />
        <mkdir dir="${target.dir.test.coverage.meta}" />
        <mkdir dir="${target.dir.test.instrumentation}" />
    </target>

    <target name="prebuild.classes">
        <javac srcdir="${src.dir}" destdir="${target.dir.classes}" excludes="${src.dir.tests}" classpathref="project.classpath" includeantruntime="false" />
    </target>

    <target name="prebuild.test" depends="prebuild.classes">
        <javac srcdir="${src.dir.tests}" destdir="${target.dir.test.classes}" classpathref="path.classes.run" includeantruntime="false" />
    </target>

    <property name="emma.dir" value="/home/tebbje/emma/lib" />
    <property name="emma.enabled" value="true" />

    <path id="emma.lib">
        <pathelement location="${emma.dir}/emma.jar" />
        <pathelement location="${emma.dir}/emma_ant.jar" />
    </path>

    <taskdef resource="emma_ant.properties" classpathref="emma.lib" />

    <target name="reports" depends="prebuild.test">

        <copy todir="${target.dir.test.instrumentation}">
            <fileset dir="${target.dir.test.classes}" />
        </copy>

        <emma enabled="${emma.enabled}">
            <instr instrpath="${target.dir.test.instrumentation}" metadatafile="${target.dir.test.coverage.meta}/metadata.emma" merge="true" mode="overwrite" />
        </emma>

        <junit printsummary="yes" fork="true" haltonfailure="no">
            <classpath>
                <pathelement location="${target.dir.test.coverage.instrumentation}" />
                <pathelement location="${target.dir.test.classes}" />
                <path refid="path.test.run" />

                <path refid="emma.lib" />

            </classpath>
            <!--
            <jvmarg value="-Demma.coverage.out.file=${target.dir.test.coverage.meta}/metadata.emma" />
            <jvmarg value="-Demma.coverage.out.merge=true" />
            //-->
            <formatter type="xml" />
            <formatter type="plain" />

            <batchtest todir="${target.dir.test.reports}">
                <fileset dir="${src.dir}">
                    <include name="**/*Test.java" />
                </fileset>
            </batchtest>
        </junit>

        <junitreport tofile="TESTS-TestSuites.xml" todir="${lib.dir.test}">
            <fileset dir="${lib.dir.test}">
                <include name="TEST-*.xml" />
            </fileset>
            <report format="frames" todir="${lib.dir.test}" />
        </junitreport>
        <!--
        <emma enabled="${emma.enabled}">
            <report sourcepath="${src.dir}">
                <fileset dir="${target.dir.test.coverage.meta}">
                    <include name="*.emma" />
                </fileset>
                <txt outfile="./reports/coverage/coverage.txt" />
                <html outfile="./reports/coverage/coverage.html" depth="class" />
            </report>
        </emma>
//-->
    </target>

    <target name="javadoc.generate">
        <javadoc packagenames="*" sourcepath="${src.dir}" destdir="${target.dir.doc}" classpathref="project.classpath" />
    </target>

    <target name="javadoc" depends="javadoc.generate">
        <jar destfile="${target.dir}/${ant.project.name}-javadoc.jar" basedir="${target.dir.doc}" />
    </target>

    <target name="sources">
        <jar destfile="${target.dir}/${ant.project.name}-sources.jar" basedir="${src.dir}" />
    </target>

    <target name="jar">
        <echo message="Project looks good! Deploy JAR..." />

        <jar destfile="${target.dir}/${ant.project.name}.jar" basedir="${target.dir.classes}">
            <manifest>
                <attribute name="Main-Class" value="control.Control" />
            </manifest>
            <zipgroupfileset dir="./lib/compile" includes="**/*.jar" />
        </jar>
    </target>

</project>
Alex Tape
  • 2,291
  • 4
  • 26
  • 36
  • check out http://stackoverflow.com/questions/15122890/java-lang-verifyerror-expecting-a-stackmap-frame-at-branch-target-jdk-1-7 There are lots of other questions regarding verify error on Stackk overflow – Peter Schuetze Jan 29 '14 at 14:14
  • but they do not solve my question ;) – Alex Tape Jan 29 '14 at 14:15
  • yes. i did not solved that issue.. so i tried jacoco which is working right now. but why emma won´t run - i still dont know.. – Alex Tape Jan 29 '14 at 18:52
  • 1
    There are lots of comments in regards of this error and Java 1.7. Solutions range from going back to 1.6, requesting new fixed libraries that were build with java 1.6 and using a compiler directive that is by now deprecated by oracle. – Peter Schuetze Jan 29 '14 at 20:14
  • yes i know. i dont want to use deprecated directive. nor java 1.6. nor the other approaches fixed my sickness ;) so topic on hold and further steps with jacoco.. :) but thanks for you attention! – Alex Tape Jan 29 '14 at 20:50

1 Answers1

1

Why you do use Emma and not Jacoco? Jacoco works mostly out of the box and is still in development. Emma is not going further i think.

https://wiki.jenkins-ci.org/display/JENKINS/JaCoCo+Plugin

m3ta
  • 58
  • 8