Return-Path: Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 66900 invoked from network); 2 Dec 2000 21:54:38 -0000 Received: from ha1.rdc1.il.home.com (HELO mail.rdc1.il.home.com) (imail@24.2.1.66) by locus.apache.org with SMTP; 2 Dec 2000 21:54:38 -0000 Received: from javadev ([24.8.90.139]) by mail.rdc1.il.home.com (InterMail vM.4.01.03.00 201-229-121) with SMTP id <20001202215436.SNNR22998.mail.rdc1.il.home.com@javadev> for ; Sat, 2 Dec 2000 13:54:36 -0800 Message-ID: <006001c02cb2$39614250$0200a8c0@msdn1.wi.home.com> From: "Dave Smith" To: References: <015C3130A304D411AA8900508B8B6F721666B7@hot-ex01.hotgen.com> Subject: Re: More Tomcat problems. Date: Mon, 2 Oct 2000 15:49:11 -0500 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0059_01C02C88.4E78FC20" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N This is a multi-part message in MIME format. ------=_NextPart_000_0059_01C02C88.4E78FC20 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable More Tomcat problems.Panagiotis, Are you using a try block around the code to catch SQLExceptions in your development setup? This is what is happening: you are throwing an exception without a handler. The jvm just unwinds to the top and drops you out.=20 Try using something like this in the JSP: <%@ page errorPage=3D"error-page.jsp" %> or else debug the connection code in an IDE first. Regards, Dave ----- Original Message -----=20 From: Panagiotis Konstantinidis=20 To: tomcat-user@jakarta.apache.org=20 Sent: Thursday, November 30, 2000 12:45 PM Subject: More Tomcat problems. Hello there again, this is the second message I am sending regarding = problems with Tomcat. In my previous message Kief answered solved my = question correctly, so I would really appreciate if he could answer = again this one. It seems that I have exactly the same problem. I am = running a JSP file (lets say myFile.jsp) that open a conenction with the = database on the server. The code is like the following: <% .....=20 String url =3D ;=20 String user =3D ;=20 String password =3D ;=20 Class.forName("org.gjt.mm.mysql.Driver");=20 Connection con =3D DriverManager.getConnection(url, user, = password);=20 .....=20 %>=20 When the line Connection con =3D DriverManager.getConnection(url, = user, password); is encountered then Tomcat just goes off (and I get the = error message from Apache "Internal Server Error....."). Just like that, = with no error messages or anything. This is really weird because I have = downloaded and installed the latest versions of both Apache (v1.3.14) = and Tomcat (v3.2) and I have included the JDBC driver .jar file in my = classpath. I have looked in the "tomcat.log" file and there are no error = messages. I have looked in the "error.log" file in the Apache directory = and I get the error message (for one more time): [Thu Nov 30 17:47:39 = 2000] [error] [client 192.168.0.25] Premature end of script headers: = c:/work/tomcat/jakarta-tomcat-3.2-b7/webapps/panos/myFile.jsp. I cannot = think of anything to do so if somebody knows more about that please = help. Thank you.=20 Panos=20 ------=_NextPart_000_0059_01C02C88.4E78FC20 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable More Tomcat problems.
Panagiotis,
 
Are you using a try block around the = code to catch=20 SQLExceptions
in your development setup?
 
This is what is happening: you are = throwing an=20 exception without
a handler. The jvm just unwinds to the = top and=20 drops you out.
 
Try using something like this in the=20 JSP:
 

<%@ page errorPage=3D"error-page.jsp" %>

or else debug the connection code in an = IDE=20 first.
 
Regards,
 
Dave
----- Original Message -----
From:=20 Panagiotis=20 Konstantinidis
To: tomcat-user@jakarta.apache= .org=20
Sent: Thursday, November 30, = 2000 12:45=20 PM
Subject: More Tomcat = problems.

  Hello there = again, this=20 is the second message I am sending regarding problems with Tomcat. In = my=20 previous message Kief answered solved my question correctly, so I = would really=20 appreciate if he could answer again this one. It seems that I have = exactly the=20 same problem. I am running a JSP file (lets say myFile.jsp) that open = a=20 conenction with the database on the server. The code is like the=20 following:

  <% = .....=20
        String url =3D <the url string>; =
        String user =3D <the user = string>;=20
        String password =3D <the password = string>;=20

        Class.forName("org.gjt.mm.mysql.Driver");=20
        Connection con =3D = DriverManager.getConnection(url, user,=20 password);

 ..... =
%>

When the line = Connection con =3D=20 DriverManager.getConnection(url, user, password); is encountered then = Tomcat=20 just goes off (and I get the error message from Apache "Internal = Server=20 Error....."). Just like that, with no error messages or anything. This = is=20 really weird because I have downloaded and installed the latest = versions of=20 both Apache (v1.3.14) and Tomcat (v3.2) and I have included the JDBC = driver=20 .jar file in my classpath.

  I have = looked in the=20 "tomcat.log" file and there are no error messages. I have looked in = the=20 "error.log" file in the Apache directory and I get the error message = (for one=20 more time): [Thu Nov 30 17:47:39 2000] [error] [client 192.168.0.25] = Premature=20 end of script headers:=20 c:/work/tomcat/jakarta-tomcat-3.2-b7/webapps/panos/myFile.jsp. I = cannot think=20 of anything to do so if somebody knows more about that please = help.

   Thank = you.=20

    = Panos=20


------=_NextPart_000_0059_01C02C88.4E78FC20--