java.lang.VerifyError when using vaadin and vaadin-server

For a project I am working on, which depends on vaadin-6.8.12, I would like to use the Page/JavaScript classes included in the vaadin-server-7.0.6 JAR.
However, when I include vaadin-server, I get a java.lang.VerifyError when attempting to use the Page.getCurrent() method.

To illustrate this, I wrote a small test program which exhibits the same behaviour:

import com.vaadin.server.Page;

public class Main
public static void main(String args)
Page page = Page.getCurrent();
I have set the classpath in a file (the JAR files and Main.class are in the same folder):

Then run the program like this:

java -cp $(cat vaadin.classpath):. Main
When run, I get the following error:

Exception in thread “main” java.lang.VerifyError: (class:
com/vaadin/server/Page, method: getJavaScript signature:
()Lcom/vaadin/ui/JavaScript;) Incompatible argument to function
at Main.main(
However if I reverse the order of vaadin-6.8.12 and vaadin-server-7.0.6, I do not get the java.lang.VerifyError.
VidMate AnyDesk

I have tried the same test for different versions of vaadin and vaadin-server, always with the same result as above.

vaadin is not listed as dependency of vaadin-server (and vice-versa) in the maven POM. Im am using JDK version 1.6.0_32. Does anyone know what could be causing this?
Many thanks.