Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Apache Tomcat »

Re: MySql Connector

David Smith

2007-07-25

Replies:

Not sure ... you could take a look at
http://tomcat.apache.org/tomcat-5.5-doc/logging.html. Tomcat's always
provided a complete stack and cited the code in error for me without any
changes in logging config.

You could also post the complete jsp you are using for a test. See if
the error stands out to one of us on the list.

--David

Mohammed Zabin wrote:

> I did this, but i think that there is an option to enable logging, do
> u know
> it?
>
> On 7/25/07, David Smith <dns4@(protected):
>
>>
>> I'm starting to think there's something really funny (ie broken) with
>> your tomcat install. Could you clean install another instance of tomcat
>> (preferably downloaded from the tomcat website) and check the code
>> there?
>>
>> --David
>>
>> Mohammed Zabin wrote:
>> > This is all the exception message, I looked inside logs folder, i
>> > found an
>> > empty file, it continas nothing :~
>> >
>> > On 7/25/07, David Smith <dns4@(protected):
>> >>
>> >> Your stack trace appears to be incomplete. Could you post more? It
>> >> appears to be a compile error and should cite the code in question.
>> >>
>> >> --David
>> >>
>> >> Mohammed Zabin wrote:
>> >> > For test purposes, i have wrote the following code as a java
>> program
>> >> > and it
>> >> > worked fine, but when I tried it in a jsp page i got the following
>> >> error:
>> >> >
>> >> > Class.forName("com.mysql.jdbc.Driver");
>> >> > String url = "jdbc:mysql://localhost:3306/exam";
>> >> > Connection con = DriverManager.getConnection(url,"root", "exam");
>> >> > Statement stmt = con.createStatement();
>> >> > ResultSet rs = stmt.executeQuery("Select type from questions");
>> >> >
>> >> > while( rs.next() ) {
>> >> >   System.out.println( rs.getString("type") );
>> >> > }
>> >> >
>> >> >
>> >> > org.apache.jasper.JasperException: Unable to compile class for JSP:
>> >> >
>> >> >
>> >> >
>> >> > Stacktrace:
>> >> >   org.apache.jasper.compiler.DefaultErrorHandler.javacError(
>> >> DefaultErrorHandler.java:85)
>> >> >
>> >> >   org.apache.jasper.compiler.ErrorDispatcher.javacError(
>> >> ErrorDispatcher.java:330)
>> >> >
>> >> >   org.apache.jasper.compiler.JDTCompiler.generateClass(
>> >> JDTCompiler.java:415)
>> >> >
>> >> >   org.apache.jasper.compiler.Compiler.compile (Compiler.java:308)
>> >> >   org.apache.jasper.compiler.Compiler.compile (Compiler.java:286)
>> >> >   org.apache.jasper.compiler.Compiler.compile (Compiler.java:273)
>> >> >   org.apache.jasper.JspCompilationContext.compile(
>> >> JspCompilationContext.java:566)
>> >> >
>> >> >   org.apache.jasper.servlet.JspServletWrapper.service(
>> >> JspServletWrapper.java:308)
>> >> >
>> >> >
>> >> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java
>> >> :320)
>> >> >
>> >> >  
>> org.apache.jasper.servlet.JspServlet.service (JspServlet.java:266)
>> >> >   javax.servlet.http.HttpServlet.service (HttpServlet.java:803)
>> >> >
>> >> >
>> >> >
>>
>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@(protected)
>> To unsubscribe, e-mail: users-unsubscribe@(protected)
>> For additional commands, e-mail: users-help@(protected)
>>
>>
>


---------------------------------------------------------------------
To start a new topic, e-mail: users@(protected)
To unsubscribe, e-mail: users-unsubscribe@(protected)
For additional commands, e-mail: users-help@(protected)

©2008 junlu.com - Jax Systems, LLC, U.S.A.