Results 1 to 7 of 7

Thread: Tomcat 5

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jan 2001
    Location
    Denmark
    Posts
    1,049

    Question Tomcat 5

    I have an JSP, when I run this, I'll get this message (I am 100% sure that the code is ok):
    Code:
    HTTP Status 500 - 
    
    --------------------------------------------------------------------------------
    
    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:\Tomcat 5.0\work\Catalina\localhost\jsp-examples\org\apache\jsp\MyFirstJSP_jsp.java:8: cannot access java.lang.Object
    bad class file: C:\Program Files\Java\j2re1.4.2_04\lib\rt.jar(java/lang/Object.class)
    class file has wrong version 48.0, should be 47.0
    Please remove or make sure it appears in the correct subdirectory of the classpath.
        implements org.apache.jasper.runtime.JspSourceDependent {
                   ^
    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.
    
    
    --------------------------------------------------------------------------------
    
    Apache Tomcat/5.0.25
    What is wrong with the rt.jar file?

  2. #2
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    I recommend you reinstall the Java SDK and Tomcat. Something seems to be very wrong.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Jan 2001
    Location
    Denmark
    Posts
    1,049
    OK, I will try that...

  4. #4

    Thread Starter
    Frenzied Member
    Join Date
    Jan 2001
    Location
    Denmark
    Posts
    1,049
    Now reinstalled I've made a new folder named test in the webapps folder including a file named test.jsp. When try to run this by http://localhost:8082/Test/test.jsp an error occurs saying:
    Code:
    HTTP Status 404 - /Test/MyFirstJSP.jsp
    
    --------------------------------------------------------------------------------
    
    type Status report
    
    message /Test/MyFirstJSP.jsp
    
    description The requested resource (/Test/MyFirstJSP.jsp) is not available.
    
    
    --------------------------------------------------------------------------------
    
    Apache Tomcat/5.0.25
    The strange thing is, that if I run the examples e.g http://localhost:8082/jsp-examples/j...arithmetic.jsp I have no problems running this?????

  5. #5
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    Is the capitalization exactly the same? Out of interest, are you running this on Linux or Windows?
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  6. #6

    Thread Starter
    Frenzied Member
    Join Date
    Jan 2001
    Location
    Denmark
    Posts
    1,049
    Sorry, posted the wrong link, of course it's http://localhost:8082/Test/MyFirstJSP.jsp.
    I am using Win2000 by the way

  7. #7
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    Hmmm... I always had problems configuring Tomcat, and it's definitely a configuration problem. The only time I got it to work is the one now running on my Linux server...

    Hmmm...
    Can you upload your server.xml (I believe there is no sensitive info inside) and outline your directory structure?
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width