Skip to content

Unsupported major.minor version 51.0 #3

@albertvalles2-zz

Description

@albertvalles2-zz

Hi,

We are having issues running an old tomcat with jdk 6.

Caused by: java.lang.UnsupportedClassVersionError: com/matthewcasperson/validation/filter/ParameterValidationFilter : Unsupported major.minor version 51.0 (unable to load class com.matthewcasperson.validation.filter.ParameterValidationFilter) at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2893) at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1170) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1678) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1556) at org.apache.catalina.startup.WebAnnotationSet.loadClass(WebAnnotationSet.java:480) at org.apache.catalina.startup.WebAnnotationSet.loadApplicationFilterAnnotations(WebAnnotationSet.java:101) at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:65) at org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:381) at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:858) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:345) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5161) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) ... 11 more

We tried compiling source code with java 6 but still having problems with signing plugin and some other compile errors:

warning: javax\servlet\Filter.class(javax\servlet:Filter.class): major version 51 is newer than 50, the highest major version supported by this compiler. It is recommended that the compiler be upgraded. warning: javax\servlet\FilterChain.class(javax\servlet:FilterChain.class): major version 51 is newer than 50, the highest major version supported by this compiler. It is recommended that the compiler be upgraded. warning: javax\servlet\FilterConfig.class(javax\servlet:FilterConfig.class): major version 51 is newer than 50, the highest major version supported by this compiler. It is recommended that the compiler be upgraded. warning: javax\servlet\ServletException.class(javax\servlet:ServletException.class): major version 51 is newer than 50, the highest major version supported by this compiler. It is recommended that the compiler be upgraded. warning: javax\servlet\ServletRequest.class(javax\servlet:ServletRequest.class): major version 51 is newer than 50, the highest major version supported by this compiler. It is recommended that the compiler be upgraded. warning: javax\servlet\ServletResponse.class(javax\servlet:ServletResponse.class): major version 51 is newer than 50, the highest major version supported by this compiler. It is recommended that the compiler be upgraded. warning: javax\servlet\http\HttpServletRequest.class(javax\servlet\http:HttpServletRequest.class): major version 51 is newer than 50, the highest major version supported by this compiler. It is recommended that the compiler be upgraded. warning: javax\servlet\http\HttpServletResponse.class(javax\servlet\http:HttpServletResponse.class): major version 51 is newer than 50, the highest major version supported by this compiler. It is recommended that the compiler be upgraded. C:\Users\...\Documents\git\ParameterValidationFilter\src\main\java\com\matthewcasperson\validation\filter\ParameterValidationFilter.java:53: cannot access com.google.common.base.Preconditions bad class file: com\google\common\base\Preconditions.class(com\google\common\base:Preconditions.class) class file has wrong version 52.0, should be 50.0 Please remove or make sure it appears in the correct subdirectory of the classpath. import static com.google.common.base.Preconditions.checkState; ^ :compileJava FAILED

downgrading to guavaVersion = '12.0' still produces compile errors like import static com.google.common.base.Preconditions.checkState;
......

Is it possible to do what we aim? Any suggestions?

thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions