Menu

java.lang.VerifyError

Help
dsnpevl
2007-12-31
2013-05-22
  • dsnpevl

    dsnpevl - 2007-12-31

    I've downloaded the Octopus Music API and written a very simple program that tries to create a chord:

    public class Guitar {

        public static void main(String[] args) {
            System.out.println("Hello");
            try {
                Chord chord = new Chord("G7");
            } catch (Exception e) {
                System.out.println("Unable to create chord :(");
                e.printStackTrace();
            }
        }

    }

    Every time I try to start the program, I get:

    Hello
    Exception in thread "main" java.lang.VerifyError: (class: octopus/ChordNotationInterpreter, method: getValidChordName signature: (Ljava/lang/String;)Loctopus/ValidChordName;) Incompatible object argument for function call
        at octopus.Chord.<clinit>(Chord.java:45)
        at nl.fotografeer.guitar.Guitar.main(Guitar.java:14)

    Can you tell me what I'm doing wrong?

     
    • dsnpevl

      dsnpevl - 2008-01-01

      Found a workaround to stop the VerifyError from occurring. Just add this to the VM arguments:

      -noverify

       
    • dsnpevl

      dsnpevl - 2008-01-10

      Actually, it is better to use:

      -Xverify:none

      The -noverify arguments works from a java application, but not if you want to define a VM argument in a RCP product build. The -Xverify:none argument works for both.

       

Log in to post a comment.