You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by f-...@insa-tachi-s.com.mx on 2004/09/29 20:29:49 UTC
Problem whit this message cannot resolve symbol
Hi i´m begginer in Tomcat and Java and i´ve a problem.
I try run a JSP , but the next error appear, some one know the reasons?
The JSP use a simple class, when i run the example by shell (only for
test) all it´s OK, but when the JSP call the Class i get the Error.
My classPath it´s ok, i´ve review it.
Thanks.
ype 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: 3 in the jsp file: /Example.jsp
Generated servlet error:
[javac] Compiling 1 source file
/opt/jakarta-tomcat-5.0.19/work/Catalina/localhost/Mysql-conn/org/apache/jsp/Example_jsp.java:55:
cannot resolve symbol
symbol : class clsDisplayHtml
location: class org.apache.jsp.Example_jsp
clsDisplayHtml m_ClsDisplayHTML = new
clsDisplayHtml(m_StrAppName, m_StrWebMEmail, m_StrWebMName,
m_StrPageTitle);
^
An error occurred at line: 3 in the jsp file: /Example.jsp
Generated servlet error:
/opt/jakarta-tomcat-5.0.19/work/Catalina/localhost/Mysql-conn/org/apache/jsp/Example_jsp.java:55:
cannot resolve symbol
symbol : class clsDisplayHtml
location: class org.apache.jsp.Example_jsp
clsDisplayHtml m_ClsDisplayHTML = new
clsDisplayHtml(m_StrAppName, m_StrWebMEmail, m_StrWebMName,
m_StrPageTitle);
^
An error occurred at line: 3 in the jsp file: /Example.jsp
Generated servlet error:
/opt/jakarta-tomcat-5.0.19/work/Catalina/localhost/Mysql-conn/org/apache/jsp/Example_jsp.java:60:
cannot resolve symbol
symbol : class clsReadProps
location: class org.apache.jsp.Example_jsp
clsReadProps m_ClsProperties = new
clsReadProps("mysql.properties");
^
An error occurred at line: 3 in the jsp file: /Example.jsp
Generated servlet error:
/opt/jakarta-tomcat-5.0.19/work/Catalina/localhost/Mysql-conn/org/apache/jsp/Example_jsp.java:60:
cannot resolve symbol
symbol : class clsReadProps
location: class org.apache.jsp.Example_jsp
clsReadProps m_ClsProperties = new
clsReadProps("mysql.properties");
^
An error occurred at line: 3 in the jsp file: /Example.jsp
Generated servlet error:
/opt/jakarta-tomcat-5.0.19/work/Catalina/localhost/Mysql-conn/org/apache/jsp/Example_jsp.java:65:
cannot resolve symbol
symbol : class clsDbBean
location: class org.apache.jsp.Example_jsp
clsDbBean m_ClsDataBase = new clsDbBean(m_StrDriver,
m_StrUrl, m_StrUser, m_StrPass);
^
An error occurred at line: 3 in the jsp file: /Example.jsp
Generated servlet error:
/opt/jakarta-tomcat-5.0.19/work/Catalina/localhost/Mysql-conn/org/apache/jsp/Example_jsp.java:65:
cannot resolve symbol
symbol : class clsDbBean
location: class org.apache.jsp.Example_jsp
clsDbBean m_ClsDataBase = new clsDbBean(m_StrDriver,
m_StrUrl, m_StrUser, m_StrPass);
^
6 errors
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:127)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:351)
org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:415)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:458)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:553)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:291)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
note The full stack trace of the root cause is available in the Tomcat
logs.
Apache Tomcat/5.0.19
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: Problem whit this message cannot resolve symbol
Posted by Ben Souther <bs...@fwdco.com>.
Tomcat sets it's own classpath. You add your classes by placing them in
the specified directories.
This should get you started:
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/appdev/index.html
This page has the specifics on classloading:
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/class-loader-howto.html
On Wed, 2004-09-29 at 14:29, f-gil@insa-tachi-s.com.mx wrote:
> Hi i´m begginer in Tomcat and Java and i´ve a problem.
> I try run a JSP , but the next error appear, some one know the reasons?
> The JSP use a simple class, when i run the example by shell (only for
> test) all it´s OK, but when the JSP call the Class i get the Error.
> My classPath it´s ok, i´ve review it.
> Thanks.
> ype 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: 3 in the jsp file: /Example.jsp
>
> Generated servlet error:
> [javac] Compiling 1 source file
>
> /opt/jakarta-tomcat-5.0.19/work/Catalina/localhost/Mysql-conn/org/apache/jsp/Example_jsp.java:55:
> cannot resolve symbol
> symbol : class clsDisplayHtml
> location: class org.apache.jsp.Example_jsp
> clsDisplayHtml m_ClsDisplayHTML = new
> clsDisplayHtml(m_StrAppName, m_StrWebMEmail, m_StrWebMName,
> m_StrPageTitle);
> ^
>
>
>
> An error occurred at line: 3 in the jsp file: /Example.jsp
>
> Generated servlet error:
> /opt/jakarta-tomcat-5.0.19/work/Catalina/localhost/Mysql-conn/org/apache/jsp/Example_jsp.java:55:
> cannot resolve symbol
> symbol : class clsDisplayHtml
> location: class org.apache.jsp.Example_jsp
> clsDisplayHtml m_ClsDisplayHTML = new
> clsDisplayHtml(m_StrAppName, m_StrWebMEmail, m_StrWebMName,
> m_StrPageTitle);
> ^
>
>
>
> An error occurred at line: 3 in the jsp file: /Example.jsp
>
> Generated servlet error:
> /opt/jakarta-tomcat-5.0.19/work/Catalina/localhost/Mysql-conn/org/apache/jsp/Example_jsp.java:60:
> cannot resolve symbol
> symbol : class clsReadProps
> location: class org.apache.jsp.Example_jsp
> clsReadProps m_ClsProperties = new
> clsReadProps("mysql.properties");
> ^
>
>
>
> An error occurred at line: 3 in the jsp file: /Example.jsp
>
> Generated servlet error:
> /opt/jakarta-tomcat-5.0.19/work/Catalina/localhost/Mysql-conn/org/apache/jsp/Example_jsp.java:60:
> cannot resolve symbol
> symbol : class clsReadProps
> location: class org.apache.jsp.Example_jsp
> clsReadProps m_ClsProperties = new
> clsReadProps("mysql.properties");
> ^
>
>
>
> An error occurred at line: 3 in the jsp file: /Example.jsp
>
> Generated servlet error:
> /opt/jakarta-tomcat-5.0.19/work/Catalina/localhost/Mysql-conn/org/apache/jsp/Example_jsp.java:65:
> cannot resolve symbol
> symbol : class clsDbBean
> location: class org.apache.jsp.Example_jsp
> clsDbBean m_ClsDataBase = new clsDbBean(m_StrDriver,
> m_StrUrl, m_StrUser, m_StrPass);
> ^
>
>
>
> An error occurred at line: 3 in the jsp file: /Example.jsp
>
> Generated servlet error:
> /opt/jakarta-tomcat-5.0.19/work/Catalina/localhost/Mysql-conn/org/apache/jsp/Example_jsp.java:65:
> cannot resolve symbol
> symbol : class clsDbBean
> location: class org.apache.jsp.Example_jsp
> clsDbBean m_ClsDataBase = new clsDbBean(m_StrDriver,
> m_StrUrl, m_StrUser, m_StrPass);
> ^
> 6 errors
>
>
>
> org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:127)
>
> org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:351)
> org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:415)
> org.apache.jasper.compiler.Compiler.compile(Compiler.java:458)
> org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
>
> org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:553)
>
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:291)
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
>
> note The full stack trace of the root cause is available in the Tomcat
> logs.
>
> Apache Tomcat/5.0.19
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: Problem whit this message cannot resolve symbol
Posted by Gerardo Juarez <ge...@computo-industrial.com.mx>.
The Java runtime env. cannot find the class clsDisplayHtml. It may be:
- you defined it but is elsewhere. Is it yours? some library's?
- your invoking it with a different name (ClsDisplayHtml is different to
clsDisplayHtml, for example).
On Wed, 29 Sep 2004 f-gil@insa-tachi-s.com.mx wrote:
> Hi i´m begginer in Tomcat and Java and i´ve a problem.
> I try run a JSP , but the next error appear, some one know the reasons?
> The JSP use a simple class, when i run the example by shell (only for
> test) all it´s OK, but when the JSP call the Class i get the Error.
> My classPath it´s ok, i´ve review it.
> Thanks.
> ype 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: 3 in the jsp file: /Example.jsp
>
> Generated servlet error:
> [javac] Compiling 1 source file
>
> /opt/jakarta-tomcat-5.0.19/work/Catalina/localhost/Mysql-conn/org/apache/jsp/Example_jsp.java:55:
> cannot resolve symbol
> symbol : class clsDisplayHtml
> location: class org.apache.jsp.Example_jsp
> clsDisplayHtml m_ClsDisplayHTML = new
> clsDisplayHtml(m_StrAppName, m_StrWebMEmail, m_StrWebMName,
> m_StrPageTitle);
> ^
>
>
>
> An error occurred at line: 3 in the jsp file: /Example.jsp
>
> Generated servlet error:
> /opt/jakarta-tomcat-5.0.19/work/Catalina/localhost/Mysql-conn/org/apache/jsp/Example_jsp.java:55:
> cannot resolve symbol
> symbol : class clsDisplayHtml
> location: class org.apache.jsp.Example_jsp
> clsDisplayHtml m_ClsDisplayHTML = new
> clsDisplayHtml(m_StrAppName, m_StrWebMEmail, m_StrWebMName,
> m_StrPageTitle);
> ^
>
>
>
> An error occurred at line: 3 in the jsp file: /Example.jsp
>
> Generated servlet error:
> /opt/jakarta-tomcat-5.0.19/work/Catalina/localhost/Mysql-conn/org/apache/jsp/Example_jsp.java:60:
> cannot resolve symbol
> symbol : class clsReadProps
> location: class org.apache.jsp.Example_jsp
> clsReadProps m_ClsProperties = new
> clsReadProps("mysql.properties");
> ^
>
>
>
> An error occurred at line: 3 in the jsp file: /Example.jsp
>
> Generated servlet error:
> /opt/jakarta-tomcat-5.0.19/work/Catalina/localhost/Mysql-conn/org/apache/jsp/Example_jsp.java:60:
> cannot resolve symbol
> symbol : class clsReadProps
> location: class org.apache.jsp.Example_jsp
> clsReadProps m_ClsProperties = new
> clsReadProps("mysql.properties");
> ^
>
>
>
> An error occurred at line: 3 in the jsp file: /Example.jsp
>
> Generated servlet error:
> /opt/jakarta-tomcat-5.0.19/work/Catalina/localhost/Mysql-conn/org/apache/jsp/Example_jsp.java:65:
> cannot resolve symbol
> symbol : class clsDbBean
> location: class org.apache.jsp.Example_jsp
> clsDbBean m_ClsDataBase = new clsDbBean(m_StrDriver,
> m_StrUrl, m_StrUser, m_StrPass);
> ^
>
>
>
> An error occurred at line: 3 in the jsp file: /Example.jsp
>
> Generated servlet error:
> /opt/jakarta-tomcat-5.0.19/work/Catalina/localhost/Mysql-conn/org/apache/jsp/Example_jsp.java:65:
> cannot resolve symbol
> symbol : class clsDbBean
> location: class org.apache.jsp.Example_jsp
> clsDbBean m_ClsDataBase = new clsDbBean(m_StrDriver,
> m_StrUrl, m_StrUser, m_StrPass);
> ^
> 6 errors
>
>
>
> org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:127)
>
> org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:351)
> org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:415)
> org.apache.jasper.compiler.Compiler.compile(Compiler.java:458)
> org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
>
> org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:553)
>
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:291)
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
>
> note The full stack trace of the root cause is available in the Tomcat
> logs.
>
> Apache Tomcat/5.0.19
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org