You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Seshumadhav Chaturvedula <se...@yahoo.com.INVALID> on 2014/06/16 08:45:28 UTC

Major Minor Version issue when using jersey 2.9 with tomcat7 + java8

Resending previous email in plain text:

We have a maven project to develop a jersey 2.0 REST service, on Eclipse (kepler)
    <dependency>
      <groupId>org.glassfish.jersey.containers</groupId>
      <artifactId>jersey-container-servlet-core</artifactId>
      <version>2.9.1</version>
    </dependency>

In conjunction with:
- java8
- tomcat7

When deploying the web application (using `$ mvn install && mvn -X tomcat7:redeploy`) we get the below exception:
Caused by: java.lang.UnsupportedClassVersionError: org/glassfish/jersey/servlet/init/JerseyServletContainerInitializer : Unsupported major.minor version 51.0 (unable to load class org.glassfish.jersey.servlet.init.JerseyServletContainerInitializer)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2840)

1. I examined the MANIFEST file in the org.glassfish.jersey.containers jar, & (as suspected) it says built on 1.7 JDK
2. Tomcat logs confirm that it uses java8 itself

We cannot move back to java8.  Is there a way/hack we can get past this error?
---
smc

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Major Minor Version issue when using jersey 2.9 with tomcat7 + java8

Posted by Konstantin Kolinko <kn...@gmail.com>.
2014-06-16 10:45 GMT+04:00 Seshumadhav Chaturvedula
<se...@yahoo.com.invalid>:
> Resending previous email in plain text:
>
> We have a maven project to develop a jersey 2.0 REST service, on Eclipse (kepler)
>     <dependency>
>       <groupId>org.glassfish.jersey.containers</groupId>
>       <artifactId>jersey-container-servlet-core</artifactId>
>       <version>2.9.1</version>
>     </dependency>
>
> In conjunction with:
> - java8
> - tomcat7
>
> When deploying the web application (using `$ mvn install && mvn -X tomcat7:redeploy`) we get the below exception:
> Caused by: java.lang.UnsupportedClassVersionError: org/glassfish/jersey/servlet/init/JerseyServletContainerInitializer : Unsupported major.minor version 51.0 (unable to load class org.glassfish.jersey.servlet.init.JerseyServletContainerInitializer)
> at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2840)
>
> 1. I examined the MANIFEST file in the org.glassfish.jersey.containers jar, & (as suspected) it says built on 1.7 JDK
> 2. Tomcat logs confirm that it uses java8 itself
>
> We cannot move back to java8.  Is there a way/hack we can get past this error?

1. What exact version of Tomcat 7.0.x are you using? x=?
2. What exact version of Java 8 are you using?
3. 51.0 = Java 7. There shall be no problem loading that class.
(Unless Tomcat 7 is run with Java 6).

4. Full stacktrace for that classloader error, with line numbers = ?

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org