UnsupportedClassVersionError with Vaadin 7 and WAS 6.1

Hello,

  • I am using (have to use) Websphere Application Server 6.1. It uses SDK 1.5
  • I did migration too Vaadin 7, but I’m getting an error: E [Servlet Error]
    -[VaadinApplicationServlet]
    : java.lang.UnsupportedClassVersionError: Bad version number in .class file
  • I read following: “Vaadin 7 applications will work in a Java 5 deployment environment.” See
    ==
    Vaadin 7 has already moved to use GWT 2.4 and will move to newer versions when available. Compiling the widget set in Vaadin 7 will therefore require Java 6. We still plan to maintain Java 5 compatibility for the server side classes so Vaadin 7 applications will work in a Java 5 deployment environment (Java 6 is a compile time requirement, and only for the widget set). We will explore the possibilities to make widget set compilation easy for those stuck on Java 5, e.g. by making the Eclipse plug-in automatically select a Java 6 version when compiling the widget set even though the project is Java 5 based.
    ==
  • I checked the files compiled by myself. They have major version 49 (which should be ok). See
    ==
    JDK 1.5 = 49.0
    JDK 1.6 = 50.0
    ==

My assumption is that Vaadin is compiled with Java 6, which is a problem. Is there also a version with compatibilty to Java 1.5?

Thanks in advance!

Vaadin 7 does not support Java 1.5. You will need to use Vaadin 6 which still supports Java 1.5 or upgrade to a newer WAS.

First of all thanks for your answer. But again: https://vaadin.com/de/blog/-/blogs/951975 says it IS possible to use Vaadin 7 with Java 1.5, or do I get that wrong [“Vaadin 7 applications will work in a Java 5 deployment environment (Java 6 is a compile time requirement, and only for the widget set)”]
. Unfortunately there is no chance to update WAS.

Would it maybe be possible to compile the classes by myself? I checked the classes with ‘javap’. They do contain major version 50 (which is not compatible).

Before I will migrate back to Vaadin 6.x I need to be sure there is no other solution for this.

The blog post is very old, from when just starting the development of Vaadin 7. Since then, many things have happened, including the integration of GWT into Vaadin (including the server side parts and dependencies) which have forced us to move to Java 6 also on the server side.

Thus, Vaadin 6 will remain Java 5 compatible, but Vaadin 7 requires Java 6. The number of Java 5 users of Vaadin is very small by now, but Vaadin 6 will continue to cater for them.

I should note that public updates by Oracle for Java 5 ended in 2009 and premier support ended in 2011, now only the extended support applies. Even Java 6 public updates are ending after February 2013. WebSphere 6.1 support by IBM will end in September.

For the most current information about Vaadin, see the
release notes
.

OK, thanks again. Maybe the linked post (from where I got that informatin) should be corrected.
I’m aware of the support issues with WAS6.1/Java 5, but that’s still the current target platform I need to support…

It is a blog post, and those are rarely edited. I added a comment below the post about this, though.