Error trying to use connection with mysql in Apache Server Tomcat in the Cloud (hibernate)

0

I have an error trying to execute the execution of my web application on a web server called facilcloud (jelastic), my project is working with mysql hibernate, mongodb, java 1.6, spring mvc, bootstrap, maven among other tools.

The problem I have is when I run the application already deployed on the server in the cloud. From the index I try to create a user of the app and it stays stuck because in the apache tomcat log there is an error with the following message, which according to my query refers to the jdk version, but I tried to create a server with the same version of jdk and change the jdk version of my project by means of eclipse and this error continues, thanks for the collaboration.

I attach images of the configuration of my local environment with the versions of jdk that I use to compile and the jdk version of the project itself.

  

INFO:   org.springframework.beans.factory.support.DefaultListableBeanFactory -   Pre-instantiating singletons in   org.springframework.beans.factory.support.DefaultListableBeanFactory@527a9c0f:   defining beans   [org.springframework.context.annotation.internalConfigurationAnnotationProcessor, org.springframework.context.annotation.internalAutowiredAnnotationProcessor, org.springframework.context.annotation.internalRequiredAnnotationProcessor, org.springframework.context.annotation.internalCommonAnnotationProcessor, mongoConfig, org.springframework.context.annotation .ConfigurationClassPostProcessor $ ImportAwareBeanPostProcessor # 0, mongoDbFactory, mongoTemplate];   root of factory hierarchy   test--testt--1234567378--drizzleweb@icloud.com--2002-03-19--1234567890--0   Initial SessionFactory creation   failed.java.lang.UnsupportedClassVersionError:   org / hibernate / cfg / Configuration: Unsupported major.minor version 52.0   (unable to load class org.hibernate.cfg.Configuration)

Configuration of the application in the local development environment:

JDK version with which it is compiled and executed locally, in addition to the version of the Local Web Server:

    
asked by Tavo Ruiz 31.12.2016 в 07:58
source

1 answer

0

According to the documentation :

  

Thrown when the Java Virtual Machine attempts to read a class file and   determines that the major and minor version numbers in the file are   not supported.

In Spanish:

  

It is thrown when the JVM tries to read a file .class and determines   that the minor and major version in the file are not supported.

Initial SessionFactory creation failed.java.lang.UnsupportedClassVersionError:
org/hibernate/cfg/Configuration : Unsupported major.minor version 52.0 (unable 
to load class org.hibernate.cfg.Configuration)

Talk about an error in the version 52.0 (java 8), which according to wikipedia :

  • Java SE 9 = 53
  • Java SE 8 = 52
  • Java SE 7 = 51
  • Java SE 6.0 = 50
  • Java SE 5.0 = 49
  • JDK 1.4 = 48
  • JDK 1.3 = 47
  • JDK 1.2 = 46
  • JDK 1.1 = 45
  • That means that in Jelastic / Facilcloud you are using java 1.8 and according to your images, the local configuration is java 1.6

    Make sure you have the correct versions, this should solve this error.

        
    answered by 04.01.2017 / 18:41
    source