• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

UnsupportedClassVersionError

 
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Getting error
java.lang.UnsupportedClassVersionError: org/apache/jsp/jsp/index_jsp

Problem shd be my environment variables or version incompatibility between jdk and oracle

Path
C:\Oracle\product\10.1.0\Client_1\bin;C:\Oracle\product\10.1.0\Client_1\jre\1.4.2\bin\client;C:\Oracle\product\10.1.0\Client_1\jre\1.4.2\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\GemPlus\GemSafe Libraries User\Bin;C:\Program Files\Microsoft SQL Server\80\Tools\BINN

CLASSPATH
C:\Program Files\jakarta-tomcat-5.0.28\webapps\cvisit\WEB-INF\lib\activation.jar;C:\Program Files\jakarta-tomcat-5.0.28\webapps\cvisit\WEB-INF\lib\common_java.jar;C:\Program Files\jakarta-tomcat-5.0.28\webapps\cvisit\WEB-INF\lib\commons-dbcp-1.2.1.jar;C:\Program Files\jakarta-tomcat-5.0.28\webapps\cvisit\WEB-INF\lib\commons-lang-2.1.jar;C:\Program Files\jakarta-tomcat-5.0.28\webapps\cvisit\WEB-INF\lib\commons-logging.jar;C:\Program Files\jakarta-tomcat-5.0.28\webapps\cvisit\WEB-INF\lib\commons-pool-1.2.jar;C:\Program Files\jakarta-tomcat-5.0.28\webapps\cvisit\WEB-INF\lib\CuisBeans.jar;C:\Program Files\jakarta-tomcat-5.0.28\webapps\cvisit\WEB-INF\lib\jcommon-1.0.0-rc1.jar;C:\Program Files\jakarta-tomcat-5.0.28\webapps\cvisit\WEB-INF\lib\mail.jar;C:\Program Files\jakarta-tomcat-5.0.28\webapps\cvisit\WEB-INF\lib\servlet.jar;C:\Program Files\jakarta-tomcat-5.0.28\webapps\cvisit\WEB-INF\lib\servlet-api.jar;C:\Program Files\jakarta-tomcat-5.0.28\webapps\cvisit\WEB-INF\lib\struts.jar;C:\Program Files\jakarta-tomcat-5.0.28\webapps\cvisit\WEB-INF\lib\strutscommons.jar;C:\Program Files\jakarta-tomcat-5.0.28\webapps\cvisit\WEB-INF\lib\tools.jar;C:\Program Files\jakarta-tomcat-5.0.28\webapps\cvisit\WEB-INF\lib\userlookup.jar;C:\Program Files\jakarta-tomcat-5.0.28\webapps\cvisit\WEB-INF\lib\wssolite-filter.jar;C:\Program Files\jakarta-tomcat-5.0.28\webapps\cvisit\WEB-INF\lib\classes12.zip

JAVA_HOME
C:\Oracle\product\10.1.0\Client_1\jdk

Versions
JDK version in Oracle - JDK 1.4.2
Tomcat runs using JAVA_HOME, so uses jdk 1.4.2

Can you please help me in finding out wats the problem and how to solve the same
 
author and iconoclast
Posts: 24203
43
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
THis is just the obvious JDK1.5/JDK1.4 confusion, but the proper fix may be Tomcat-specific, so I'm going to move this to our Tomcat forum.
 
Anjana Ravindran
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Problem is fixed. But i am quite puzzled by this behavior. Please help me in reasoning out.

I have jdk 3 places in my places
1. One i downloaded earlier - C:\j2sdk1.4.2 (jdk version - 1.4.2)
2. Another got installed on installing oracle - C:\Oracle\product\10.1.0\Client_1\jdk (jdk version 1.4.2)
3. Another got installed on installing j2ee sdk - C:\Sun\AppServer\jdk (jdk version 5.0)

I have 2 environment variables pointing to jdk - Path and JAVA_HOME

I am trying to run a web application which runs on tomcat server. Tomcat refers JAVA_HOME variable for jdk reference. Oracle uses Path environment variable for jdk reference.
I like to have both of them to point to same jdk so there wont be any problem.

If i make both of them to point to Oracle jdk as given below
Path - C:\Oracle\product\10.1.0\Client_1\bin;
JAVA_HOME - C:\Oracle\product\10.1.0\Client_1\jdk

Oracle is working and my web application gives the following error
java.lang.UnsupportedClassVersionError: org/apache/jsp/jsp/index_jsp (Unsupported major.minor version 49.0)

If i make changes as given below,
Path - C:\Oracle\product\10.1.0\Client_1\bin;
JAVA_HOME - C:\Sun\AppServer\jdk
Both Oracle and web application is working.

Please let me know why it is giving error saying unsupported version if i make both of them same.
 
Ranch Hand
Posts: 809
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Such type of problem come when the version of compiler and interpreter is not same.

Naseem
 
Anjana Ravindran
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do i find the version of compiler and interpreter? Just like to know whats really going on.
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
On *nix boxes, I use the "which" command and look at the path:
The 'java' command has a -version option.
 
Roses are red, violets are blue. Some poems rhyme and some don't. And some poems are a tiny ad.
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic