java.lang.UnsupportedClassVersionError

Error:

Caused by: java.lang.UnsupportedClassVersionError: Bad version number in .class file (unable to load class com.microsoft.sqlserver.jdbc.SQLServerDriver)


I am using  java 1.5 &  sqljdbc.jar to connect to sql server 2005 database

Could you please tell what might have gone wrong ?
cofactorAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

CEHJCommented:
Check that the Java version of the driver is not > 1.5
cofactorAuthor Commented:
>>>Check that the Java version of the driver is not > 1.5

How do I do that ?  I just have the sqljdbc.jar file only.  

 Is there any way to check the Java version of this driver ? Please let me know.
cofactorAuthor Commented:
I see this link from microsoft site..

https://msdn.microsoft.com/en-us/library/ms378422(v=sql.110).aspx

it says sqljdbc.jar   does work in jdk 5

So where is the issue ?


Here is the full stacktrace of this issue:

Failed to obtain DB connection from data source 'testDS': org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class 'com.microsoft.sqlserver.jdbc.SQLServerDriver'<br/>
org.quartz.JobPersistenceException: Failed to obtain DB connection from data source 'testDS': org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class 'com.microsoft.sqlserver.jdbc.SQLServerDriver' [See nested exception: org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class 'com.microsoft.sqlserver.jdbc.SQLServerDriver']
	at org.quartz.impl.jdbcjobstore.JobStoreSupport.getConnection(JobStoreSupport.java:575)
	at org.quartz.impl.jdbcjobstore.JobStoreTX.getTriggerGroupNames(JobStoreTX.java:732)
	at org.quartz.core.QuartzScheduler.getTriggerGroupNames(QuartzScheduler.java:1135)
	at org.quartz.impl.StdScheduler.getTriggerGroupNames(StdScheduler.java:511)
	at com.pwc.cee.pais.app.global.commonutil.QuartzScheduler.cleanUp(QuartzScheduler.java:41)
	at com.pwc.cee.pais.app.global.commonutil.QuartzScheduler.run(QuartzScheduler.java:74)
	at com.pwc.cee.pais.web.global.servlet.PwcInitServlet.setMailScheduler(PwcInitServlet.java:144)
	at com.pwc.cee.pais.web.global.servlet.PwcInitServlet.init(PwcInitServlet.java:44)
	at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1139)
	at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:966)
	at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3996)
	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4266)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
	at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
	at org.apache.catalina.core.StandardService.start(StandardService.java:448)
	at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
* Nested Exception (Underlying Cause) ---------------
org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class 'com.microsoft.sqlserver.jdbc.SQLServerDriver'
	at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:766)
	at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540)
	at org.quartz.utils.PoolingConnectionProvider.getConnection(PoolingConnectionProvider.java:172)
	at org.quartz.utils.DBConnectionManager.getConnection(DBConnectionManager.java:111)
	at org.quartz.impl.jdbcjobstore.JobStoreSupport.getConnection(JobStoreSupport.java:553)
	at org.quartz.impl.jdbcjobstore.JobStoreTX.getTriggerGroupNames(JobStoreTX.java:732)
	at org.quartz.core.QuartzScheduler.getTriggerGroupNames(QuartzScheduler.java:1135)
	at org.quartz.impl.StdScheduler.getTriggerGroupNames(StdScheduler.java:511)
	at com.pwc.cee.pais.app.global.commonutil.QuartzScheduler.cleanUp(QuartzScheduler.java:41)
	at com.pwc.cee.pais.app.global.commonutil.QuartzScheduler.run(QuartzScheduler.java:74)
	at com.pwc.cee.pais.web.global.servlet.PwcInitServlet.setMailScheduler(PwcInitServlet.java:144)
	at com.pwc.cee.pais.web.global.servlet.PwcInitServlet.init(PwcInitServlet.java:44)
	at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1139)
	at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:966)
	at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3996)
	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4266)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
	at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
	at org.apache.catalina.core.StandardService.start(StandardService.java:448)
	at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
Caused by: java.lang.UnsupportedClassVersionError: Bad version number in .class file (unable to load class com.microsoft.sqlserver.jdbc.SQLServerDriver)
	at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1964)
	at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:933)
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1405)
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1284)
	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:164)
	at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:760)
	... 28 more

Open in new window

Introduction to Web Design

Develop a strong foundation and understanding of web design by learning HTML, CSS, and additional tools to help you develop your own website.

cofactorAuthor Commented:
comments please.
CEHJCommented:
To be certain, extract the driver to a temporary directory first

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
cofactorAuthor Commented:
Excellent
CEHJCommented:
:)
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java

From novice to tech pro — start learning today.