?
Solved

java.lang.UnsupportedClassVersionError: com/sun/tools/javac/Main (Unsupported major.minor version 48.0) what is this?!

Posted on 2003-03-31
26
Medium Priority
?
1,564 Views
Last Modified: 2012-06-21
i encountered this error suddenly.
Not really sure what's went wrong. Some of my jsp pages which i did previously have this errors also.
But some still works fine. Can anyone please help me with this?
Really dont understand what this exception means.
javax.servlet.ServletException: com/sun/tools/javac/Main (Unsupported major.minor version 48.0)
      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:432)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:386)
      at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:534)
      at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:530)
      at java.lang.Thread.run(Thread.java:484)


root cause

java.lang.UnsupportedClassVersionError: com/sun/tools/javac/Main (Unsupported major.minor version 48.0)
      at java.lang.ClassLoader.defineClass0(Native Method)
      at java.lang.ClassLoader.defineClass(ClassLoader.java:486)
      at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:111)
      at java.net.URLClassLoader.defineClass(URLClassLoader.java:248)
      at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
      at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
      at org.apache.catalina.loader.StandardClassLoader.findClass(StandardClassLoader.java:621)
      at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:958)
      at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:857)
      at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Class.java:120)
      at org.apache.tools.ant.taskdefs.compilers.CompilerAdapterFactory.doesModernCompilerExist(CompilerAdapterFactory.java:173)
      at org.apache.tools.ant.taskdefs.compilers.CompilerAdapterFactory.getCompiler(CompilerAdapterFactory.java:131)
      at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:833)
      at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:682)
      at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:308)
      at org.apache.jasper.compiler.Compiler.compile(Compiler.java:352)
      at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:474)
      at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:184)
      at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:432)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:386)
      at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:534)
      at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:530)
      at java.lang.Thread.run(Thread.java:484)

0
Comment
Question by:iCeFiRe
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 13
  • 11
  • +1
26 Comments
 

Author Comment

by:iCeFiRe
ID: 8237249
and some of the page, which are not working, doesnt involve jsp at all
one of them is the login page

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>de-conexion Login</title>
<link rel="stylesheet" type="text/css" href="../conexion.css">
</head>
<body>
<%@ include file ="../htm/top.htm" %>
<%@ include file="../htm/left.htm"%>
<h1 align="left" class = "BigTitle">Login Page</h1>
<p align="left">&nbsp;</p>
<div align="center">
  <center>
  <table border="0">
    <tr>
      <td class="smallTextsFade">Not yet a member? <a href="frmRegMem.jsp">SignUp</a> for FREE now.</td>
    </tr>
     </table>
  <table border="0">
<form method = "post" action="processLogin.jsp">
    <tr>
      <td class="smallTextsFade">Email:</td>
      <td><input type="text" name="email" size="20" class="smallTextsFade"></td>
    </tr>
    <tr>
      <td class="smallTextsFade">Password:</td>
      <td><input type="password" name="password" size="20" class="smallTextsFade"></td>
    </tr>
    <tr>
      <td colspan="2">
        <p align="center"><input type="submit" value="Login" name="Submit"> <input type="reset" value="Reset" name="Reset"></td>
    </tr>
</form>
  </table>

</center>
</div>

<p align="center"><a href="http://forgetpass.htm">&nbsp;&nbsp;&nbsp;
&gt;&gt;Forget Password?</a></p>

</body>

</html>

this is the code for my login.jsp
0
 
LVL 4

Expert Comment

by:thanassis
ID: 8237266
The problem you have is caused (I am pretty sure) because your java versions are probably out of sync.

It is possible that tomcat isn't fully compatible with jdk version you use.
0
 
LVL 19

Expert Comment

by:cheekycj
ID: 8238418
try reverting to jdk 1.3.1

CJ
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 14

Expert Comment

by:kennethxu
ID: 8240930
you might have multiple version of jdk installed, uninstall all of them and re-install only one jdk.

BTW, which version of tomcat are you using?
0
 

Author Comment

by:iCeFiRe
ID: 8242396
i am using tom-cat 4.1.18
but all the while i am fine with it. how come?
how to uninstall jdk?
0
 
LVL 14

Expert Comment

by:kennethxu
ID: 8242519
>> how to uninstall jdk?
go to control panel, add/remove programs in windows platform.

when you download tomcat. there are 2 version, one version is for jdk1.4, which version did you downloaded?
0
 

