[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Struts error. Jsp not compiling

Posted on 2006-05-22
4
Medium Priority
?
342 Views
Last Modified: 2013-11-24
i have been trying to execute a struts programm in my system for some time but not getting wat the error is, this the error i get in Tomcat 5.0.

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: Unable to compile class for JSP

An error occurred at line: -1 in the jsp file: null

Generated servlet error:
    [javac] Compiling 1 source file

C:\Program Files\Apache Software Foundation\Tomcat 5.0\work\Catalina\localhost\StrutsProj\org\apache\jsp\jsp\Index_jsp.java:7: cannot access java.lang.Object
bad class file: C:\Program Files\Java\jre1.5.0\lib\rt.jar(java/lang/Object.class)
class file has wrong version 49.0, should be 48.0
Please remove or make sure it appears in the correct subdirectory of the classpath.
public final class Index_jsp extends org.apache.jasper.runtime.HttpJspBase
             ^
1 error


      org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:83)
      org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:315)
      org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:406)
      org.apache.jasper.compiler.Compiler.compile(Compiler.java:463)
      org.apache.jasper.compiler.Compiler.compile(Compiler.java:442)
      org.apache.jasper.compiler.Compiler.compile(Compiler.java:430)
      org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:274)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:810)


note The full stack trace of the root cause is available in the Apache Tomcat/5.0.25 logs.


--------------------------------------------------------------------------------
0
Comment
Question by:pradeep_brat
2 Comments
 
LVL 86

Accepted Solution

by:
CEHJ earned 160 total points
ID: 16735269
Make sure Tomcat is pointing to the same 1.5 compiler as you're using for development
0
 
LVL 10

Assisted Solution

by:radarsh
radarsh earned 160 total points
ID: 16736595
Your JAVA_HOME should point to a JDK instance.
Not a JRE.

________
radarsh
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

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

Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
The viewer will learn how to implement Singleton Design Pattern in Java.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
Suggested Courses
Course of the Month17 days, 21 hours left to enroll

830 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