Author Topic: Exception report when trying dbtest/  (Read 4106 times)

fbnts

  • Newbie
  • *
  • Posts: 1
  • Karma: 0
    • View Profile
    • Email
Exception report when trying dbtest/
« on: November 08, 2007, 00:59:06 »
Hi,

I have installed Java, TomCat and followed the installation guide.

However, when I goto the dbtest directory I get:

Quote
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:
JSP FileName:/queuemetrics/dbtest/index.jsp
Java FileName:/usr/lib/apache-tomcat-5.5.25/work/Catalina/localhost/_//org/apache/jsp/queuemetrics/dbtest/index_jsp.java

An error occurred at line: 43 in the jsp file: /queuemetrics/dbtest/index.jsp
U cannot be resolved
40:
41:
42:     // web corrente
43:     String stWebHere = U.getWebApp( request );
44:
45:     // WEB-INF corrente
46:     String stWebXml = application.getRealPath( "WEB-INF/web.xml" );

JSP FileName:/queuemetrics/dbtest/index.jsp
Java FileName:/usr/lib/apache-tomcat-5.5.25/work/Catalina/localhost/_//org/apache/jsp/queuemetrics/dbtest/index_jsp.java

An error occurred at line: 49 in the jsp file: /queuemetrics/dbtest/index.jsp
jdbcTester cannot be resolved to a type
46:     String stWebXml = application.getRealPath( "WEB-INF/web.xml" );
47:
48:     // Tester JDBC
49:     jdbcTester obJT = new jdbcTester();
50:
51: %>
52:

JSP FileName:/queuemetrics/dbtest/index.jsp
Java FileName:/usr/lib/apache-tomcat-5.5.25/work/Catalina/localhost/_//org/apache/jsp/queuemetrics/dbtest/index_jsp.java

An error occurred at line: 49 in the jsp file: /queuemetrics/dbtest/index.jsp
jdbcTester cannot be resolved to a type
46:     String stWebXml = application.getRealPath( "WEB-INF/web.xml" );
47:
48:     // Tester JDBC
49:     jdbcTester obJT = new jdbcTester();
50:
51: %>
52:

JSP FileName:/queuemetrics/dbtest/index.jsp
Java FileName:/usr/lib/apache-tomcat-5.5.25/work/Catalina/localhost/_//org/apache/jsp/queuemetrics/dbtest/index_jsp.java

An error occurred at line: 68 in the jsp file: /queuemetrics/dbtest/index.jsp
KA.APPL_VERSIONE cannot be resolved to a type
65:
66: <table border="0" width="100%">
67: <tr><td align="center">
68: <a href="http://queuemetrics.com/?from=qm-<%= KA.APPL_VERSIONE %>" target="qm"><img src="<%= stWebHere %>/img/sm_qm_logo.gif" width="200" height="35" border="0"></a>
69: </td></tr>
70: </table>
71:


Stacktrace:
   org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:98)
   org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
   org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:435)
   org.apache.jasper.compiler.Compiler.compile(Compiler.java:298)
   org.apache.jasper.compiler.Compiler.compile(Compiler.java:277)
   org.apache.jasper.compiler.Compiler.compile(Compiler.java:265)
   org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:564)
   org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:302)
   org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
   org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

If I hit refresh I occasionally also get:

Quote
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 load class for JSP
   org.apache.jasper.JspCompilationContext.load(JspCompilationContext.java:599)
   org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:137)
   org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:314)
   org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
   org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

root cause

java.lang.ClassNotFoundException: org.apache.jsp.queuemetrics.dbtest.index_jsp
   java.net.URLClassLoader$1.run(URLClassLoader.java:200)
   java.security.AccessController.doPrivileged(Native Method)
   java.net.URLClassLoader.findClass(URLClassLoader.java:188)
   org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:131)
   org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:63)
   org.apache.jasper.JspCompilationContext.load(JspCompilationContext.java:597)
   org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:137)
   org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:314)
   org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
   org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

Also, if I just goto the queuemetrics path I get:
Quote
HTTP Status 404 - /queuemetrics/qm_start.do

The only stop I could not complete was:
7. Edit WEB-INF/web.xml, change the parameters of JDBC_URL to reflect your installation. The included version uses a database called queuemetrics  that is on a the same server, using a user called “queuemetrics” which password is “javadude”.

I could not find any reference to JDBC_URL.

Is this error related to this missing step?  Also, what do I need to put in my web.xml file?

Tom

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: Exception report when trying dbtest/
« Reply #1 on: November 09, 2007, 17:08:26 »
Really strange - looks like the webapp is in a wrong state and is not recognizing its internal components. Try to reinstall the original web.xml, if that is damaged the whole webapp is ignored.
Or maybe did you install it as a subdirectoty of an existing webapp?