tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andre Prasetya" <andre.prase...@gmail.com>
Subject Re: install DBCP and mm.mysql 2.0.14 (JDBC Driver) and a test app, getting class compile error
Date Tue, 06 Mar 2007 02:23:34 GMT
mmm i think its a syntax error at test.jsp see line 7 foo.DBTest

On 3/5/07, Wayne Bragg <wlbragg@cox.net> wrote:
>
> I am trying to install DBCP and mm.mysql 2.0.14 (JDBC Driver) and a test
> app to see if it works.
> I'm not sure I have all the correct steps and configuration, in other
> words I don't know what I am doing.. Here is what I know and my setup for
> this test example that I keep getting a class compile error on.
>
> This is the error reported by browser -
>
> 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: 7 in the jsp file: /test.jsp
> Generated servlet error:
> foo.DBTest cannot be resolved to a type
> An error occurred at line: 7 in the jsp file: /test.jsp
> Generated servlet error:
> foo.DBTest cannot be resolved to a type
> org.apache.jasper.servlet.JspServletWrapper.handleJspException(
> JspServletWrapper.java:512)
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java
> :377)
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> root cause
> org.apache.jasper.JasperException: Unable to compile class for JSP
> An error occurred at line: 7 in the jsp file: /test.jsp
> Generated servlet error:
> foo.DBTest cannot be resolved to a type
> An error occurred at line: 7 in the jsp file: /test.jsp
> Generated servlet error:
> foo.DBTest cannot be resolved to a type
> org.apache.jasper.compiler.DefaultErrorHandler.javacError(
> DefaultErrorHandler.java:84)
> org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java
> :328)
> org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:414)
> org.apache.jasper.compiler.Compiler.compile(Compiler.java:297)
> org.apache.jasper.compiler.Compiler.compile(Compiler.java:276)
> org.apache.jasper.compiler.Compiler.compile(Compiler.java:264)
> org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java
> :563)
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java
> :305)
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>
> This is the Tomcat log -
>
> Mar 5, 2007 12:13:30 AM org.apache.catalina.core.StandardWrapperValveinvoke
> SEVERE: Servlet.service() for servlet jsp threw exception
> org.apache.jasper.JasperException: Unable to compile class for JSP
> An error occurred at line: 7 in the jsp file: /test.jsp
> Generated servlet error:
> foo.DBTest cannot be resolved to a type
> An error occurred at line: 7 in the jsp file: /test.jsp
> Generated servlet error:
> foo.DBTest cannot be resolved to a type
> at org.apache.jasper.compiler.DefaultErrorHandler.javacError(
> DefaultErrorHandler.java:84)
> at org.apache.jasper.compiler.ErrorDispatcher.javacError(
> ErrorDispatcher.java:328)
> at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java
> :414)
> at org.apache.jasper.compiler.Compiler.compile(Compiler.java:297)
> at org.apache.jasper.compiler.Compiler.compile(Compiler.java:276)
> at org.apache.jasper.compiler.Compiler.compile(Compiler.java:264)
> at org.apache.jasper.JspCompilationContext.compile(
> JspCompilationContext.java:563)
> at org.apache.jasper.servlet.JspServletWrapper.service(
> JspServletWrapper.java:305)
> at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java
> :314)
> at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
> ApplicationFilterChain.java:252)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(
> ApplicationFilterChain.java:173)
> at org.apache.catalina.core.StandardWrapperValve.invoke(
> StandardWrapperValve.java:213)
> at org.apache.catalina.core.StandardContextValve.invoke(
> StandardContextValve.java:178)
> at org.apache.catalina.core.StandardHostValve.invoke(
> StandardHostValve.java:126)
> at org.apache.catalina.valves.ErrorReportValve.invoke(
> ErrorReportValve.java:105)
> at org.apache.catalina.core.StandardEngineValve.invoke(
> StandardEngineValve.java:107)
> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java
> :148)
> at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
> :869)
> at
> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection
> (Http11BaseProtocol.java:664)
> at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(
> PoolTcpEndpoint.java:527)
> at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(
> LeaderFollowerWorkerThread.java:80)
> at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(
> ThreadPool.java:684)
> at java.lang.Thread.run(Unknown Source)
>
> This is how I setup and config for the DBCP and mm.mysql 2.0.14 (JDBC
> Driver)
>
> Added to \www\tomcat5\common\lib
>     commons-pool-1.3.jar
>     commons-collections-3.2.jar
>     commons-dbcp-1.2.1.jar
>
>
>
> <Context path="/DBTest" docBase="DBTest"
>    debug="5" reloadable="true" crossContext="true">
>   <Logger className="org.apache.catalina.logger.FileLogger"
>        prefix="localhost_DBTest_log." suffix=".txt"
>        timestamp="true"/>
>   <Resource name="jdbc/TestDB"
>        auth="Container"
>        type="javax.sql.DataSource"/>
>   <ResourceParams name="jdbc/TestDB">
>     <parameter>
>        <name>factory</name>
>        <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
>     </parameter>
>     <parameter>
>        <name>maxActive</name>
>        <value>100</value>
>     </parameter>
>     <parameter>
>        <name>maxIdle</name>
>        <value>30</value>
>     </parameter>
>     <parameter>
>        <name>maxWait</name>
>        <value>10000</value>
>     </parameter>
>     <parameter>
>        <name>username</name>
>        <value>javauser</value>
>     </parameter>
>     <parameter>
>       <name>password</name>
>       <value>javadude</value>
>     </parameter>
>     <parameter>
>       <name>driverClassName</name>
>       <value>org.gjt.mm.mysql.Driver</value>
>     </parameter>
>     <parameter>
>       <name>url</name>
>
>       <value>jdbc:mysql://localhost:3306/javatest?autoReconnect=true</value>
>     </parameter>
> The example I was following wasn't clear about if these next three went
> here or not
> <parameter>
>       <name>removeAbandoned</name>
>       <value>true</value>
>     </parameter>
>     <parameter>
>       <name>removeAbandonedTimeout</name>
>       <value>60</value>
>     </parameter>
>     <parameter>
>       <name>logAbandoned</name>
>       <value>true</value>
>     </parameter>
> </ResourceParams>
> </Context>




-- 
-Andre-

People see things the way they are and say "why ?" I see things that never
were and say "Why not ?"

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message