Author Comment

by:iCeFiRe
ID: 8242594
i downloaded j2sdk-1_4_1_01-windows-i586.exe
jdk1.4
but when i install my tomcat
it keeps on prompting me that it found a jdk1.3.1 in my c:
0
 
LVL 14

Expert Comment

by:kennethxu
ID: 8242689
you should download LE-jdk14 version of tomcat
http://jakarta.apache.org/builds/jakarta-tomcat-4.0/archives/v4.1.18/bin/jakarta-tomcat-4.1.18-LE-jdk14.exe

did you tried to remove the 1.3 jdk from control panel?
0
 

Author Comment

by:iCeFiRe
ID: 8242706
ya.
i remove it
but it still there in the c: folder after i removed from program using control panel.
what i should use for jdk?
1.4.1_02 or 01?
0
 

Author Comment

by:iCeFiRe
ID: 8242741
ya.
i remove it
but it still there in the c: folder after i removed from program using control panel.
what i should use for jdk?
1.4.1_02 or 01?
0
 

Author Comment

by:iCeFiRe
ID: 8242747
but no matter how i remove the folder. and downloaded the tomcat u recommend
it still not working.
even i tried installing the tomcat u mentioned. it also prompt jdk found, C:\jdk1.3.1
but i couldnt see any jdk1.3.1 in control panel, add/remove program
0
 

Author Comment

by:iCeFiRe
ID: 8242764
but no matter how i remove the folder. and downloaded the tomcat u recommend
it still not working.
even i tried installing the tomcat u mentioned. it also prompt jdk found, C:\jdk1.3.1
but i couldnt see any jdk1.3.1 in control panel, add/remove program
0
 
LVL 14

Expert Comment

by:kennethxu
ID: 8242923
go to control panel, system, check the environment vars
JAVA_HOME
PATH
take out the jdk1.3.1

>> 1.4.1_02 or 01
get the latest one, i think it's 1.4.1_02 now.
0
 

Author Comment

by:iCeFiRe
ID: 8242942
where can i find the environment vars?
i go to system
but cannot see environment vars
or java_home and path
0
 
LVL 14

Expert Comment

by:kennethxu
ID: 8242963
there is button near the bottom of advanced tab in windows XP, cannot remember where it is in other windws OS. look around, it must be there.
0
 

Author Comment

by:iCeFiRe
ID: 8243014
i am using window me
there is no advance tab in system
0
 
LVL 14

Expert Comment

by:kennethxu
ID: 8243035
for windows ME, check your env setting in autoexec.bat
you need to restart window for your change to take effect.
0
 
LVL 14

Expert Comment

by:kennethxu
ID: 8243042
sorry, i was thinking it is at least Windows NT :)
0
 

Author Comment

by:iCeFiRe
ID: 8243077
oh...it's ok. i also wondering why my company will choose windows ME
0
 
LVL 14

Accepted Solution

by:
kennethxu earned 200 total points
ID: 8243092
the steps should be:
1. install jdk1.4.1
2. edit c:\autoexec.bat make sure
JAVA_HOME=C:\JDK1.4.1 (where you install jdk)
PATH includes C:\JDK1.4.1\bin
3. restart ME.
4. install tomcat.
0
 

Author Comment

by:iCeFiRe
ID: 8243093
but..where can i find my autoexec.bat?
0
 
LVL 14

Expert Comment

by:kennethxu
ID: 8243098
c:\autoexec.bat
0
 
LVL 14

Expert Comment

by:kennethxu
ID: 8243100
late here, will see you tomorrow.
0
 

Author Comment

by:iCeFiRe
ID: 8243198
Thanks kennethxu!
You are so great!
it works. Finally...Really Really thanks!
0
 

Author Comment

by:iCeFiRe
ID: 8243219
sorry, guys, as kennethxu really guide me step by step and help me the most on this question. i think he should be the one who get the points from me for this question.
Thanks alot guys!
0
 
LVL 14

Expert Comment

by:kennethxu
ID: 8246269
glad to know it is working for you, and as always, my pleasure to help :)
0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Active Directory can easily get cluttered with unused service, user and computer accounts. In this article, I will show you the way I like to implement ADCleanup..
In today's business world, data is more important than ever for informing marketing campaigns. Accessing and using data, however, may not come naturally to some creative marketing professionals. Here are four tips for adapting to wield data for insi…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question