wkennedy/swagger4spring-web-example

Java version

Closed this issue · 1 comments

Hi, I have tried to clone swagger4spring-web-example and run it in tomcat7 but I am getting one of two errors:

Unsupported major.minor version 52.0
Unsupported major.minor version 51.0

(org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping#0': Invocation of init method failed; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Error loading class [com.knappsack.swagger4springweb.controllers.ExampleDocumentationController] for bean with name 'exampleDocumentationController' defined in file [/var/lib/tomcat7/webapps/swagger4springweb-example-1.0.0-BUILD-SNAPSHOT/WEB-INF/classes/com/knappsack/swagger4springweb/controllers/ExampleDocumentationController.class]: problem with class file or dependent class; nested exception is java.lang.UnsupportedClassVersionError: com/knappsack/swagger4springweb/controllers/ExampleDocumentationController : Unsupported major.minor version 51.0 (unable to load class com.knappsack.swagger4springweb.controllers.ExampleDocumentationController))

I have tried to run with Java 7 and 8 and both get this error.

Any ideas?

Thanks

Steve

Can be closed:

I managed to get things running using Java 8, I had to upgrade from Apache Tomcat 7.0.26 to 7.0.55 which seemed to resolve the issue.

This was related with tomcat 7.0.26: https://bugzilla.redhat.com/show_bug.cgi?id=1080026