tomcat-java.lang.unsupportedclassversionerror:unsupported Major.minor version 51.0 (unable to load class Com.microsoft . Sqlserver.jdbc.SQLS

Source: Internet
Author: User
Tags stack trace unsupported apache tomcat

Today, when using Tomcat to connect to SQL Server Enterprise, error:

HTTP Status 500-servlet execution threw an exceptiontype Exception reportmessage servlets execution threw an exceptiondes Cription the server encountered an internal error that prevented it from fulfilling this request.exceptionjavax.servlet.Se Rvletexception:servlet execution threw an exceptionspt.servlet.filter.EncodingFilter.doFilter (Encodingfilter.java : () Root causejava.lang.unsupportedclassversionerror:com/microsoft/sqlserver/jdbc/sqlserverdriver:unsupported Major.minor version 51.0 (unable to load class Com.microsoft.sqlserver.jdbc.SQLServerDriver) Org.apache.catalina.loader.WebappClassLoader.findClassInternal (webappclassloader.java:2961) Org.apache.catalina.loader.WebappClassLoader.findClass (webappclassloader.java:1210) Org.apache.catalina.loader.WebappClassLoader.loadClass (webappclassloader.java:1690) Org.apache.catalina.loader.WebappClassLoader.loadClass (webappclassloader.java:1571) Java.lang.ClassLoader.loadClassInternal (classloader.java:320) JAVA.LANG.CLASS.FORNAME0 (Native MethOD) java.lang.Class.forName (class.java:169) spt.server.jdbc.db.BasicDB.getConnection (basicdb.java:260) Spt.server.jdbc.db.BasicDB.getPreparedStatement (basicdb.java:268) Spt.server.jdbc.db.BasicDB.getAQIDayByCityCodeAndDate (basicdb.java:136) Spt.service.AQIDayService.getAQIDay ( aqidayservice.java:33) Spt.servlet.JsonServlet.doPost (jsonservlet.java:34) Spt.servlet.JsonServlet.doGet ( jsonservlet.java:53) Javax.servlet.http.HttpServlet.service (httpservlet.java:620) Javax.servlet.http.HttpServlet.service (httpservlet.java:727) Spt.servlet.filter.EncodingFilter.doFilter ( ENCODINGFILTER.JAVA:24) Note the full stack trace of the root cause are available in the Apache tomcat/7.0.57 logs. Apache tomcat/7.0.57

The JDK version number corresponds to:

J2SE 7 = Wuyi (0x33 hex),

J2SE 6.0 = (0x32 hex),

J2SE 5.0 = (0x31 hex),

JDK 1.4 = 0x30 Hex,

JDK 1.3 = (0x2F hex),

JDK 1.2 = 0x2e Hex,

JDK 1.1 = (0x2D hex).

As a result, the above error is due to Jtds needs jdk7, and the JDK version you are using is not jdk7.

Ref:http://shalousoft.com/go_newsforum.action?op=d3a91dac-6b7c-11e3-8e31-5254001578d1

tomcat-java.lang.unsupportedclassversionerror:unsupported Major.minor version 51.0 (unable to load class Com.microsoft . Sqlserver.jdbc.SQLS

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.