File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes Tomcat 3.2.1 keeps crashing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Tomcat 3.2.1 keeps crashing" Watch "Tomcat 3.2.1 keeps crashing" New topic
Author

Tomcat 3.2.1 keeps crashing

hemanth kumar
Ranch Hand

Joined: Mar 15, 2001
Posts: 55
Hi to everybody
I am an ASP programmer learning JSP.This is my first question in this forum.
Well my problem is Tomcat(ver 3.2.1) keeps crashing quite frequently.Platform is Win 95, Db is MS Access 97
For ex here is a portion of the code where the Tomcat crashes
rs=stmt.executeQuery("select * from users where vUsername='"+ sUid +"' and vPassword='" + sPwd +"'");
try
{
if (rs != null)
{
HttpSession sess=request.getSession();
sess.setAttribute("UserID",sUid);
String sUnivCode=rs.getString("vUserName");
sess.setAttribute("UnivCode",sUnivCode);
out.println("Welcome "+ sUnivCode);
}
}
catch(SQLException e)
{
out.println("Something wrong with ur query");
}
In this code if i give rs != null the Tomcat just bonks out.I checked out an JSP book and this is the syntax that they give.
Anybody has a clue abt what is going on??
Thnx and regds
Hemanth
Madhav Lakkapragada
Ranch Hand

Joined: Jun 03, 2000
Posts: 5040

Hemanth:
Welcome to the ranch. Hope you like it.
Now re your problem, could you give us some clue
as to what exception you get?
Did you take a look at logs/tomcat.log for any errors?
Let us know.
regds.
- satya

Take a Minute, Donate an Hour, Change a Life
http://www.ashanet.org/workanhour/2006/?r=Javaranch_ML&a=81
hemanth kumar
Ranch Hand

Joined: Mar 15, 2001
Posts: 55
Hi
I searched the Tomcat/log directory.There is no file called Tomcat.log.Only 2 other files jasper.log and servlet.log are present.
Regarding error message, it is the usual windows Illegal Operation error. Nothing comes on the MS Dos prompt window also.
Also i substituted "if (rs != null)" with "if (rs.next())" then it is working fine.BUT now when i try to redirect the page using response.sendRedirect("somepage.jsp") the server again bonks out.
What might be the error?.Does Tomcat 3.2.1 support Win 95 plaf.?
Should i try reinstalling Tomcat.
Regds
Hemanth
Madhav Lakkapragada
Ranch Hand

Joined: Jun 03, 2000
Posts: 5040

I would be inclined to verify that the DB stuff works
as expected, by writing a small application (move the
JDBC calls to a new java file and add a main() method).
i would execute this verify that there is nothing wrong
with the JDBC calls and then worry about tomcat.
My $0.02.
regds.
- satya
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Tomcat 3.2.1 keeps crashing