Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem of UnsupportedClassVersionError

 
Shyam Sunder
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi Friends,

i have downloaded a sample project form roseindia.
and copy pasted the whole folder in webapps.
but when i tried to run application. i am getting this error which i have taken from tomcat logs


java.lang.UnsupportedClassVersionError: roseindia/dao/SpringHibernateDAOImpl (Unsupported major.minor version 49.0)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1634)
at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:860)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1307)
at
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is an exception that occurs when classes are compiled with a higher version of the Java SDK (e.g. 1.6) and then you attempt to run them on a lower version (e.g. 1.4). The solution is to recompile the classes with the same Java SDK you will be using at runtime.
[ July 19, 2007: Message edited by: Merrill Higginson ]
 
Ram Chhabra
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Shyam

This error comes due to difference in JDk version.

I am not sure but this error comes like if you try to run files which are compiled on jdk 1.5 to some lower version like jdk 1.4. or this may be vice - versa .

So please check your jdk version and after changing to that it will surely work.

I am sorry that i am confused about that, so please forgive me for that.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic